Module:MainPageBanner
From Jules RNG Wiki
More actions
Documentation for this module may be created at Module:MainPageBanner/doc
local p = {}
function p.render(frame)
local div = mw.html.create("div")
-- Add class for Common.css targeting
div:addClass('jule-main-banner')
div:css({
["display"] = "flow-root",
["margin"] = "0 0 1.5em 0",
["padding"] = "1.5em",
["text-align"] = "center",
["background"] = "var(--color-surface-2)",
["border"] = "1px solid var(--border-color-base)",
["border-radius"] = "var(--border-radius-base, 10px)",
["box-shadow"] = "var(--box-shadow-level-1)",
["color"] = "var(--color-base)",
["font-weight"] = "400",
})
-- Heading
div:tag("h2")
:css({["border-bottom"]="none", ["margin"]="0 0 10px 0", ["font-weight"]="bold", ["font-size"]="1.8em", ["line-height"]="1.2", ["font-family"]="var(--font-family-header)"})
:wikitext("Welcome to the Jule's RNG Wiki!")
-- Gallery Slider
local galleryImages = table.concat({
"image1=File:ThumbEvo13.png",
"image2=File:ThumbGen1.png",
"image3=File:ThumbGen2.png",
}, "|")
-- We still set a default height for desktop, but Common.css will override it on mobile
div:wikitext(frame:preprocess("{{Slider|height=400px|interval=4000|" .. galleryImages .. "}}"))
-- Sub-heading
div:tag("div"):css({["font-size"]="1.2em", ["font-weight"]="bold", ["margin-top"]="15px", ["font-style"]="italic"}):wikitext("Your ultimate guide to Jule's RNG!")
div:tag("div"):css({["color"]="var(--color-subtle)", ["font-style"]="italic", ["margin-top"]="5px", ["font-size"]="0.95em"}):wikitext("Learn about its Items, Auras, and Game Mechanics. We'd like you to help us edit this wiki!")
return tostring(div)
end
return p