Aller au contenu

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

De Wikiquestia
Aucun résumé des modifications
Aucun résumé des modifications
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 1 : Ligne 1 :
local p = {}
local p = {}


function p.bandeau(frame)
function p.afficher(frame)
    local titre = frame.args["titre"] or "Bienvenue sur le Codex d’Alakihel"
    local sousTitre = frame.args["soustitre"] or "Le portail des royaumes oubliés, des langues anciennes et des légendes vivantes"
    local imageURL = "https://wiki.alakihel.ovh/images/3/3e/RdVW.png"
 
     local html = {}
     local html = {}


     table.insert(html, '<div style="')
    -- Conteneur principal avec dégradé
    table.insert(html, 'background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #cde4f2 100%), url(/images/3/3e/RdVW.png);')
     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, 'background-repeat: no-repeat, no-repeat;')
 
    table.insert(html, 'background-position: center top, bottom right;')
    -- Image de fond (fermée immédiatement)
    table.insert(html, 'background-size: 100% 100%, 120px;')
     table.insert(html, '<div style="position:absolute; bottom:0; right:0; width:100px; height:100px; background-image:url(' .. imageURL .. '); background-size:contain; background-repeat:no-repeat; opacity:0.3; pointer-events:none; z-index:0;"></div>')
    table.insert(html, 'padding: 2em 1.5em;')
    table.insert(html, 'margin-bottom: 24px;')
    table.insert(html, 'font-family: \'Linux Libertine\', Georgia, serif;')
    table.insert(html, 'text-align: center;')
     table.insert(html, 'border-bottom: 4px solid #6eacdc;">')


     table.insert(html, '<div style="font-size: 2.2em; font-weight: bold; color: #2c3e50;">Bienvenue sur le Codex d’Alakihel</div>')
    -- Texte en avant-plan
     table.insert(html, '<div style="font-size: 1.1em; color: #3b4f60; margin-top: 0.5em;">Le portail des royaumes oubliés, des langues anciennes et des légendes vivantes</div>')
    table.insert(html, '<div style="position:relative; z-index:1;">')
     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 texte


     table.insert(html, '</div>')
     table.insert(html, '</div>') -- fin conteneur principal


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


return p
return p

Dernière version du 13 juillet 2025 à 11:43

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

local p = {}

function p.afficher(frame)
    local titre = frame.args["titre"] or "Bienvenue sur le Codex d’Alakihel"
    local sousTitre = frame.args["soustitre"] or "Le portail des royaumes oubliés, des langues anciennes et des légendes vivantes"
    local imageURL = "https://wiki.alakihel.ovh/images/3/3e/RdVW.png"

    local html = {}

    -- Conteneur principal avec dégradé
    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;">')

    -- Image de fond (fermée immédiatement)
    table.insert(html, '<div style="position:absolute; bottom:0; right:0; width:100px; height:100px; background-image:url(' .. imageURL .. '); background-size:contain; background-repeat:no-repeat; opacity:0.3; pointer-events:none; z-index:0;"></div>')

    -- Texte en avant-plan
    table.insert(html, '<div style="position:relative; z-index:1;">')
    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 texte

    table.insert(html, '</div>') -- fin conteneur principal

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

return p