<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://hmoegirl.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AGallery</id>
	<title>Module:Gallery - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://hmoegirl.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AGallery"/>
	<link rel="alternate" type="text/html" href="https://hmoegirl.com/index.php?title=Module:Gallery&amp;action=history"/>
	<updated>2026-04-27T19:32:01Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60198&amp;oldid=prev</id>
		<title>2022年3月17日 (四) 01:32 imported&gt;Irukaza</title>
		<link rel="alternate" type="text/html" href="https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60198&amp;oldid=prev"/>
		<updated>2022-03-17T01:32:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://hmoegirl.com/index.php?title=Module:Gallery&amp;amp;diff=60198&amp;amp;oldid=60197&quot;&gt;显示更改&lt;/a&gt;</summary>
		<author><name>imported&gt;Irukaza</name></author>
	</entry>
	<entry>
		<id>https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60197&amp;oldid=prev</id>
		<title>2022年3月17日 (四) 01:29 imported&gt;Irukaza</title>
		<link rel="alternate" type="text/html" href="https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60197&amp;oldid=prev"/>
		<updated>2022-03-17T01:29:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年3月17日 (四) 09:29的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot;&gt;第11行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第11行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local filearg = &amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local filearg = &amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local height = &amp;#039;120&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local height = &amp;#039;120&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local prependarg = &amp;#039;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;File:&lt;/del&gt;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local prependarg = &amp;#039;[[&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local apprendarg = &amp;#039;|center|frameless|&amp;#039; .. &amp;#039;x&amp;#039; .. height .. &amp;#039;px]]&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local apprendarg = &amp;#039;|center|frameless|&amp;#039; .. &amp;#039;x&amp;#039; .. height .. &amp;#039;px]]&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Irukaza</name></author>
	</entry>
	<entry>
		<id>https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60196&amp;oldid=prev</id>
		<title>2022年3月17日 (四) 01:26 imported&gt;Irukaza</title>
		<link rel="alternate" type="text/html" href="https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60196&amp;oldid=prev"/>
		<updated>2022-03-17T01:26:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://hmoegirl.com/index.php?title=Module:Gallery&amp;amp;diff=60196&amp;amp;oldid=60195&quot;&gt;显示更改&lt;/a&gt;</summary>
		<author><name>imported&gt;Irukaza</name></author>
	</entry>
	<entry>
		<id>https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60195&amp;oldid=prev</id>
		<title>imported&gt;=海豚=：​创建页面，内容为“-- This module implements {{gallery}}  local p = {}  local templatestyles = &#039;Template:Gallery/styles.css&#039;  local function trim(s) 	return (mw.ustring.gsub(s, &quot;^%s*(.…”</title>
		<link rel="alternate" type="text/html" href="https://hmoegirl.com/index.php?title=Module:Gallery&amp;diff=60195&amp;oldid=prev"/>
		<updated>2020-04-03T09:26:49Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“-- This module implements {{gallery}}  local p = {}  local templatestyles = &amp;#039;Template:Gallery/styles.css&amp;#039;  local function trim(s) 	return (mw.ustring.gsub(s, &amp;quot;^%s*(.…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{gallery}}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local templatestyles = &amp;#039;Template:Gallery/styles.css&amp;#039;&lt;br /&gt;
&lt;br /&gt;
local function trim(s)&lt;br /&gt;
	return (mw.ustring.gsub(s, &amp;quot;^%s*(.-)%s*$&amp;quot;, &amp;quot;%1&amp;quot;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.gallery(frame)&lt;br /&gt;
	local origArgs&lt;br /&gt;
	-- If called via #invoke, use the args passed into the invoking template.&lt;br /&gt;
	-- Otherwise, for testing purposes, assume args are being passed directly in.&lt;br /&gt;
	if type(frame.getParent) == &amp;#039;function&amp;#039; then&lt;br /&gt;
		origArgs = frame:getParent().args&lt;br /&gt;
	else&lt;br /&gt;
		origArgs = frame&lt;br /&gt;
	end&lt;br /&gt;
    &lt;br /&gt;
    -- ParserFunctions considers the empty string to be false, so to preserve the previous &lt;br /&gt;
    -- behavior of {{gallery}}, change any empty arguments to nil, so Lua will consider&lt;br /&gt;
    -- them false too.&lt;br /&gt;
    local args = {}&lt;br /&gt;
    for k, v in pairs(origArgs) do&lt;br /&gt;
    	if v ~= &amp;#039;&amp;#039; then&lt;br /&gt;
    		args[k] = v&lt;br /&gt;
    	end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local tbl = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
	if args.state then&lt;br /&gt;
		tbl&lt;br /&gt;
			:addClass(&amp;#039;gallery-mod-collapsible&amp;#039;)&lt;br /&gt;
			:addClass(&amp;#039;collapsible&amp;#039;)&lt;br /&gt;
			:addClass(args.state)&lt;br /&gt;
			:addClass(args.class)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.style then&lt;br /&gt;
		tbl:cssText(args.style)&lt;br /&gt;
	else&lt;br /&gt;
		tbl&lt;br /&gt;
			:addClass(&amp;#039;gallery-mod&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.align then&lt;br /&gt;
		if args.align == &amp;#039;center&amp;#039; then&lt;br /&gt;
			tbl&lt;br /&gt;
				:addClass(&amp;#039;gallery-mod-center&amp;#039;)&lt;br /&gt;
		else&lt;br /&gt;
			tbl:css(&amp;#039;float&amp;#039;, args.align)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- &amp;lt;gallery&amp;gt;把packed的边框也取消了，所以这里给packed也设置不加边框&lt;br /&gt;
	if (args.mode or &amp;#039;&amp;#039;) == &amp;#039;nolines&amp;#039; or (args.mode or &amp;#039;&amp;#039;) == &amp;#039;packed&amp;#039; then&lt;br /&gt;
		tbl:addClass(&amp;#039;gallery-mod-nolines&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.title then&lt;br /&gt;
		tbl&lt;br /&gt;
			:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
					:addClass(&amp;#039;gallery-mod-title&amp;#039;)&lt;br /&gt;
					:wikitext(args.title)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local mainCell = tbl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	local imageCount = math.ceil(#args / 2)&lt;br /&gt;
	local cellWidth = tonumber(args.cellwidth) or tonumber(args.width) or 180&lt;br /&gt;
	local imgHeight = tonumber(args.height) or 180&lt;br /&gt;
	local lines = tonumber(args.lines) or 2&lt;br /&gt;
	local captionstyle = args.captionstyle&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
    for i = 1, imageCount do&lt;br /&gt;
		local img = trim(args[i*2 - 1] or &amp;#039;&amp;#039;)&lt;br /&gt;
		local caption = trim(args[i*2] or &amp;#039;&amp;#039;)&lt;br /&gt;
		local imgWidth = args[&amp;#039;width&amp;#039; .. i] or args.width or &amp;#039;180&amp;#039;&lt;br /&gt;
		local alt = args[&amp;#039;alt&amp;#039; .. i] or &amp;#039;&amp;#039;&lt;br /&gt;
		&lt;br /&gt;
		if (args.mode or &amp;#039;&amp;#039;) == &amp;#039;packed&amp;#039; then imgWidth = &amp;#039;&amp;#039; end&lt;br /&gt;
&lt;br /&gt;
		local textWidth&lt;br /&gt;
		if cellWidth &amp;lt; 30 then&lt;br /&gt;
			textWidth = imgHeight + 27&lt;br /&gt;
		else&lt;br /&gt;
			textWidth = cellWidth + 7&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if img ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			local imgTbl = mainCell:tag(&amp;#039;table&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
			local img_wikitext = function()&lt;br /&gt;
				if frame:callParserFunction{ name = &amp;#039;filepath&amp;#039;, args = { img:gsub(&amp;#039;^%s-[Ff][Ii][Ll][Ee]:&amp;#039;, &amp;#039;&amp;#039;) } } ~= &amp;#039;&amp;#039; then&lt;br /&gt;
					-- 内部图片&lt;br /&gt;
					return string.format(&amp;#039;[[%s|center|%sx%dpx|alt=%s|%s]]&amp;#039;, img, imgWidth, imgHeight, alt, mw.text.unstrip(caption))&lt;br /&gt;
				else&lt;br /&gt;
					-- 外部图片&lt;br /&gt;
					return string.format(&amp;#039;&amp;lt;img src=&amp;quot;%s&amp;quot; alt=&amp;quot;%s&amp;quot; style=&amp;quot;max-width:%spx; max-height:%dpx&amp;quot; &amp;gt;&amp;#039;, img, alt, imgWidth, imgHeight)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
            &lt;br /&gt;
			imgTbl&lt;br /&gt;
				:css(&amp;#039;width&amp;#039;, (cellWidth + 20) .. &amp;#039;px&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;gallery-mod-box&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
					:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
						:addClass(&amp;#039;thumb&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;height&amp;#039;, (imgHeight + 20) .. &amp;#039;px&amp;#039;)&lt;br /&gt;
						:wikitext(img_wikitext())&lt;br /&gt;
						:done()&lt;br /&gt;
					:done()&lt;br /&gt;
				:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
					:addClass(&amp;#039;gallery-mod-text&amp;#039;)&lt;br /&gt;
					:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
						:addClass(&amp;#039;core&amp;#039;)&lt;br /&gt;
						:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
							:addClass(&amp;#039;caption&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;min-height&amp;#039;, (0.1 + 1.5*lines) .. &amp;#039;em&amp;#039;)&lt;br /&gt;
							:css(&amp;#039;width&amp;#039;, textWidth .. &amp;#039;px&amp;#039;)&lt;br /&gt;
							:cssText(captionstyle)&lt;br /&gt;
							:wikitext(caption .. &amp;#039;&amp;amp;nbsp;&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
    &lt;br /&gt;
	if args.footer then&lt;br /&gt;
		tbl&lt;br /&gt;
			:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
				:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
					:addClass(&amp;#039;gallery-mod-footer&amp;#039;)&lt;br /&gt;
					:wikitext(args.footer)&lt;br /&gt;
	end&lt;br /&gt;
	if args.perrow then&lt;br /&gt;
		tbl:css(&amp;#039;width&amp;#039;, 8 + (cellWidth + 20 + 6)*tonumber(args.perrow) .. &amp;#039;px&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return frame:extensionTag{ name = &amp;#039;templatestyles&amp;#039;, args = { src = templatestyles} } .. tostring(tbl)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;=海豚=</name></author>
	</entry>
</feed>