Module:SocialShare: Difference between revisions
From TwogPedia
(Created page with "local p = {} function p.generateShareLinks(frame) local socialLinks = { { source = "Twitter" }, { source = "Facebook" }, { source = "Instagram" }, { source = "Linkedin" } } local html = mw.html.create("div"):addClass("right-last-container-news-twogpedia") html:tag("b"):wikitext("Share:"):done() for _, data in ipairs(socialLinks) do local span = html:tag("span"):addClass("icon-container-news-twogpedia")...") |
(No difference)
|
Latest revision as of 02:43, 23 April 2025
Documentation for this module may be created at Module:SocialShare/doc
local p = {}
function p.generateShareLinks(frame)
local socialLinks = {
{ source = "Twitter" },
{ source = "Facebook" },
{ source = "Instagram" },
{ source = "Linkedin" }
}
local html = mw.html.create("div"):addClass("right-last-container-news-twogpedia")
html:tag("b"):wikitext("Share:"):done()
for _, data in ipairs(socialLinks) do
local span = html:tag("span"):addClass("icon-container-news-twogpedia")
local iconHtml = "[[File:" .. data.source .. ".png|25px]]"
span:wikitext(iconHtml)
span:done()
end
return tostring(html)
end
return p
No categories