Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
Reinstate 0.2em border so people can compare and weigh in
test3 now fully implemented
Line 119:
table.sort(notes, function (x, y) return tonumber(x) < tonumber(y) end)
local warning = ''
local bubble = function(text, shortText, colour, option)
local out
option = tonumber(option)
Line 128:
:wikitext(text)
elseif option==5 then
local highContrastColors = {["FA"] = "#7595D7", ["FL"] = "#7595D7", ["FM"] = "#7595D7", ["A"] = "#0DA6A6", ["AL"] = "#0DA6A6", ["GA"] = "#14AD14", ["B"] = "#5AA70E", ["C"] = "#9A9A00", ["Start"] = "#D5803C", ["Stub"] = "#D67B7B", ["List"] = "#9F89D7", ["NA"] = "#959595", ["Top"] = "#D56DD5", ["High"] = "#CA77CA", ["Mid"] = "#BE80BD", ["Low"] = "#AF88B0"}
local contrastColour = highContrastColors[shortText]
out = mw.html.create('span')
:addClass('wpb-header-bubbles')
:css('color', colourcontrastColour)
:css('border', '0.2em solid ' .. colourcontrastColour)
:wikitext(text)
else
Line 331 ⟶ 333:
local new_bubble = bubble(
class .. '-class',
class,
frame:expandTemplate{ title = 'Class/colour', args = {class} },
args.mockup
Line 375 ⟶ 378:
local new_bubble = bubble(
importance .. '-' .. importance_name,
importance,
frame:expandTemplate{ title = 'Importance/colour', args = {importance} },
args.mockup