Aller au contenu

« Module:EnteteAccueil » : différence entre les versions

De Wikiquestia
Page créée avec « local p = {} function p.afficher(frame) local titre = frame.args["titre"] or "Bienvenue sur le Codex d’Alakihel" local sousTitre = frame.args["sous-titre"] or "Le portail des royaumes oubliés, des langues anciennes et des légendes vivantes" local pictogramURL = "https://wiki.alakihel.ovh/images/d/d4/RdVW.png" local html = {} table.insert(html, '<div class="accueil-picto" style="position: relative; background: linear-gradient(to bottom, rgba(255,255,... »
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
local p = {}
local p = {}


function p.afficher(frame)
function p.entete(frame)
local titre = frame.args["titre"] or "Bienvenue sur le Codex d’Alakihel"
    local titre = frame.args["titre"] or "Bienvenue sur le Codex d’Alakihel"
local sousTitre = frame.args["sous-titre"] or "Le portail des royaumes oubliés, des langues anciennes et des légendes vivantes"
    local sousTitre = frame.args["sous-titre"] or "Le portail des royaumes oubliés, des langues anciennes et des légendes vivantes"
local pictogramURL = "https://wiki.alakihel.ovh/images/d/d4/RdVW.png"
local html = {}
table.insert(html, '<div class="accueil-picto" style="position: relative; background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #cde4f2 100%); padding: 2em 1.5em; margin-bottom: 24px; font-family: \'Linux Libertine\', Georgia, serif; text-align: center; border-bottom: 4px solid #6eacdc; overflow: hidden;">')


table.insert(html, '<div style="position: relative; z-index: 1;">')
    local html = {}
table.insert(html, '<div style="font-size: 2.2em; font-weight: bold; color: #2c3e50;">' .. titre .. '</div>')
table.insert(html, '<div style="font-size: 1.1em; color: #3b4f60; margin-top: 0.5em;">' .. sousTitre .. '</div>')
table.insert(html, '</div>') -- fin contenu


table.insert(html, '</div>') -- fin bloc principal
    table.insert(html, '<div style="position: relative; background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #cde4f2 100%), url(\'https://wiki.alakihel.ovh/images/d/d4/RdVW.png\'); background-repeat: no-repeat; background-position: bottom right; background-size: 160px; padding: 2em 1.5em; margin-bottom: 24px; font-family: \'Linux Libertine\', Georgia, serif; text-align: center; border-bottom: 4px solid #6eacdc; overflow: hidden;">')
   
return table.concat(html, "\n")
    table.insert(html, '<div style="font-size: 2.2em; font-weight: bold; color: #2c3e50;">' .. titre .. '</div>')
    table.insert(html, '<div style="font-size: 1.1em; color: #3b4f60; margin-top: 0.5em;">' .. sousTitre .. '</div>')
   
    table.insert(html, '</div>')
 
    return table.concat(html, "\n")
end
end


return p
return p

Version du 13 juillet 2025 à 11:24

La documentation pour ce module peut être créée à Module:EnteteAccueil/doc

local p = {}

function p.entete(frame)
    local titre = frame.args["titre"] or "Bienvenue sur le Codex d’Alakihel"
    local sousTitre = frame.args["sous-titre"] or "Le portail des royaumes oubliés, des langues anciennes et des légendes vivantes"

    local html = {}

    table.insert(html, '<div style="position: relative; background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #cde4f2 100%), url(\'https://wiki.alakihel.ovh/images/d/d4/RdVW.png\'); background-repeat: no-repeat; background-position: bottom right; background-size: 160px; padding: 2em 1.5em; margin-bottom: 24px; font-family: \'Linux Libertine\', Georgia, serif; text-align: center; border-bottom: 4px solid #6eacdc; overflow: hidden;">')
    
    table.insert(html, '<div style="font-size: 2.2em; font-weight: bold; color: #2c3e50;">' .. titre .. '</div>')
    table.insert(html, '<div style="font-size: 1.1em; color: #3b4f60; margin-top: 0.5em;">' .. sousTitre .. '</div>')
    
    table.insert(html, '</div>')

    return table.concat(html, "\n")
end

return p