"Module:Asbox": अवतरणों में अंतर

Content deleted Content added
imported>Codehydro
repatch with patched patch; amazing how a single misplaced line can break everything :\
imported>Codehydro
patch for note param causing gap in firefox; also streamlined asbox further
पंक्ति 223:
function p.main(frame, page)
args, page = p:init(frame, page)
local output = mw.html.create()'table'
:addClass'metadata plainlinks stub'
:tag'table'
:css{background = 'transparent'}
:addClass'metadata plainlinks stub'
:cssattr{backgroundrole = 'transparentpresentation'}
:tag'tabletr'
:attr{role = 'presentation'}
:node((args.icon or args.image) and
:tag'tr'
mw.html.create'td'
:node((args.icon or args.image) and
:wikitext(args.icon or ('[[File:%s|%spx|alt=%s]]'):format(
mw.html.create'td'
:wikitext(args.iconimage or ('[[File:%s|%spx|alt=%s]]'):format(,
args.imagepix or '40x30',
args.piximagealt or '40x30Stub icon',
))
args.imagealt or 'Stub icon'
))
):tag'td'
:tag'tdi'
:tag'i'wikitext(
Buffer'This':_(args.subject):_(args.article or 'article'):_(args.qualifier)' ',--space
:wikitext(
' is a [[Wikipedia:stub|stub]]. You can help Wikipedia by [',
Buffer'This':_(args.subject):_(args.article or 'article'):_(args.qualifier)' ',--space
page:fullUrl('action=edit', 'relative'),
' is a [[Wikipedia:stub|stub]]. You can help Wikipedia by [',
' expanding it].'
page:fullUrl('action=edit', 'relative'),
' expanding it].'
)
:done()
:node(args.name and
require'Module:Navbar'._navbar{
args.name,
mini = 'yes',
style = 'position: absolute; right: 15px; display: none;'
}
)
:nodedone(args.note and )
:node(args.name and
require'Module:Navbar'._navbar{
args.name,
mini = 'yes',
style = 'position: absolute; right: 15px; display: none;'
:done()}
})
:node(args.note and
'<br />' .. tostring(
mw.html.create'span'
:css{['font-style'] = 'normal', ['font-size'] = 'smaller'}
:tag'br':done()
:wikitext(args.note)
)
)
:allDone()
--[[
पंक्ति 274:
--the template but not in the article. The elseif after namespace == 0 means demo cats will never show in article space.
p.demodoc = p.demo ~= 'art' and p.templatepage(frame, page)
output:wikitext = mw.html.create()
:node(output)
string.format('<small>Demo categories: %s</small>', category{done = true}),
:wikitext(
p.demo == 'doc' and p.demodoc or nil
string.format('<small>Demo categories: %s</small>', category{done = true}),
)
p.demo == 'doc' and p.demodoc or nil
)
else
--Checks for valid name; emulates original template's check using {{FULLPAGENAME:{{{name|}}}}}
local normalizedName = mw.title.new(args.name or '')
if normalizedName and normalizedName.fullText == page.fullText then
output = mw.html.create():node(output):wikitext(p.templatepage(frame, page))
elseif not page.isSubpage and page.namespace == 10 then-- Template namespace and not a subpage
category{{k = args.name and 'E' or 'W', t = page.text}}
"https://hi.wikipedia.org/wiki/Module:Asbox" से प्राप्त