Module:Large category TOC: Difference between revisions
m
1 revision imported
m (Protected "Module:Large category TOC": Highly visible template ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
Vivaporius (talk | contribs) m (1 revision imported) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 28:
:addClass('toc')
-- :attr('id','toc')
:css({
})
-- Contains "Content: Top 0-9 A - Z"
local header = toc_frame:tag('div')
-- Contains all the rest
local body_wrapper
local body = toc_frame:tag('div')
local jumpy_collapse = mw.html.create('div')
:cssText('margin: 0 4em')
if toc_type == 'collapsible' then
toc_frame:addClass('
:cssText('padding: 4px; text-align: center; border: 1px solid #a2a9b1; font-size: 95%')
header:cssText('font-weight: bold; line-height: 1.6em')
body:addClass('
:css({ background = 'white',▼
:css({
▲ display = 'none' })
})
elseif toc_type == 'scrollable' then
body:css({ ['overflow-x'] = 'scroll',
Line 55 ⟶ 62:
end
local header_content = {'<
' [',pageurl,' Top]',
' [',pageurl,'?from=0 0–9]' }
Line 62 ⟶ 69:
table.insert(header_content,string.format(' [%s?from=%s %s]',pageurl,v,v))
end
header:wikitext(table.concat(header_content))▼
if toc_type == 'collapsible' then
jumpy_collapse:wikitext(table.concat(header_content))
header:node(jumpy_collapse)
else
end
local body_content = {}
|