Module:Video game reviews/sandbox: Difference between revisions

Content deleted Content added
args.title
insert mw-collapsible instead
Line 112:
local function renderHeadingRow(builder, mainHeading, nameHeading)
renderMainHeading(builder, 2, mainHeading)
builder:tag('tr')
:tag('tr')
:tag('th')
:css('background', '#e8f4f8')
:css('text-align', 'center')
:css('vertical-align', 'middle')
:wikitext(nameHeading)
:done()
:tag('th')
:css('background', '#e8f4f8')
:css('vertical-align', 'middle')
:wikitext(data.i18n.score)
:done()
end
 
Line 157 ⟶ 156:
builder:tag('tr')
:tag('td')
:css('text-align', 'center')
:css('vertical-align', 'middle')
:wikitext(name)
:done()
:tag('td')
:css('text-align', 'center')
:wikitext(rating)
:done()
end
 
local function renderReviews(builder, providedReviewers, providedAggregators, activeSystems, customAggregatorKeys, customReviewerKeys, args)
builder = builder:tag('table')
:attr('cellpadding', 0)
:attr('cellspacing', 0)
:css('width', '100%')
:css('border-bottom', 'none')
:css('margin', '0em')
 
local reviewerCount = #providedReviewers + #customReviewerKeys
Line 238 ⟶ 237:
local function renderAwards(builder, args, awardKeys, borderTop)
builder = builder:tag('table')
:css('width', '100%')
:css('margin', '0')
:css('border-top', borderTop)
:attr('cellpadding', 3)
:attr('cellspacing', 0)
 
renderMainHeading(builder, 2, data.i18n[#awardKeys == 1 and 'award' or 'awards'], borderTop)
 
builder:tag('tr')
:tag('th')
:wikitext(data.i18n.publication)
:done()
:tag('th')
:wikitext(data.i18n.award)
 
for _, v in ipairs(awardKeys) do
builder:tag('tr')
:tag('td')
:css('font-weight', 'bold')
:css('background-color', '#f2f2f2')
:wikitext(args[v .. 'Pub'])
:done()
:tag('td')
:css('background-color', '#f2f2f2')
:wikitext(args[v])
end
builder:done()
Line 289 ⟶ 288:
or args.state == 'collapsed' or args.state == 'expanded') then
div
:addClass('mw-collapsible')
:addClass(args.state)
end