Modul:Sidebar: Unterschied zwischen den Versionen

K (vereinfacht)
Zeile 2: Zeile 2:
-- This module implements {{Sidebar}}
-- This module implements {{Sidebar}}
--
--
require('Modul:No globals')
require('Module:No globals')


local p = {}
local p = {}


local getArgs = require('Modul:Arguments').getArgs
local getArgs = require('Module:Arguments').getArgs
local navbar = require('Modul:Navbar')._navbar
local navbar = require('Module:Navbar')._navbar


local function trimAndAddAutomaticNewline(s)
local function trimAndAddAutomaticNewline(s)
Zeile 97: Zeile 97:
root
root
:wikitext(args.title)
:wikitext(args.title)
:wikitext('</th></tr>') -- @todo replace this with unclosed again once mw.html gets it
else
else
root
root
Zeile 162: Zeile 163:
root
root
:tag('tr')
:tag('tr')
:tag('td') -- instead of th
:tag('th')
:addClass(args.headingclass)
:addClass(args.headingclass)
:css('padding', '0.1em')
:css('padding', '0.1em')
:css('font-weight', 'bold')
:cssText(args.basestyle)
:cssText(args.basestyle)
:cssText(args.headingstyle)
:cssText(args.headingstyle)
Zeile 218: Zeile 218:
end
end


return tostring(root)
return tostring(root) .. (child and '[[Category:Pages using sidebar with the child parameter]]' or '')
end
end


Anonymer Benutzer