<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.shroudforge.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AMainpage%2FNav</id>
	<title>Module:Mainpage/Nav - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.shroudforge.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AMainpage%2FNav"/>
	<link rel="alternate" type="text/html" href="https://wiki.shroudforge.net/index.php?title=Module:Mainpage/Nav&amp;action=history"/>
	<updated>2026-11-05T02:41:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.shroudforge.net/index.php?title=Module:Mainpage/Nav&amp;diff=10&amp;oldid=prev</id>
		<title>Bonsaibauer: 1 revision imported: Import of Star-Citizen-Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.shroudforge.net/index.php?title=Module:Mainpage/Nav&amp;diff=10&amp;oldid=prev"/>
		<updated>2026-11-04T21:58:40Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Import of Star-Citizen-Modules&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:58, 4 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key mediawiki-mediawiki:diff:1.41:old-9:rev-10 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bonsaibauer</name></author>
	</entry>
	<entry>
		<id>https://wiki.shroudforge.net/index.php?title=Module:Mainpage/Nav&amp;diff=9&amp;oldid=prev</id>
		<title>starcitizen&gt;Alistar Bot: Read the link lists from Config; loading is no longer this module&#039;s job (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.shroudforge.net/index.php?title=Module:Mainpage/Nav&amp;diff=9&amp;oldid=prev"/>
		<updated>2026-08-26T20:58:50Z</updated>

		<summary type="html">&lt;p&gt;Read the link lists from Config; loading is no longer this module&amp;#039;s job (via update-page on MediaWiki MCP Server)&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;
--- @module Mainpage/Nav&lt;br /&gt;
--- The page&amp;#039;s two link lists — the hero&amp;#039;s chip strip and the directory at the&lt;br /&gt;
--- foot — and the one function that turns a settings entry into wikitext.&lt;br /&gt;
---&lt;br /&gt;
--- Loading belongs to Module:Mainpage/Config; this module only shapes what&lt;br /&gt;
--- comes back. It exists separately because rendering a link is a concern of&lt;br /&gt;
--- its own: two callers need the same treatment of internal versus external&lt;br /&gt;
--- targets, and neither should have to know how a settings entry is spelled.&lt;br /&gt;
&lt;br /&gt;
local cfg = require(&amp;#039;Module:Mainpage/Config&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--- @class NavLink&lt;br /&gt;
--- @field page? string   Internal target. Mutually exclusive with `url`.&lt;br /&gt;
--- @field url? string    External target. Mutually exclusive with `page`.&lt;br /&gt;
--- @field label? string  Display text. Optional for `page`, required for `url`.&lt;br /&gt;
&lt;br /&gt;
--- Renders one link as wikitext rather than as an &amp;lt;a&amp;gt; element, so MediaWiki&lt;br /&gt;
--- builds the href, applies the cached page-existence class (a red link stays&lt;br /&gt;
--- visibly red here), and picks up the reader&amp;#039;s language variant.&lt;br /&gt;
---&lt;br /&gt;
--- An external link is emitted in single-bracket form; suppressing its arrow&lt;br /&gt;
--- icon is the caller&amp;#039;s job, by putting `plainlinks` on the containing&lt;br /&gt;
--- element.&lt;br /&gt;
---&lt;br /&gt;
--- @param link NavLink&lt;br /&gt;
--- @return string|nil  nil when the entry names no target at all&lt;br /&gt;
function p.renderLink(link)&lt;br /&gt;
	if link.url and link.url ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		return string.format(&amp;#039;[%s %s]&amp;#039;, link.url, link.label or link.url)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not link.page or link.page == &amp;#039;&amp;#039; then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if link.label and link.label ~= &amp;#039;&amp;#039; and link.label ~= link.page then&lt;br /&gt;
		return string.format(&amp;#039;[[%s|%s]]&amp;#039;, link.page, link.label)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return string.format(&amp;#039;[[%s]]&amp;#039;, link.page)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- True when any entry in the group points off-wiki, which is what decides&lt;br /&gt;
--- whether the group needs `plainlinks`. Checked per group rather than applied&lt;br /&gt;
--- to the whole directory so an all-internal group is not given a class that&lt;br /&gt;
--- does nothing.&lt;br /&gt;
---&lt;br /&gt;
--- @param links NavLink[]&lt;br /&gt;
--- @return boolean&lt;br /&gt;
function p.hasExternal(links)&lt;br /&gt;
	for _, link in ipairs(links) do&lt;br /&gt;
		if link.url and link.url ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- The hero&amp;#039;s chip strip.&lt;br /&gt;
--- @return NavLink[]&lt;br /&gt;
function p.chips()&lt;br /&gt;
	return cfg.list(&amp;#039;chips&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- The foot directory, as a list of { label, links } groups.&lt;br /&gt;
--- @return table[]&lt;br /&gt;
function p.directory()&lt;br /&gt;
	return cfg.list(&amp;#039;directory&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>starcitizen&gt;Alistar Bot</name></author>
	</entry>
</feed>