Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
Might as well throw in the "importance dot" and demonstrate mockup 4
On Template:WPBannerMeta/testcases, "Test" shows mockup 2, "Test2" shows mockup 4.
Line 307:
table.insert(rows, class_row)
local class_color = frame:expandTemplate{ title = 'Class/colour/sandbox', args = {class} }
local class_icon = frame:expandTemplate{title = 'Class/icon', args = {class, style='vertical-align: 75%'} }
if yesno(args.mockup4) then
table.insert(nested_ratings, '<span class="wpb-header-bubbles" style="border: .12em solid ' .. class_color .. ';">' .. class_icon .. ' ' .. class .. '-class</span>')
else
table.insert(nested_ratings, 1, '<span class="wpb-header-bubbles" style="borderbackground: .12em solid ' .. importance_colorclass_color .. ';"><spanborder: .075em solid style="color:' .. importance_colorclass_color .. ';line-height:initial">●</span> ' .. importanceclass_icon .. '- ' .. importance_nameclass .. '-class</span>')
end
end
add_category((class=='' and 'Unassessed' or class..'-Class') .. ' ' .. assessment_cat)
Line 348 ⟶ 352:
if importance~='Unknown' then -- importance is not NA or Unknown
local importance_color = frame:expandTemplate{ title = 'Importance/colour/sandbox', args = {importance} }
if yesno(args.mockup4) then
table.insert(nested_ratings, 1, '<span class="wpb-header-bubbles" style="border: .12em solid ' .. importance_color .. ';"><span style="color:' .. importance_color .. ';line-height:initial">●</span> ' .. importance .. '-' .. importance_name ..'</span>')
table.insert(nested_ratings, 1, '<span class="wpb-header-bubbles" style="border: .12em solid ' .. importance_color .. ';"><span style="color:' .. importance_color .. ';">●</span> ' .. importance .. '-' .. importance_name ..'</span>')
else
table.insert(nested_ratings, 1, '<span class="wpb-header-bubbles" style="background: ' .. importance_color .. ';border: .075em solid ' .. importance_color .. ';">' .. importance .. '-' .. importance_name ..'</span>')
end
end
end