<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://yezur.xyz/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox</id>
	<title>Module:Infobox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://yezur.xyz/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox"/>
	<link rel="alternate" type="text/html" href="https://yezur.xyz/w/index.php?title=Module:Infobox&amp;action=history"/>
	<updated>2026-07-14T15:24:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://yezur.xyz/w/index.php?title=Module:Infobox&amp;diff=15&amp;oldid=prev</id>
		<title>Khurouan: Generic infobox renderer</title>
		<link rel="alternate" type="text/html" href="https://yezur.xyz/w/index.php?title=Module:Infobox&amp;diff=15&amp;oldid=prev"/>
		<updated>2026-07-13T21:34:32Z</updated>

		<summary type="html">&lt;p&gt;Generic infobox renderer&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module:Infobox — generic infobox renderer for the Yezur wiki.&lt;br /&gt;
-- Emits a floating infobox styled by [[Template:Infobox/styles.css]] via&lt;br /&gt;
-- TemplateStyles. Wrapper templates (e.g. Template:Infobox polity) map their&lt;br /&gt;
-- own fields onto title / subtitle / image / caption and numbered&lt;br /&gt;
-- header / label / data slots, then call {{#invoke:Infobox|render|...}}.&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function clean(s)&lt;br /&gt;
	if s == nil then return nil end&lt;br /&gt;
	s = mw.text.trim(s)&lt;br /&gt;
	if s == &amp;#039;&amp;#039; then return nil end&lt;br /&gt;
	return s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.render(frame)&lt;br /&gt;
	local a = frame.args&lt;br /&gt;
	local root = mw.html.create(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	root:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;yz-infobox-title&amp;#039;)&lt;br /&gt;
		:wikitext(clean(a.title) or mw.title.getCurrentTitle().text)&lt;br /&gt;
&lt;br /&gt;
	local subtitle = clean(a.subtitle)&lt;br /&gt;
	if subtitle then&lt;br /&gt;
		root:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox-subtitle&amp;#039;):wikitext(subtitle)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local image = clean(a.image)&lt;br /&gt;
	if image then&lt;br /&gt;
		local box = root:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox-image&amp;#039;)&lt;br /&gt;
		box:wikitext(&amp;#039;[[File:&amp;#039; .. image .. &amp;#039;|frameless|280x280px]]&amp;#039;)&lt;br /&gt;
		local caption = clean(a.caption)&lt;br /&gt;
		if caption then&lt;br /&gt;
			box:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox-caption&amp;#039;):wikitext(caption)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for i = 1, 100 do&lt;br /&gt;
		local header = clean(a[&amp;#039;header&amp;#039; .. i])&lt;br /&gt;
		local label  = clean(a[&amp;#039;label&amp;#039; .. i])&lt;br /&gt;
		local data   = clean(a[&amp;#039;data&amp;#039; .. i])&lt;br /&gt;
		if header then&lt;br /&gt;
			root:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox-header&amp;#039;):wikitext(header)&lt;br /&gt;
		elseif data then&lt;br /&gt;
			local row = root:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox-row&amp;#039;)&lt;br /&gt;
			if label then&lt;br /&gt;
				row:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox-label&amp;#039;):wikitext(label)&lt;br /&gt;
			end&lt;br /&gt;
			row:tag(&amp;#039;div&amp;#039;):addClass(&amp;#039;yz-infobox-data&amp;#039;):wikitext(data)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local styles = frame:extensionTag{&lt;br /&gt;
		name = &amp;#039;templatestyles&amp;#039;,&lt;br /&gt;
		args = { src = &amp;#039;Template:Infobox/styles.css&amp;#039; }&lt;br /&gt;
	}&lt;br /&gt;
	return styles .. tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Khurouan</name></author>
	</entry>
</feed>