Module:Shortcut: Difference between revisions
use templatestyles
m (remove line breaks to allow transclusion in list items) |
(use templatestyles) |
||
Line 55: | Line 55: | ||
local root = mw.html.create() | local root = mw.html.create() | ||
root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Shortcut/styles.css'} }) | |||
-- Anchors | -- Anchors | ||
local anchorDiv = root | local anchorDiv = root | ||
:tag('div') | :tag('div') | ||
: | :addClass('shortcutanchordiv') | ||
for i, shortcut in ipairs(shortcuts) do | for i, shortcut in ipairs(shortcuts) do | ||
local anchor = mw.uri.anchorEncode(shortcut) | local anchor = mw.uri.anchorEncode(shortcut) | ||
Line 81: | Line 80: | ||
:addClass('shortcutbox plainlist noprint') | :addClass('shortcutbox plainlist noprint') | ||
:attr('role', 'note') | :attr('role', 'note') | ||
if shortcutHeading then | if shortcutHeading then | ||
shortcutList | shortcutList | ||
:tag('div') | :tag('div') | ||
: | :addClass('shortcutlist') | ||
:wikitext(shortcutHeading) | :wikitext(shortcutHeading) | ||
end | end |