8,438
edits
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
local contents = mw.html.create( 'div' ):addClass('g-tab-contents') | local contents = mw.html.create( 'div' ):addClass('g-tab-contents') | ||
repeat | repeat | ||
tab = mw.html.create( 'span' ):addClass('g-tab'):wikitext(args[i+2]) | |||
if active == (i + 2) * 0.5 then | if active == (i + 2) * 0.5 then | ||
tab = tab:addClass('g-tab-active') | |||
end | end | ||
header = header:node(tab) | |||
contents = contents:node(mw.html.create( 'div' ):addClass('g-tab-content'):wikitext(args[i+1])) | contents = contents:node(mw.html.create( 'div' ):addClass('g-tab-content'):wikitext(args[i+1])) | ||
i = i + 2 | i = i + 2 |