Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
MediaWiki help
Creopedia
Search
Search
Appearance
Log in
Personal tools
Log in
View source for Module:TabbedCard
Module
Discussion
English
Read
View source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
View source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
←
Module:TabbedCard
require( 'strict' ) local MAX_WIKITEXT_TABS = 20 local tabber = mw.ext.tabber local p = {} --- Process the wikitext args --- --- @param args table --- @return table local function processArgs( args ) local data = { noPadding = args.noPadding, tabber = {} } for i = 1, MAX_WIKITEXT_TABS do local label = args[ 'label' .. i ] local content = args[ 'content' .. i ] if label and content then table.insert( data.tabber, { label = label, content = content } ) end end return data end --- Wikitext entry point for the module --- --- @param frame mw.frame --- @return string function p.main( frame ) local getArgs = require( 'Module:Arguments' ).getArgs return p._main( processArgs( getArgs( frame ) ) ) end --- Lua entry point for the module --- --- @param data table --- @return string function p._main( data ) local root = mw.html.create( 'div' ) root :addClass( 't-tabbedCard' ) :wikitext( tabber.render( data.tabber ) ) if data.noPadding then root:addClass( 't-tabbedCard--noPadding' ) end return mw.getCurrentFrame():extensionTag { name = 'templatestyles', args = { src = 'Module:TabbedCard/styles.css' } } .. tostring( root ) end return p
Templates used on this page:
Template:Documentation
(
view source
)
Module:TabbedCard/doc
(
view source
)
Return to
Module:TabbedCard
.