<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://cherry-pi.tailb1a250.ts.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfoboxLua%2FComponents%2FCollapsible</id>
	<title>Module:InfoboxLua/Components/Collapsible - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://cherry-pi.tailb1a250.ts.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfoboxLua%2FComponents%2FCollapsible"/>
	<link rel="alternate" type="text/html" href="https://cherry-pi.tailb1a250.ts.net/index.php?title=Module:InfoboxLua/Components/Collapsible&amp;action=history"/>
	<updated>2026-11-11T01:30:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://cherry-pi.tailb1a250.ts.net/index.php?title=Module:InfoboxLua/Components/Collapsible&amp;diff=365&amp;oldid=prev</id>
		<title>Gravy: Created page with &quot;require( &#039;strict&#039; )  local details -- lazyload Module:Details local util = require( &#039;Module:InfoboxLua/Util&#039; ) local types = require( &#039;Module:InfoboxLua/Types&#039; )  local p = {}  --- @param content string --- @return mw.html local function getContentHtml( content ) 	local html = mw.html.create( &#039;div&#039; ):addClass( &#039;t-infobox-collapsible-content&#039; ) 	html:wikitext( tostring( content ) ) 	return html end  --- @param summary string --- @return mw.html local function getButto...&quot;</title>
		<link rel="alternate" type="text/html" href="https://cherry-pi.tailb1a250.ts.net/index.php?title=Module:InfoboxLua/Components/Collapsible&amp;diff=365&amp;oldid=prev"/>
		<updated>2026-06-14T02:20:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;require( &amp;#039;strict&amp;#039; )  local details -- lazyload &lt;a href=&quot;/index.php/Module:Details&quot; title=&quot;Module:Details&quot;&gt;Module:Details&lt;/a&gt; local util = require( &amp;#039;Module:InfoboxLua/Util&amp;#039; ) local types = require( &amp;#039;Module:InfoboxLua/Types&amp;#039; )  local p = {}  --- @param content string --- @return mw.html local function getContentHtml( content ) 	local html = mw.html.create( &amp;#039;div&amp;#039; ):addClass( &amp;#039;t-infobox-collapsible-content&amp;#039; ) 	html:wikitext( tostring( content ) ) 	return html end  --- @param summary string --- @return mw.html local function getButto...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require( &amp;#039;strict&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
local details -- lazyload [[Module:Details]]&lt;br /&gt;
local util = require( &amp;#039;Module:InfoboxLua/Util&amp;#039; )&lt;br /&gt;
local types = require( &amp;#039;Module:InfoboxLua/Types&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--- @param content string&lt;br /&gt;
--- @return mw.html&lt;br /&gt;
local function getContentHtml( content )&lt;br /&gt;
	local html = mw.html.create( &amp;#039;div&amp;#039; ):addClass( &amp;#039;t-infobox-collapsible-content&amp;#039; )&lt;br /&gt;
	html:wikitext( tostring( content ) )&lt;br /&gt;
	return html&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- @param summary string&lt;br /&gt;
--- @return mw.html&lt;br /&gt;
local function getButtonHtml( summary )&lt;br /&gt;
	local html = mw.html.create()&lt;br /&gt;
&lt;br /&gt;
	html:tag( &amp;#039;div&amp;#039; )&lt;br /&gt;
		:addClass( &amp;#039;citizen-ui-icon mw-ui-icon-wikimedia-collapse&amp;#039; )&lt;br /&gt;
		:done()&lt;br /&gt;
		:wikitext( tostring( summary ) )&lt;br /&gt;
&lt;br /&gt;
	return html&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the mw.html object of the infobox collapsible component.&lt;br /&gt;
---&lt;br /&gt;
--- @param data table&lt;br /&gt;
--- @return mw.html|nil&lt;br /&gt;
function p.getHtml( data )&lt;br /&gt;
	--- @type CollapsibleComponentData|nil&lt;br /&gt;
	local collapsible = util.validateAndConstruct( data, types.CollapsibleComponentDataSchema )&lt;br /&gt;
&lt;br /&gt;
	if not collapsible then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	details = details or require( &amp;#039;Module:Details&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
	local html = mw.html.create()&lt;br /&gt;
&lt;br /&gt;
	local wikitext = details.getWikitext( {&lt;br /&gt;
		details = {&lt;br /&gt;
			content = tostring( getContentHtml( collapsible.content ) ),&lt;br /&gt;
			class = &amp;#039;t-infobox-collapsible &amp;#039; .. (collapsible.class or &amp;#039;&amp;#039;),&lt;br /&gt;
			open = collapsible.open ~= false -- default to open&lt;br /&gt;
		},&lt;br /&gt;
		summary = {&lt;br /&gt;
			content = tostring( getButtonHtml( collapsible.summary ) ),&lt;br /&gt;
			class = &amp;#039;t-infobox-collapsible-button &amp;#039; .. (collapsible.summaryClass or &amp;#039;&amp;#039;),&lt;br /&gt;
		}&lt;br /&gt;
	} )&lt;br /&gt;
&lt;br /&gt;
	html:wikitext( wikitext )&lt;br /&gt;
&lt;br /&gt;
	return html&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Gravy</name></author>
	</entry>
</feed>