62 737
modifications
Page créée avec « local p = {} function p.build(frame) local data = require( 'Module:Bandeau de source/Données' )[frame.args.nom] local arg = frame.args[1] or '' local text = '' i… » |
mAucun résumé des modifications |
||
Ligne 2 : | Ligne 2 : | ||
function p.build(frame) | function p.build(frame) | ||
local | local args = require( 'Module:Outils' ).extractArgs( frame ) | ||
local | local bannerType = args[1] or '' | ||
local text = '' | local source = args['source'] or 'source ?' | ||
local link = args['lien'] or '' | |||
local image = args['image'] or 'bandeau de source - defaut.png' | |||
local text = args['texte'] or '' | |||
if | local bannerText = '' | ||
if bannerType == 'fin' then | |||
bannerText = 'Fin des informations basées sur ' .. source .. '.' | |||
else | else | ||
bannerText = 'Les informations suivantes se basent sur ' .. source | |||
if text == 'vide' then | if text == 'vide' then | ||
bannerText = bannerText .. '.' | |||
elseif text == 'contradiction' then | elseif text == 'contradiction' then | ||
bannerText = bannerText .. ' et sont contredites par les sources officielles.' | |||
elseif text == 'avant-première' then | elseif text == 'avant-première' then | ||
bannerText = bannerText .. ' et peuvent être inexactes ou contenir des \'\'spoilers\'\'.' | |||
elseif text == 'semi' then | elseif text == 'semi' then | ||
bannerText = bannerText .. ' et certains détails peuvent contredire les sources officielles.' | |||
else | else | ||
text = text .. ' et n\'ont pas été confirmées par des sources officielles.' | text = text .. ' et n\'ont pas été confirmées par des sources officielles.' | ||
Ligne 29 : | Ligne 34 : | ||
:tag( 'div' ) | :tag( 'div' ) | ||
:addClass( 'avt-source-banner-img' ) | :addClass( 'avt-source-banner-img' ) | ||
:wikitext( '[[Fichier:' . | :wikitext( '[[Fichier:' .. image .. '|x25px|link=' .. link .. '|alt=]]' ) | ||
:done() | :done() | ||
:tag( 'p' ) | :tag( 'p' ) | ||
:addClass( 'avt-source-banner-text' ) | :addClass( 'avt-source-banner-text' ) | ||
:wikitext( | :wikitext( bannerText ) | ||
:allDone() | :allDone() | ||
end | end | ||
return p | return p |
modifications