Content deleted Content added
clean up, typo(s) fixed: XBOX → Xbox, a award → an award using AWB |
include The Escapist |
||
Line 13:
local p = {}
local reviewer = {{'[[1UP.com]]', '1UP'
local aggregator = {{'[[GameRankings]]','GR'
-- 2 arrays with the title and code of each predefined "system type" field to be used.
local system = {{'[[Atari 2600]]','A2600'
-- Require necessary modules.
local HtmlBuilder = require('Module:HtmlBuilder')
local categoryHandler = require('Module:Category handler').main
-- Set aliases for often-used functions to reduce table lookups.
local args
local frame
Line 141 ⟶ 144:
local titleCell = tbl.tag('tr').tag('th').css('font-size', '120%')
if args.state == 'plain' then▼
if args['award1'] or ((#halfkeysagg > 0 or #halfkeysrev > 0 or custome_agg > 0 or custome_rev > 0) and platforms >= 0) then▼
end▼
.wikitext(' ')▼
end▼
else▼
.done()▼
end▼
.done()▼
end▼
.done()▼
end▼
▲ else
end
end
Line 491 ⟶ 488:
--
-- Inserts
--
function award(tbl, awardnum)
Line 548 ⟶ 545:
function renderMainTable()
local tbl
▲ if args['award1'] or ((#halfkeysagg > 0 or #halfkeysrev > 0 or custome_agg > 0 or custome_rev > 0) and platforms >= 0) then
-- Width: 20% Seems better since it scales with the article size.▼
▲ -- Width: 20% Seems better since it scales with the article size.
.attr('cellpadding', 0)▼
tbl = HtmlBuilder.
.
.
.css('
.css('
.css('
.css('
tbl
.css('width',args.width)
tbl
▲ end
else
tbl = HtmlBuilder.create('table')▼
▲ .attr('cellpadding', 0)
.attr('cellspacing', 0)▼
.css('background', 'transparent')▼
.css('padding', '0em')▼
.css('text-align', 'center')▼
.css('font-size', '80%')▼
▲ end
if args.state then
tbl
.
else
tbl
.
end
▲ else
▲ tbl = HtmlBuilder.create('table')
▲ .attr('cellspacing', 0)
▲ .css('background', 'transparent')
▲ .css('padding', '0em')
▲ .css('margin-top', '0em')
▲ .css('margin', '1em')
▲ .css('text-align', 'center')
▲ .css('font-size', '80%')
▲ end
▲ if args.state then
tbl▼
▲ .addClass(args.state)
tbl▼
.addClass('collapsible')▼
▲ end
if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
▲ tbl
▲ .addClass('collapsible')
.addClass(args.state)
▲ end
tbl.css('float', args.align or 'right').css('clear', args.align or 'right')
renderTitleRow(tbl)▼
tbl
.
.node(reviews())▼
▲ .done()
tbl
.
▲ .done()
else
category = category or '' -- Check that we don't have a nil value for the category variable.
tbl = HtmlBuilder.create()
tbl.wikitext(category)
end
▲ renderTitleRow(tbl)
▲ .tag('td')
▲ .node(reviews())
▲ .done()
▲ .tag('tr')
▲ .tag('td')
▲ .node(awards())
return tbl
end
Line 707 ⟶ 706:
--
-- Main: frame function.
--
function p.reviewbox(frame)
Line 720 ⟶ 719:
end
end
return p._reviewbox(args)
end
|