- Docs: Module:Kbd/doc (should use {{module}})
- Styles: Module:Kbd/style.css
- Templates that use this module:
All modules: book, chronology, kbd, module, photos, post, todo, wikidata link, yesno.
local p = {}
-- =p.main({args={1="ar", 2="ba"}})
p.main = function ( frame )
local args = frame.args or {}
if #args == 0 and mw.getCurrentFrame():getParent() ~= nil then
args = mw.getCurrentFrame():getParent().args
end
local kbds = {}
for arg,val in pairs( args ) do
local kbd = mw.html.create( 'kbd' ):wikitext( val )
kbds[#kbds + 1] = tostring( kbd )
end
mw.logObject(kbds)
local out = mw.html.create( 'span' )
:addClass( 'mdl-kbd' )
:wikitext( table.concat( kbds, '+' ) )
return mw.getCurrentFrame():extensionTag( 'templatestyles', '', { src = "Module:Kbd/style.css" } ) .. tostring( out )
end
return p