<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://wikisp.org/wiki/index.php?action=history&amp;feed=atom&amp;title=M%C3%B3dulo%3AMainpage%2FEvent</id>
	<title>Módulo:Mainpage/Event - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://wikisp.org/wiki/index.php?action=history&amp;feed=atom&amp;title=M%C3%B3dulo%3AMainpage%2FEvent"/>
	<link rel="alternate" type="text/html" href="https://wikisp.org/wiki/index.php?title=M%C3%B3dulo:Mainpage/Event&amp;action=history"/>
	<updated>2026-09-14T05:33:26Z</updated>
	<subtitle>Historial de revisiones de esta página en la wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wikisp.org/wiki/index.php?title=M%C3%B3dulo:Mainpage/Event&amp;diff=8136&amp;oldid=prev</id>
		<title>Luxbane: Página creada con «require(&#039;strict&#039;)  --- @module Mainpage/Event --- The event card built around a banner strip: the picture runs across the top --- of the card at the height it was drawn, the text sits under it, and the --- clock lies flat across the bottom. --- --- WHY THE BAND HOLDS 83px RATHER THAN SCALING. Every file in --- :Category:Main page banner images is 1080x83 — one uniform size, not a --- range. Scaling a 13:1 frieze to the width of a card leaves 55px of picture ---…»</title>
		<link rel="alternate" type="text/html" href="https://wikisp.org/wiki/index.php?title=M%C3%B3dulo:Mainpage/Event&amp;diff=8136&amp;oldid=prev"/>
		<updated>2026-09-11T23:24:13Z</updated>

		<summary type="html">&lt;p&gt;Página creada con «require(&amp;#039;strict&amp;#039;)  --- @module Mainpage/Event --- The event card built around a banner strip: the picture runs across the top --- of the card at the height it was drawn, the text sits under it, and the --- clock lies flat across the bottom. --- --- WHY THE BAND HOLDS 83px RATHER THAN SCALING. Every file in --- &lt;a href=&quot;/wiki/index.php?title=Categor%C3%ADa:Main_page_banner_images&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Categoría:Main page banner images (la página no existe)&quot;&gt;Category:Main page banner images&lt;/a&gt; is 1080x83 — one uniform size, not a --- range. Scaling a 13:1 frieze to the width of a card leaves 55px of picture ---…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
--- @module Mainpage/Event&lt;br /&gt;
--- The event card built around a banner strip: the picture runs across the top&lt;br /&gt;
--- of the card at the height it was drawn, the text sits under it, and the&lt;br /&gt;
--- clock lies flat across the bottom.&lt;br /&gt;
---&lt;br /&gt;
--- WHY THE BAND HOLDS 83px RATHER THAN SCALING. Every file in&lt;br /&gt;
--- [[:Category:Main page banner images]] is 1080x83 — one uniform size, not a&lt;br /&gt;
--- range. Scaling a 13:1 frieze to the width of a card leaves 55px of picture&lt;br /&gt;
--- at the full measure and 22px in the narrowest column, at which point the&lt;br /&gt;
--- ships in it are no longer legible as ships. Pinning the band at the file&amp;#039;s&lt;br /&gt;
--- own height and letting it crop sideways instead keeps everything at the&lt;br /&gt;
--- scale it was drawn at, and the card simply shows less of the strip as it&lt;br /&gt;
--- narrows: about two thirds of it at the full measure, about a quarter at the&lt;br /&gt;
--- narrowest.&lt;br /&gt;
---&lt;br /&gt;
--- WHAT TO CHECK WHEN SETTING A BANNER is therefore not its height, which is&lt;br /&gt;
--- fixed, but whether what matters in it survives a CENTRED crop — the card&lt;br /&gt;
--- shows the middle 27-66% of the file depending on how wide it is. A banner&lt;br /&gt;
--- whose logo sits near an edge loses it on a narrow screen.&lt;br /&gt;
---&lt;br /&gt;
--- Everything else follows from the strip. The card is one column at every&lt;br /&gt;
--- width, so nothing here changes shape with the viewport and the page owes it&lt;br /&gt;
--- no responsive overrides — which Module:Mainpage/Event/Legacy, built around a&lt;br /&gt;
--- portrait picture column, does need. That is the trade this layout buys.&lt;br /&gt;
&lt;br /&gt;
local cardLua = require(&amp;#039;Module:CardLua&amp;#039;)&lt;br /&gt;
local countdown = require(&amp;#039;Module:Countdown&amp;#039;)&lt;br /&gt;
local cfg = require(&amp;#039;Module:Mainpage/Config&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
--- The banners&amp;#039; own width. Requested rather than left at CardLua&amp;#039;s 480px&lt;br /&gt;
--- default because the band renders the file at 1:1 — a 480px thumbnail would&lt;br /&gt;
--- be scaled UP by a third to fill an 83px band.&lt;br /&gt;
local BANNER_WIDTH = 1080&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--- @return string|nil  nil when the settings carry no event, or no banner&lt;br /&gt;
function p.render()&lt;br /&gt;
	local event = cfg.section(&amp;#039;event&amp;#039;)&lt;br /&gt;
	if not event.name or not event.banner then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ends = cfg.toIso(event.ends)&lt;br /&gt;
&lt;br /&gt;
	local body = cardLua.renderMediaBody({&lt;br /&gt;
		kicker = &amp;#039;Event&amp;#039;,&lt;br /&gt;
		title = event.name,&lt;br /&gt;
		link = event.page,&lt;br /&gt;
		body = event.text,&lt;br /&gt;
		more = &amp;#039;Read more&amp;#039;,&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	-- Appended to the content rather than passed as the card&amp;#039;s footer. The&lt;br /&gt;
	-- banner layout is a column, so an element after the body is already a full&lt;br /&gt;
	-- width row across the bottom — and the footer would inset it and draw a&lt;br /&gt;
	-- second rule above the one the clock draws itself.&lt;br /&gt;
	--&lt;br /&gt;
	-- `t-countdown--flat` is Module:Countdown&amp;#039;s own modifier for lying down. The&lt;br /&gt;
	-- card asks for it rather than restyling the clock from the page, because&lt;br /&gt;
	-- the clock owns its arrangement and this card wants it flat at EVERY width&lt;br /&gt;
	-- — it is a single column throughout, so there is no viewport question to&lt;br /&gt;
	-- ask, which is the one thing a class cannot express and a media query can.&lt;br /&gt;
	--&lt;br /&gt;
	-- Only rendered when the event has an end date; a clock with nothing to&lt;br /&gt;
	-- count towards is worse than no clock. Guarded as well as validated:&lt;br /&gt;
	-- Module:Countdown raises on input it cannot read, and no single card is&lt;br /&gt;
	-- worth the page.&lt;br /&gt;
	if ends then&lt;br /&gt;
		local ok, clock = pcall(countdown.render, {&lt;br /&gt;
			starts = cfg.toIso(event.starts),&lt;br /&gt;
			ends = ends,&lt;br /&gt;
			class = &amp;#039;t-countdown--flat&amp;#039;,&lt;br /&gt;
		})&lt;br /&gt;
		if ok then&lt;br /&gt;
			body = body .. clock&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return cardLua.renderMediaCard({&lt;br /&gt;
		class = &amp;#039;home-card--read home-event-banner&amp;#039;,&lt;br /&gt;
		layout = &amp;#039;banner&amp;#039;,&lt;br /&gt;
		image = event.banner,&lt;br /&gt;
		imageWidth = BANNER_WIDTH,&lt;br /&gt;
		stretchLink = true,&lt;br /&gt;
		content = body,&lt;br /&gt;
	})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Luxbane</name></author>
	</entry>
</feed>