Content deleted Content added
slight blip expected |
clean |
||
Line 5:
require('Module:No globals')
local p = {}
Line 48 ⟶ 47:
function p.main(frame)
end
function p._main(args
local classes = {
Line 109 ⟶ 105:
root:addClass('progression-rainbow')
-- Don't care which frame it is if all I want to do is expand templates
-- and extension tags
local current_frame = mw.getCurrentFrame()
for _, class in ipairs(classes) do
if class.count ~= 0 then
Line 114 ⟶ 113:
root:newline() -- sprinkled through to make the HTML easier to read
root:tag('li')
:css('background',
title = 'class/colour', args = { class.class }
})
:css('width', percentage)
:tag('span')
:addClass('sr-only')
:wikitext(string.format('%s %s', percentage, class.category))
:done()
Line 133 ⟶ 132:
:css('width', remaining)
:tag('span')
:addClass('sr-only')
:wikitext(string.format('%s remaining', remaining))
:done()
Line 139:
end
root:allDone()
return
name = 'templatestyles', args = { src = 'Module:Progression rainbow/styles.css'}
} .. current_frame:extensionTag{
name = 'templatestyles', args = { src = '
} .. '\n' .. tostring(root)
end
|