Modulo:StileAttacco: differenze tra le versioni

Force recompile v2
Intestazioni esplicite
 
(Una versione intermedia di uno stesso utente non è mostrata)
Riga 19: Riga 19:
      
      
     if not args then
     if not args then
         return '<div style="color:red">DEBUG: nessun lead_holding_1 trovato</div>'
         return ''
    end
   
    -- Debug: show raw value of lead_holding_1
    local raw1 = args['lead_holding_1'] or 'NIL'
    local rawLen = #raw1
    local rawBytes = {}
    for i = 1, math.min(rawLen, 50) do
        table.insert(rawBytes, string.byte(raw1, i))
     end
     end
      
      
Riga 47: Riga 39:
      
      
     if #rows == 0 then
     if #rows == 0 then
         return '<div style="color:orange">DEBUG: raw1=[' .. raw1 .. '] len=' .. rawLen .. ' bytes=[' .. table.concat(rawBytes, ',') .. '] rows=0</div>'
         return ''
     end
     end
      
      
Riga 56: Riga 48:
      
      
     local headerRow = html:tag('tr')
     local headerRow = html:tag('tr')
     headerRow:tag('th'):css('width', '30%'):wikitext('Possesso')
     headerRow:tag('th'):css('width', '25%'):wikitext('Possesso')
     headerRow:tag('th'):css('width', '20%'):wikitext('vs Atout')
     headerRow:tag('th'):css('width', '20%'):wikitext('Attacco vs Atout')
     headerRow:tag('th'):css('width', '20%'):wikitext('vs SA')
     headerRow:tag('th'):css('width', '20%'):wikitext('Attacco vs SA')
     headerRow:tag('th'):css('width', '30%'):wikitext('Comp.')
     headerRow:tag('th'):css('width', '35%'):wikitext('Su attacco del compagno')
      
      
     for _, row in ipairs(rows) do
     for _, row in ipairs(rows) do
Riga 73: Riga 65:


return p
return p
-- v2