More actions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 18: | Line 18: | ||
local fullhtml = mw.html.create("div") | local fullhtml = mw.html.create("div") | ||
fullhtml:wikitext('[[%s|%s]]', tostring(html), article) | fullhtml:wikitext(string.format('[[%s|%s]]', tostring(html), article)) | ||
return tostring(fullhtml) | return tostring(fullhtml) |
Revision as of 03:08, 14 December 2024
Documentation for this module may be created at Module:ArticleButton/doc
local p = {}
function p.render(frame)
local args = frame:getParent().args
local article = args.article or mw.title.getCurrentTitle().fullText
local label = args.label or mw.title.new(article).text
local image = args.image or mw.ext.PageImages.getImage(article)
local html = mw.html.create("span")
html:addClass("button-with-circle")
:tag("div")
:addClass("circle-image")
:wikitext( string.format( '[[File:%s|x48px|link=]]', image ) )
:done()
:tag("span")
--:wikitext(string.format('[[%s|%s]]', article, label))
--:done()
local fullhtml = mw.html.create("div")
fullhtml:wikitext(string.format('[[%s|%s]]', tostring(html), article))
return tostring(fullhtml)
end
return p