Modulo:Vedi anche/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
funzione loadCSS, in attesa di vedere a che sorte destinare il template Vedi anche sezione |
m Bot: rimuovo no globals obsoleto |
||
(3 versioni intermedie di un altro utente non mostrate) | |||
Riga 1:
--[[
* Modulo che implementa
]]
require('
-- Parsifica un argomento del template (rappresenta il titolo di una pagina) e ne restituisce il wikilink.
Riga 32:
--
-- @param {string} wikitext
-- @return {string}
local function buildHTML(wikitext
local tableNode = mw.html.create('table')
tableNode
:addClass('vedi-anche noprint')
:tag('tr')
:tag('td')
Line 48 ⟶ 46:
return tostring(tableNode)
local styles = 'Modulo:Vedi anche/sandbox/styles.css'▼
return mw.getCurrentFrame():extensionTag{▼
name = 'templatestyles',▼
args = {src = styles}▼
end
Line 64 ⟶ 53:
local p = {}
-- Funzione per il template {{Vedi anche}}.
function p.main(frame)
local lastArg, conjunction
▲ local styles = 'Modulo:Vedi anche/sandbox/styles.css'
local args = {}
Line 88 ⟶ 71:
end
return loadCSS(frame) .. buildHTML(mw.text.listToText(args, ', ', conjunction), true)▼
▲ name = 'templatestyles',
▲ args = {src = styles}
end
|