Module:Variable arguments: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 58: | Line 58: | ||
end | end | ||
result = "<div class=\" | result = "<div class=\"sidebox\" " | ||
.. string.format("style=\"width: %ipx;\">\n", (namespace == "module" and 272 or 238)) | .. string.format("style=\"width: %ipx;\">\n", (namespace == "module" and 272 or 238)) | ||
.. "{|\n" | .. "{|\n" | ||
.. "|-\n" | .. "|-\n" | ||
.. "| <span | .. "| <span class=\"sidebox-image\">[[File:Lua-Logo.svg|30px]]</span>" | ||
.. " || <span class=\"sidebox-text\">" | |||
.. " || <span | |||
.. string.format("%s:\n%s</span>\n", | .. string.format("%s:\n%s</span>\n", | ||
(namespace == "module" | (namespace == "module" | ||
| Line 72: | Line 70: | ||
result) | result) | ||
.. "|}\n</div>" | .. "|}\n</div>" | ||
.. mw.getCurrentFrame():extensionTag("templatestyles", "", { | |||
src = "Module:Variable arguments/styles.css" | |||
}) | |||
return frame:preprocess(yesno(debugg) == true and "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>" or result) | return frame:preprocess(yesno(debugg) == true and "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>" or result) | ||
end | end | ||
| Line 120: | Line 121: | ||
end | end | ||
result = "<div class=\" | result = "<div class=\"sidebox\" " | ||
.. string.format("style=\"width: %ipx;\">\n", (namespace == "module" and 272 or 238)) | .. string.format("style=\"width: %ipx;\">\n", (namespace == "module" and 272 or 238)) | ||
.. "{|\n" | .. "{|\n" | ||
.. "|-\n" | .. "|-\n" | ||
.. "| <span | .. "| <span class=\"sidebox-image\">[[File:Farm-Fresh_css_add.svg|32px]]</span>" | ||
.. " || <span class=\"sidebox-text\">" | |||
.. " || <span | |||
.. string.format("This %s uses [[mw:extension:TemplateStyles|TemplateStyles]]:\n%s</span>\n", | .. string.format("This %s uses [[mw:extension:TemplateStyles|TemplateStyles]]:\n%s</span>\n", | ||
namespace, result) | namespace, result) | ||
.. "|}\n</div>" | .. "|}\n</div>" | ||
.. mw.getCurrentFrame():extensionTag("templatestyles", "", { | |||
src = "Module:Variable arguments/styles.css" | |||
}) | |||
return frame:preprocess(yesno(debugg) == true and "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>" or result) | return frame:preprocess(yesno(debugg) == true and "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>" or result) | ||
end | end | ||