Modulo:Mapframe/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
spostata e rivista gestione legenda in getLegenda, +mw.html |
use require('strict') instead of require('Module:No globals') |
||
(3 versioni intermedie di un altro utente non mostrate) | |||
Riga 1:
require('
local getArgs = require('Module:Arguments').getArgs
local mWikidata = require('Module:Wikidata')
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('border-radius', '6px')
:css('border', '2px solid ' .. point.col)
: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')
end
pNode:node(codeNode):wikitext(
divNode:node(pNode)
end
Line 51 ⟶ 59:
local gruppo = args.gruppo or ''
local autozoom = args.autozoom or 's'
local elenco = (args.elenco == '1' or args.elenco == '2') and args.elenco or nil
local dsimbolo = 'medium'
--if sinottico == 1 then dsimbolo = 'small' end
Line 135 ⟶ 144:
-- esclude didascalia per cornice = 0 e per sinottico = 1
if cornice == 1 and sinottico ~= 1 then
m_args.text = (args.didascalia or '') .. (
end
|