Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
fix the height not the width
Adding mockup 5; original inspiration for the bubbles was Template:Rail color box so this is the most faithful. Contrast fail, but the colors can be adjusted
Line 119:
table.sort(notes, function (x, y) return tonumber(x) < tonumber(y) end)
local warning = ''
local bubble = function(text, colour, optionmockup4, mockup5)
local out
if optionmockup4 then
out = mw.html.create('span')
:addClass('wpb-header-bubbles')
:css('border', '0.2em12em solid ' .. colour)
:wikitext(text)
elseif mockup5 then
out = mw.html.create('span')
:addClass('wpb-header-bubbles')
:css('color', colour)
:wikitext(text)
else
Line 325 ⟶ 330:
class .. '-class',
frame:expandTemplate{ title = 'Class/colour', args = {class} },
yesno(args.mockup4),
yesno(args.mockup5)
)
table.insert(nested_ratings, 1, new_bubble)
Line 369 ⟶ 375:
importance .. '-' .. importance_name,
frame:expandTemplate{ title = 'Importance/colour', args = {importance} },
yesno(args.mockup4),
yesno(args.mockup5)
)
table.insert(nested_ratings, new_bubble)