Module:Sheet: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 199: Line 199:
:cssText(rowArgs.rowcellstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
else
table.insert(empty_row_categories, rowArgs.data or '')
end
end
local function renderTitle()
if not args.title then return end
has_rows = true
has_list_class({args.titleclass})
root
:tag('caption')
:addClass('infobox-title')
:addClass(args.titleclass)
-- @deprecated next; target .infobox-<name> .infobox-title
:cssText(args.titlestyle)
:wikitext(args.title)
end
local function renderAboveRow()
if not args.above then return end
has_rows = true
has_list_class({ args.aboveclass })
root
:tag('tr')
:tag('th')
:attr('colspan', '6')
:addClass('infobox-above')
:addClass(args.aboveclass)
-- @deprecated next; target .infobox-<name> .infobox-above
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
local function renderBelowRow()
if not args.below then return end
has_rows = true
has_list_class({ args.belowclass })
root
:tag('tr')
:tag('td')
:attr('colspan', '6')
:addClass('infobox-below')
:addClass(args.belowclass)
-- @deprecated next; target .infobox-<name> .infobox-below
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
local function renderAbilityHeaderRow()
if not args.strheader then return end
has_rows = true
has_list_class({ args.abilityheaderclass })
root
local dataCell = row:tag('td')
:tag('tr')
dataCell
:tag('td')
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 269: Line 208:
:cssText(args.abilityheaderstyle)
:cssText(args.abilityheaderstyle)
:wikitext(fixChildBoxes(args.strheader,'td'))
:wikitext(fixChildBoxes(args.strheader,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 276: Line 216:
:cssText(args.abilityheaderstyle)
:cssText(args.abilityheaderstyle)
:wikitext(fixChildBoxes(args.dexheader,'td'))
:wikitext(fixChildBoxes(args.dexheader,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 283: Line 224:
:cssText(args.abilityheaderstyle)
:cssText(args.abilityheaderstyle)
:wikitext(fixChildBoxes(args.conheader,'td'))
:wikitext(fixChildBoxes(args.conheader,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 290: Line 232:
:cssText(args.abilityheaderstyle)
:cssText(args.abilityheaderstyle)
:wikitext(fixChildBoxes(args.intheader,'td'))
:wikitext(fixChildBoxes(args.intheader,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 297: Line 240:
:cssText(args.abilityheaderstyle)
:cssText(args.abilityheaderstyle)
:wikitext(fixChildBoxes(args.wisheader,'td'))
:wikitext(fixChildBoxes(args.wisheader,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 304: Line 248:
:cssText(args.abilityheaderstyle)
:cssText(args.abilityheaderstyle)
:wikitext(fixChildBoxes(args.chaheader,'td'))
:wikitext(fixChildBoxes(args.chaheader,'td'))
end
local function renderAbilityRow()
if not args.str then return end
has_rows = true
has_list_class({ args.abilityclass })
root
local dataCell = row:tag('td')
dataCell
:tag('tr')
:tag('tr')
:tag('td')
:tag('td')
Line 322: Line 259:
:cssText(args.abilitystyle)
:cssText(args.abilitystyle)
:wikitext(fixChildBoxes(args.str,'td'))
:wikitext(fixChildBoxes(args.str,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 329: Line 267:
:cssText(args.abilitystyle)
:cssText(args.abilitystyle)
:wikitext(fixChildBoxes(args.dex,'td'))
:wikitext(fixChildBoxes(args.dex,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 336: Line 275:
:cssText(args.abilitystyle)
:cssText(args.abilitystyle)
:wikitext(fixChildBoxes(args.con,'td'))
:wikitext(fixChildBoxes(args.con,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 343: Line 283:
:cssText(args.abilitystyle)
:cssText(args.abilitystyle)
:wikitext(fixChildBoxes(args.int,'td'))
:wikitext(fixChildBoxes(args.int,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 350: Line 291:
:cssText(args.abilitystyle)
:cssText(args.abilitystyle)
:wikitext(fixChildBoxes(args.wis,'td'))
:wikitext(fixChildBoxes(args.wis,'td'))
:tag('td')
local dataCell = row:tag('td')
dataCell
:attr('colspan', '1')
:attr('colspan', '1')
:addClass ('infobox-data')
:addClass ('infobox-data')
Line 356: Line 298:
:addClass(args.abilityclass)
:addClass(args.abilityclass)
:cssText(args.abilitystyle)
:cssText(args.abilitystyle)
:wikitext(fixChildBoxes(args.cha,'td'))
:wikitext(fixChildBoxes(args.cha,'td'))
else
table.insert(empty_row_categories, rowArgs.data or '')
end
end
 
local function renderTitle()
if not args.title then return end
 
has_rows = true
has_list_class({args.titleclass})
root
:tag('caption')
:addClass('infobox-title')
:addClass(args.titleclass)
-- @deprecated next; target .infobox-<name> .infobox-title
:cssText(args.titlestyle)
:wikitext(args.title)
end
 
local function renderAboveRow()
if not args.above then return end
 
has_rows = true
has_list_class({ args.aboveclass })
root
:tag('tr')
:tag('th')
:attr('colspan', '6')
:addClass('infobox-above')
:addClass(args.aboveclass)
-- @deprecated next; target .infobox-<name> .infobox-above
:cssText(args.abovestyle)
:wikitext(fixChildBoxes(args.above,'th'))
end
 
local function renderBelowRow()
if not args.below then return end


has_rows = true
has_list_class({ args.belowclass })
root
:tag('tr')
:tag('td')
:attr('colspan', '6')
:addClass('infobox-below')
:addClass(args.belowclass)
-- @deprecated next; target .infobox-<name> .infobox-below
:cssText(args.belowstyle)
:wikitext(fixChildBoxes(args.below,'td'))
end
end


8,856
edits

Navigation menu