Module:Shortcut: Difference between revisions

redo templatestyles
Enwikipedia>Galobtter
(whoops, breaks stuff)
Enwikipedia>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')
:css('position', 'relative')
:css('top', '-3em')
for i, shortcut in ipairs(shortcuts) do
local anchor = mw.uri.anchorEncode(shortcut)
Line 79 ⟶ 78:
local shortcutList = root
:tag('div')
:addClass('shortcutboxmodule-shortcutboxplain plainlist noprint')
: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
shortcutList
:tag('div')
:cssaddClass('display','inlinemodule-blockshortcutlist')
:css('border-bottom','1px solid #aaa')
:css('margin-bottom', '.2em')
:css('font-weight', 'normal')
:wikitext(shortcutHeading)
end
Anonymous user