Module:Documentation: Difference between revisions

Move "Module:Documentation/styles.css" to "Template:Documentation/styles.css"; Swap options and other elements in header
m (Minor change in wording)
(Move "Module:Documentation/styles.css" to "Template:Documentation/styles.css"; Swap options and other elements in header)
Line 21: Line 21:
local header = "[[File:Template-info.svg|x24px]] <b>" .. args.type .. " Documentation</b>"
local header = "[[File:Template-info.svg|x24px]] <b>" .. args.type .. " Documentation</b>"
if args.content == nil and docPage.exists then  
if args.content == nil and docPage.exists then  
header = header .. tostring(mw.html.create("span"):addClass("documentation-actions")
header = tostring(mw.html.create("span"):addClass("documentation-actions")
:tag("span"):addClass("documentation-action-label"):wikitext("[Options]"):done()
:tag("span"):addClass("documentation-action-label"):wikitext("[Options]"):done()
:tag("ul"):addClass("documentation-action-menu")
:tag("ul"):addClass("documentation-action-menu")
Line 30: Line 30:
:tag("li"):wikitext("[[Special:Purge/" .. currentPage.fullText .. "|Purge this page]]"):done()
:tag("li"):wikitext("[[Special:Purge/" .. currentPage.fullText .. "|Purge this page]]"):done()
:done()
:done()
:done())
:done()) .. header
end
end
docContainer:tag("div"):addClass("documentation-header"):wikitext(header):done()
docContainer:tag("div"):addClass("documentation-header"):wikitext(header):done()
Line 54: Line 54:
docContainer:tag("div"):addClass("documentation-footer"):wikitext(footer):done()
docContainer:tag("div"):addClass("documentation-footer"):wikitext(footer):done()
local templateStyles = mw.getCurrentFrame():extensionTag("templatestyles", nil, {src = "Module:Documentation/styles.css"})
local templateStyles = mw.getCurrentFrame():extensionTag("templatestyles", "", {src = "Documentation/styles.css"})
return tostring(docContainer) .. templateStyles
return tostring(docContainer) .. templateStyles
end
end


return p
return p
420

edits