Module:Sandbox/LVL: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 161: | Line 161: | ||
end | end | ||
-- Primary row | -- Primary row – hero cell contains toggle link + icon (no rowspan) | ||
local function generatePrimaryRow(hero_data, hero_key, has_alt) | local function generatePrimaryRow(hero_data, hero_key, has_alt) | ||
local row_str = "" | local row_str = "" | ||
| Line 171: | Line 171: | ||
local hero_cell_content = hero_icon | local hero_cell_content = hero_icon | ||
if has_alt then | if has_alt then | ||
hero_cell_content = '[[#alt-fire-' .. hero_key .. '|+]] ' .. hero_cell_content | hero_cell_content = '[[#alt-fire-' .. hero_key .. '|+]] ' .. hero_cell_content | ||
end | end | ||
row_str = row_str .. '<td style="position: sticky; left: 0; z-index: 10; background-color: #202122; isolation: isolate;">' .. hero_cell_content .. '</td>' | |||
row_str = row_str .. '<td style="position: sticky; left: 0; z-index: 10; background-color: #202122; isolation: isolate;" | |||
for _, category in ipairs(attribute_orders["category_order"]) do | for _, category in ipairs(attribute_orders["category_order"]) do | ||
| Line 187: | Line 185: | ||
end | end | ||
-- Alt-fire sub-row | -- Alt-fire sub-row – contains a smaller hero label + only weapon cells | ||
local function generateAltFireSubRow(hero_data, hero_key) | local function generateAltFireSubRow(hero_data, hero_key) | ||
local row_str = "" | local row_str = "" | ||
-- Hero cell: just a subtle "(Alt-fire)" label, same sticky styling | |||
row_str = row_str .. '<td style="position: sticky; left: 0; z-index: 9; background-color: #202122; isolation: isolate; font-size: 0.85em; color: #aaa;">(Alt‑fire)</td>' | |||
for _, category in ipairs(attribute_orders["category_order"]) do | for _, category in ipairs(attribute_orders["category_order"]) do | ||
if stats_to_include[category] ~= nil then | if stats_to_include[category] ~= nil then | ||
| Line 196: | Line 197: | ||
row_str = row_str .. buildStatCell(hero_data, hero_key, attr_key, true, category) | row_str = row_str .. buildStatCell(hero_data, hero_key, attr_key, true, category) | ||
else | else | ||
-- empty cell to keep column layout | |||
row_str = row_str .. '<td></td>' | row_str = row_str .. '<td></td>' | ||
end | end | ||