Module:Official website: Difference between revisions
Fix too small font per MOS:FONTSIZE. When format= is used inside Template:Infobox, text size was 90% of 88%. |
Richardpruen (talk | contribs) m 1 revision imported |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 45: | Line 45: | ||
-- Get objects for all official sites on Wikidata. | -- Get objects for all official sites on Wikidata. | ||
local websites = quickPcall(function () | local websites = quickPcall(function () | ||
return mw.wikibase. | return mw.wikibase.getAllStatements(mw.wikibase.getEntityIdForCurrentPage(), 'P856') | ||
end) | end) | ||
Line 88: | Line 88: | ||
local function renderUrl(options) | local function renderUrl(options) | ||
if not options.url and not options.wikidataurl then | if not options.url and not options.wikidataurl then | ||
local | local qid = mw.wikibase.getEntityIdForCurrentPage() | ||
local result = '<strong class="error">' .. | local result = '<strong class="error">' .. | ||
'No URL found. Please specify a URL here or add one to Wikidata.' .. | 'No URL found. Please specify a URL here or add one to Wikidata.' .. | ||
Line 104: | Line 103: | ||
) | ) | ||
if options.wikidataurl and not options.url then | if options.wikidataurl and not options.url then | ||
local | local qid = mw.wikibase.getEntityIdForCurrentPage() | ||
if qid then | if qid then | ||
ret[#ret + 1] = '[[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit this at Wikidata |link=https://www.wikidata.org/wiki/' .. qid .. '#P856|Edit this at Wikidata]]' | ret[#ret + 1] = '[[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit this at Wikidata |link=https://www.wikidata.org/wiki/' .. qid .. '#P856|Edit this at Wikidata]]' |