Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
work in progress
more
Line 88:
end
 
local bubble = function(text, short_text, default_colourcolour, conflict)
local colour = cfg.quality.colours[short_text] or default_colour
local out = mw.html.create('span')
:addClass('wpb-header-bubbles')
Line 310 ⟶ 309:
or cfg.quality.default_scale
local quality_rating = cfg.quality.rating:format(pagetype, rating, scale)
local colour = cfg.quality.colourscolour[short_text] or default_colour
if not colour then
-- local icon = cfg.quality.icon[class] and iconDefault and (o.image ~= cfg.no) or (o.image == cfg.yes)
colour = frame:expandTemplate{ title = 'Class/colour', args = {class} },
-- icon = icon and p.icon(args) .. ' ' or ''
end
local text = wikilink(':Category:' .. category, class)
local icon = cfg.quality.icon[class]
-- cell
local textlabel = (icon and (icon..' ') or '') .. wikilink(':Category:' .. category, class)
-- :wikitext(mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = {src = cfg.stylesLocation} }, icon, text)
 
-- return tostring(cell)
local class_row = mw.html.create('tr')
:tag('td')
:addClass('assess'):addClass('assess-' .. class):done()
:css('background', colour):wikitext(label)
--:node(class_module{class, category = assessment_cat})
:done()
:tag('td'):addClass('mbox-text'):attr('colspan', '2'):wikitext(quality_rating)
:allDone()
Line 326 ⟶ 325:
local new_bubble = bubble(
class=='' and 'Unassessed' or (class .. '‑class'),
class,
frame:expandTemplate{ title = 'Class/colour', args = {class} },
conflict
)