Module:T-CountryHub: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode Tag: Reverted |
||
| Line 294: | Line 294: | ||
end | end | ||
-- Generate flag image for background | |||
local flagImageWikitext = "" | local flagImageWikitext = "" | ||
if args.has_country and args.has_country ~= "" then | if args.has_country and args.has_country ~= "" then | ||
| Line 306: | Line 307: | ||
end | end | ||
-- | -- Build data for standard table rendering (like other cards) | ||
local | local infoData = { | ||
{result = 'ccTLD', value = ccTLDText}, | |||
{result = 'ICANN region', value = regionText}, | |||
{result = 'ISOC chapter', value = ISOCText}, | |||
{result = 'Youth IGF', value = youthText} | |||
} | |||
local | -- Render as standard wikitable with flag background | ||
local tableHtml = renderTable(infoData, {'Country Info'}) | |||
-- | -- Wrap with flag background | ||
return string.format( | |||
'<div class="country-hub-infobox-wrapper">%s%s</div>', | |||
tableHtml, | |||
flagImageWikitext | |||
) | |||
end | end | ||
} | } | ||