Module:Shortcut: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
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') |
||
:css('top', '-3em') |
|||
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') |
||
:css('float', 'right') |
|||
:css('border', '1px solid #aaa') |
|||
:css('background', '#fff') |
|||
:css('margin', '0em 0em 0em 1em') |
|||
:css('padding', '.3em .6em .2em .6em') |
|||
:css('text-align', 'center') |
|||
:css('font-size', '85%') |
|||
:css('font-weight', 'bold') |
|||
if shortcutHeading then |
if shortcutHeading then |
||
shortcutList |
shortcutList |
||
:tag('div') |
:tag('div') |
||
: |
:addClass('shortcutlist') |
||
:css('border-bottom','1px solid #aaa') |
|||
:css('margin-bottom', '.2em') |
|||
:css('font-weight', 'normal') |
|||
:wikitext(shortcutHeading) |
:wikitext(shortcutHeading) |
||
end |
end |