Anonymous user
Module:Shortcut: Difference between revisions
Jump to navigation
Jump to search
redo templatestyles
MacFan4000 (talk | contribs) m (1 revision imported: Basic templates) |
enwiki>Galobtter (redo templatestyles) |
||
Line 55:
local root = mw.html.create()
root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Shortcut/styles.css'} })
-- Anchors
local anchorDiv = root
:tag('div')
:addClass('module-shortcutanchordiv')
for i, shortcut in ipairs(shortcuts) do
local anchor = mw.uri.anchorEncode(shortcut)
anchorDiv:tag('span'):attr('id', anchor)
end
-- Shortcut heading
Line 75 ⟶ 72:
shortcutHeading = message(cfg['shortcut-heading'], nShortcuts)
shortcutHeading = frame:preprocess(shortcutHeading)
end
end
Line 82 ⟶ 78:
local shortcutList = root
:tag('div')
:addClass('
:attr('role', 'note')
if shortcutHeading then
shortcutList
:tag('div')
:
:wikitext(shortcutHeading)
end
local list = shortcutList:tag('ul')
for i, item in ipairs(listItems) do
end
return tostring(root)
end
|