Changes

no edit summary
Line 8: Line 8:     
local ShipListKai = BaseTable({
 
local ShipListKai = BaseTable({
_table_start = [[{| class="wikitable typography-xl-optout" style="width: -moz-fit-content; width: -webkit-fit-content; width: fit-content; text-align: center;"]],
+
_table_start = [[{| class="wikitable" style="text-align:center"]],
_header_template = [[! style="position:sticky; top: 0px;" | No.
+
_header_template = [[! style="position:sticky;top:0px" | No.
! style="position:sticky; top: 0px; width: 100px;" | Name
+
! style="position:sticky;top:0px;width:100px" | Name
! style="position:sticky; top: 0px; width: 75px;" | Class
+
! style="position:sticky;top:0px;width:75px" | Class
! style="position:sticky; top: 0px;" | Type
+
! style="position:sticky;top:0px" | Type
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: lightcoral;" | ${firepower}
+
! style="position:sticky;top:0px;width:30px;background-color:lightcoral" | ${firepower}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: lightskyblue;" | ${torpedo}
+
! style="position:sticky;top:0px;width:30px;background-color:lightskyblue" | ${torpedo}
! style="position:sticky; top: 0px; width: 24px; text-align: center; vertical-align: middle; background-color: slategrey;" | ${firepower}${torpedo}
+
! style="position:sticky;top:0px;width:24px;background-color:slategrey" | ${firepower}${torpedo}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: sandybrown;" | ${aa}
+
! style="position:sticky;top:0px;width:30px;background-color:sandybrown" | ${aa}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: #9C8FEE;" | ${asw}
+
! style="position:sticky;top:0px;width:30px;background-color:#9C8FEE" | ${asw}
! style="position:sticky; top: 0px; white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: #9C8FEE;" | ${asw}+
+
! style="position:sticky;top:0px;white-space:nowrap;width:30px;background-color:#9C8FEE" | ${asw}+
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: aquamarine;" | ${los}
+
! style="position:sticky;top:0px;width:30px;background-color:aquamarine" | ${los}
! style="position:sticky; top: 0px; white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: aquamarine;" | ${los}+
+
! style="position:sticky;top:0px;white-space:nowrap;width:30px;background-color:aquamarine" | ${los}+
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: palegreen;" | ${luck}
+
! style="position:sticky;top:0px;width:30px;background-color:palegreen" | ${luck}
! style="position:sticky; top: 0px; white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: palegreen;" | ${luck}+
+
! style="position:sticky;top:0px;white-space:nowrap;width:30px;background-color:palegreen" | ${luck}+
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: pink;" | ${hp}
+
! style="position:sticky;top:0px;width:30px;background-color:pink" | ${hp}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: #F2E279;" | ${armor}
+
! style="position:sticky;top:0px;width:30px;background-color:#F2E279" | ${armor}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: violet;" | ${evasion}
+
! style="position:sticky;top:0px;width:30px;background-color:violet" | ${evasion}
! style="position:sticky; top: 0px; white-space:nowrap; width: 30px; text-align: center; vertical-align: middle; background-color: violet;" | ${evasion}+
+
! style="position:sticky;top:0px;white-space:nowrap;width:30px;background-color:violet" | ${evasion}+
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: #72E6E6;" | ${speed}
+
! style="position:sticky;top:0px;width:30px;background-color:#72E6E6" | ${speed}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: silver;" | ${aircraft}
+
! style="position:sticky;top:0px;width:30px;background-color:silver" | ${aircraft}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: lightseagreen;" | ${range}
+
! style="position:sticky;top:0px;width:30px;background-color:lightseagreen" | ${range}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertixal-align: middle; background-color: forestgreen;" | ${fuel}
+
! style="position:sticky;top:0px;width:30px;background-color:forestgreen" | ${fuel}
! style="position:sticky; top: 0px; width: 30px; text-align: center; vertical-align: middle; background-color: darkgoldenrod;" | ${ammo}
+
! style="position:sticky;top:0px;width:30px;background-color:darkgoldenrod" | ${ammo}
! style="position:sticky; top: 0px; width: 250px; text-align: center; vertical-align: middle;" | Build / Remodel Info
+
! style="position:sticky;top:0px;width:250px" | Build / Remodel Info
! style="position:sticky; top: 0px; text-align:left;" | Notes]],
+
! style="position:sticky;top:0px" | Notes]],
 
_columns = {
 
_columns = {
 
"id",
 
"id",
Line 61: Line 61:  
"notes",
 
"notes",
 
},
 
},
_cell = [[| style="${text_align}; padding:5px 5px 5px 5px;" |${value}]],
+
_cell = [[| style="${text_align}" |${value}]],
 +
_cell_simple = [[|${value}]],
 
_item_class = Ship,
 
_item_class = Ship,
_class_number_template = "${class_name}<br />#${class_number}",
+
_class_number_template = "${class_name}<br>#${class_number}",
 
_normal_construction = "Normal",
 
_normal_construction = "Normal",
 
_large_ship_construction = "LSC",
 
_large_ship_construction = "LSC",
Line 82: Line 83:  
table.insert(value, Formatting:format_stat(ship:japanese_name()))
 
table.insert(value, Formatting:format_stat(ship:japanese_name()))
 
end
 
end
return {value = Formatting:id_span(tostring(ship:api_id() or mw.ustring.lower(mw.ustring.gsub(ship:name(), "%s+", self._dash))), self._fragment_prefix, table.concat(value, "<br />")), text_align = "text-align: " .. self._start_align}
+
return {value = Formatting:id_span(tostring(ship:api_id() or mw.ustring.lower(mw.ustring.gsub(ship:name(), "%s+", self._dash))), self._fragment_prefix, table.concat(value, "<br>")), text_align = "text-align: " .. self._start_align}
 
end
 
end
    
function ShipListKai:id(ship)
 
function ShipListKai:id(ship)
return {value = Formatting:format_stat(ship:true_id() or ship:id()),
+
return {value = Formatting:format_stat(ship:true_id() or ship:id()), simple = true}
text_align = "",
  −
}
   
end
 
end
   Line 110: Line 109:  
firepower_max = ship:firepower()
 
firepower_max = ship:firepower()
 
end
 
end
return {value = Formatting:format_stat(firepower_max), text_align = ""}
+
return {value = Formatting:format_stat(firepower_max), simple = true}
 
end
 
end
   Line 118: Line 117:  
torpedo_max = ship:torpedo()
 
torpedo_max = ship:torpedo()
 
end
 
end
return {value = Formatting:format_stat(torpedo_max), text_align = ""}
+
return {value = Formatting:format_stat(torpedo_max), simple = true}
 
end
 
end
   Line 136: Line 135:  
    night_battle = night_battle + torpedo_max
 
    night_battle = night_battle + torpedo_max
 
end
 
end
return {value = Formatting:format_stat(night_battle), text_align = ""}
+
return {value = Formatting:format_stat(night_battle), simple = true}
 
end
 
end
   Line 144: Line 143:  
aa_max = ship:aa()
 
aa_max = ship:aa()
 
end
 
end
return {value = Formatting:format_stat(aa_max), text_align = ""}
+
return {value = Formatting:format_stat(aa_max), simple = true}
 
end
 
end
    
function ShipListKai:asw(ship)
 
function ShipListKai:asw(ship)
return {value = Formatting:format_stat(ship:asw()), text_align = ""}
+
return {value = Formatting:format_stat(ship:asw()), simple = true}
 
end
 
end
   Line 156: Line 155:  
asw_max = ship:asw()
 
asw_max = ship:asw()
 
end
 
end
return {value = Formatting:format_stat(asw_max), text_align = ""}
+
return {value = Formatting:format_stat(asw_max), simple = true}
 
end
 
end
    
function ShipListKai:los(ship)
 
function ShipListKai:los(ship)
return {value = Formatting:format_stat(ship:los()), text_align = ""}
+
return {value = Formatting:format_stat(ship:los()), simple = true}
 
end
 
end
   Line 168: Line 167:  
los_max = ship:los()
 
los_max = ship:los()
 
end
 
end
return {value = Formatting:format_stat(los_max), text_align = ""}
+
return {value = Formatting:format_stat(los_max), simple = true}
 
end
 
end
    
function ShipListKai:luck(ship)
 
function ShipListKai:luck(ship)
return {value = Formatting:format_stat(ship:luck()), text_align = ""}
+
return {value = Formatting:format_stat(ship:luck()), simple = true}
 
end
 
end
   Line 180: Line 179:  
luck_max = ship:luck()
 
luck_max = ship:luck()
 
end
 
end
return {value = Formatting:format_stat(luck_max), text_align = ""}
+
return {value = Formatting:format_stat(luck_max), simple = true}
 
end
 
end
    
function ShipListKai:hp(ship)
 
function ShipListKai:hp(ship)
return {value = Formatting:format_stat(ship:hp()), text_align = ""}
+
return {value = Formatting:format_stat(ship:hp()), simple = true}
 
end
 
end
   Line 192: Line 191:  
armor_max = ship:armor()
 
armor_max = ship:armor()
 
end
 
end
return {value = Formatting:format_stat(armor_max), text_align = ""}
+
return {value = Formatting:format_stat(armor_max), simple = true}
 
end
 
end
    
function ShipListKai:evasion(ship)
 
function ShipListKai:evasion(ship)
return {value = Formatting:format_stat(ship:evasion()), text_align = ""}
+
return {value = Formatting:format_stat(ship:evasion()), simple = true}
 
end
 
end
   Line 204: Line 203:  
evasion_max = ship:evasion()
 
evasion_max = ship:evasion()
 
end
 
end
return {value = Formatting:format_stat(evasion_max), text_align = ""}
+
return {value = Formatting:format_stat(evasion_max), simple = true}
 
end
 
end
    
function ShipListKai:speed(ship)
 
function ShipListKai:speed(ship)
return {value = Formatting:format_speed(ship:speed()), text_align = ""}
+
return {value = Formatting:format_speed(ship:speed()), simple = true}
 
end
 
end
    
function ShipListKai:aircraft(ship)
 
function ShipListKai:aircraft(ship)
return {value = Formatting:format_stat(ship:total_space()), text_align = ""}
+
return {value = Formatting:format_stat(ship:total_space()), simple = true}
 
end
 
end
    
function ShipListKai:range(ship)
 
function ShipListKai:range(ship)
return {value = Formatting:format_range(ship:range()), text_align = ""}
+
return {value = Formatting:format_range(ship:range()), simple = true}
 
end
 
end
    
function ShipListKai:fuel(ship)
 
function ShipListKai:fuel(ship)
return {value = Formatting:format_stat(ship:fuel()), text_align = ""}
+
return {value = Formatting:format_stat(ship:fuel()), simple = true}
 
end
 
end
    
function ShipListKai:ammo(ship)
 
function ShipListKai:ammo(ship)
return {value = Formatting:format_stat(ship:ammo()), text_align = ""}
+
return {value = Formatting:format_stat(ship:ammo()), simple = true}
 
end
 
end
   Line 272: Line 271:  
table.insert(build_info, self._remodel_to_label .. format{self._remodel_template, link = Formatting:fragment_link(tostring(remodel_to:api_id() or mw.ustring.lower(mw.ustring.gsub(remodel_to:name(), "%s+", self._dash))), self._fragment_prefix, remodel_to:name()), level = remodel_level})
 
table.insert(build_info, self._remodel_to_label .. format{self._remodel_template, link = Formatting:fragment_link(tostring(remodel_to:api_id() or mw.ustring.lower(mw.ustring.gsub(remodel_to:name(), "%s+", self._dash))), self._fragment_prefix, remodel_to:name()), level = remodel_level})
 
end
 
end
return {value = table.concat(build_info, "<br />"), text_align = "text-align: " .. self._start_align}
+
return {value = table.concat(build_info, "<br>"), text_align = "text-align: " .. self._start_align}
 
end
 
end
  
cssedit, gkautomate
6,926

edits