Module:Asbox
From Zoophilia Wiki
Documentation for this module may be created at Module:Asbox/doc
local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Asbox'}) local output = mw.html.create('table') output :addClass('metadata plainlinks stub') :css('background','transparent') :attr('role','presentation') if args.icon or args.image then output :tag('td'):wikitext(args.icon or string.format('[[File:%s|%spx|alt=%s]]',args.image, args.pix and ('|' .. args.pix) or '',args.imagealt or 'Stub icon')) end local buffer = '\'\'This ' .. (args.subject and args.subject .. ' ' or '') .. (args.article or 'article') .. ' ' .. (args.qualifier and args.qualifier .. ' ' or '') .. '[[Wikipedia:stub|stub]]. You can help Wikipedia by [' .. tostring(mw.title.getCurrentTitle():fullUrl('action=edit', 'relative')) .. ' expanding it].\'\'' if args.name then buffer = buffer .. '{{navbar|{{{name}}}|mini=yes|style=position: absolute; right: 15px; display: none;}}' end if args.note then buffer = buffer .. '<br /><span style="font-style: normal; font-size: smaller;">{{{note}}}</span>' end output :tag('td'):wikitext(buffer) return output end return p