Module:SocialMedia: Difference between revisions
No edit summary |
No edit summary |
||
| Line 79: | Line 79: | ||
end | end | ||
-- Build a clickable icon link (now | -- Build a clickable icon link (now 24px) with alt text for accessibility: | ||
-- [[File:Something.svg| | -- [[File:Something.svg|24px|alt=ALT_TEXT|link=URL]] | ||
local function buildIconLink(iconFile, altText, url) | local function buildIconLink(iconFile, altText, url) | ||
return string.format("[[%s| | return string.format("[[%s|24px|alt=%s|link=%s]]", iconFile, altText, url) | ||
end | end | ||
| Line 103: | Line 103: | ||
end | end | ||
-- | -- Use a flex container that clears any floats above and | ||
-- | -- starts a new block with margin-top. | ||
return table.concat({ | return table.concat({ | ||
'<div style="clear: both; display: flex; flex-wrap: wrap; gap: 0.5em;">', | '<div style="clear: both; margin-top: 1em; display: flex; flex-wrap: wrap; gap: 0.5em;">', | ||
table.concat(icons, ""), | table.concat(icons, ""), | ||
'</div>' | '</div>' | ||