Modulo:Mapframe/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
spostata e rivista gestione legenda in getLegenda, +mw.html |
||
Riga 12:
end
local function
['column-count'] = ncols,
for _, s in ipairs(args) do▼
['-moz-column-count'] = ncols,
['-webkit-column-count'] = ncols
end▼
}
local divNode = mw.html.create('div'):css(divStyle)
local text
currNum = currNum + 1
text = ''
pNode:wikitext(text .. ' ' .. point.nome)
divNode:node(pNode)
return tostring(divNode)
end
Line 32 ⟶ 56:
if args.cornice then cornice = tonumber(args.cornice) or 1 else cornice = 1 end
local lat1, lat2, lon1, lon2 = 400, -400, 400, -400
▲ local elenco_num = 1
▲ local elenco_lett = 'A'
if geo == -1 then
Line 69 ⟶ 87:
end
num = num + 1
▲ end
▲ if points[i].simb:find('-number') == 1 then
▲ agg(elenco_dati, string.format(' <b>%d</b>.',elenco_num))
▲ elseif points[i].simb:find('-letter') == 1 then
▲ agg(elenco_dati, string.format(' <b>%s</b>.',elenco_lett))
▲ elenco_lett = ('ABCDEFGHIJKLMNOPQRSTUVWXYZA'):match(elenco_lett..'(.)')
▲ elseif points[i].simb == '' then
▲ else
▲ agg(elenco_dati, string.format('[[File:Maki2-%s-18.svg|18px]]',points[i].simb))
▲ agg(elenco_dati,string.format('<p style="font-size:90%%;border-left:4px solid %s">',points[i].col))
end
end
Line 151 ⟶ 135:
-- esclude didascalia per cornice = 0 e per sinottico = 1
if cornice == 1 and sinottico ~= 1 then
m_args.text = (args.didascalia or '') .. (args.elenco and getLegenda(points, args.elenco) or '')
end
|