Module:Good Articles
Appearance
local p = {}
p.main = function (frame)
local args = require("Module:Arguments").getArgs(frame)
-- expect args.shortcut e.g. GA/H, args.type e.g. History, args.text a long list
local subpage = frame:preprocess("{{SUBPAGENAME}}") -- I never did look up if there's a better way to do this...
local header = ""
local shortcuts = ""
if args and args.shortcut and subpage == args.type then
shortcuts = frame:expandTemplate{ title = 'shortcut', args = { args.shortcut } }
header = frame:expandTemplate{ title = 'Wikipedia:Good articles/header', args = { shortcuts = shortcuts } }
end
local text = args.text or args[1] or ""
local footer = [===[
</div>
</div>
<!-- end of list -->]===]
local output = header .. [===[{{#ifeq: {{SUBPAGENAME}} | History | <!-- only include header on this page -->
__NOTOC__
<div style="clear:both;">
<!-- DO NOT REMOVE THIS DIV, USED TO FORCE IE TO DISPLAY BACKGROUND FOR ARTS DIV -->
</div>
<div style="clear:both;">
<span id="History" />
<div style="padding:5px 5px 8px 5px; background-color:#66CC66; text-align:left; font-size:larger;">[[Image:Noia 64 apps kworldclock.png|22px|left]]'''History'''</div>
<div style="text-align:left;">
</div>
</div>
<div style="clear:both;" class="NavFrame">
<span id="World history"/>
<div class="NavHead" style="padding:2px 2px 2px 30px; background-color:#FFFAF0; text-align:left; font-size:larger;">[[Image:Noia 64 apps kworldclock.png |22px|left]]World history</div>
<div class="NavContent" style="text-align:left;">
==­ ==]===] .. text .. footer
return output
end
return p