Modulo:Mapframe/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
spostata e rivista gestione legenda in getLegenda, +mw.html |
utilizzo del tag code per la legenda |
||
Riga 23:
for _, point in ipairs(points) do
local pNode = mw.html.create('p'):
local codeNode = mw.html.create('code')
:css('font-weight', 'bold')
:css('color', 'white')
:css('background', point.col)
if point.simb:find('-number') == 1 then
currNum = currNum + 1
elseif point.simb:find('-letter') == 1 then
currChar = ('ABCDEFGHIJKLMNOPQRSTUVWXYZA'):match(currChar .. '(.)')
elseif point.simb == '' then
else
codeNode
text = string.format('[[File:Maki2-%s-18.svg|18px]]', point.simb)▼
:css('padding-left', '0')
:css('padding-right', '0')
:css('background', 'white')
:css('border', '2px solid ' .. point.col)
end
pNode:node(codeNode):wikitext(
divNode:node(pNode)
end
|