cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

commit 4f35c15f93b48775b26dfe64845e8cba35377588
parent 5de08db5ece4a435c6deac2c094babb65aaaf2eb
Author: MTRNord <MTRNord@users.noreply.github.com>
Date:   Sat, 18 Apr 2026 15:52:55 +0200

fix templates and add infobox for servers

Signed-off-by: MTRNord <MTRNord@users.noreply.github.com>

Diffstat:
Aapps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_server.wikitext | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aapps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_server_styles.css | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mapps/talos_cluster/mediawiki/wiki-templates/Template_License.wikitext | 23++++++++++++++++++++++-
Mapps/talos_cluster/mediawiki/wiki-templates/Template_License_styles.css | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
4 files changed, 273 insertions(+), 12 deletions(-)

diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_server.wikitext b/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_server.wikitext @@ -0,0 +1,81 @@ +<templatestyles src="Template:Infobox server/styles.css" /><div class="infobox-server"> +<div class="infobox-server-title">{{{name|Server}}}</div>{{#if:{{{subtitle|}}}|<div class="infobox-server-subtitle">{{{subtitle}}}</div>}}{{#if:{{{image|}}}|<div class="infobox-server-image">[[File:{{{image}}}|220px]]{{#if:{{{caption|}}}|<br/><small>{{{caption}}}</small>}}</div>}}<table> +{{#if:{{{status|}}}|<tr><td class="infobox-label">Status</td><td>{{#switch:{{{status}}}|active=<span class="infobox-status-active">● Active</span>|maintenance=<span class="infobox-status-maintenance">● Maintenance</span>|decommissioned=<span class="infobox-status-decommissioned">● Decommissioned</span>|{{{status}}}}}</td></tr>}} +{{#if:{{{type|}}}|<tr><td class="infobox-label">Type</td><td>{{{type}}}</td></tr>}} +{{#if:{{{purpose|}}}|<tr><td class="infobox-label">Purpose</td><td>{{{purpose}}}</td></tr>}} +{{#if:{{{hostname|}}}|<tr><td class="infobox-label">Hostname</td><td><code>{{{hostname}}}</code></td></tr>}} +{{#if:{{{ipv4|}}}|<tr><td class="infobox-label">IPv4</td><td><code>{{{ipv4}}}</code></td></tr>}} +{{#if:{{{ipv6|}}}|<tr><td class="infobox-label">IPv6</td><td><code>{{{ipv6}}}</code></td></tr>}} +{{#if:{{{location|}}}|<tr><td class="infobox-label">Location</td><td>{{{location}}}</td></tr>}} +{{#if:{{{provider|}}}|<tr><td class="infobox-label">Provider</td><td>{{{provider}}}</td></tr>}} +{{#if:{{{os|}}}|<tr><td class="infobox-label">OS</td><td>{{{os}}}</td></tr>}} +{{#if:{{{software|}}}|<tr><td colspan="2" class="infobox-server-section">Software</td></tr><tr><td class="infobox-label">Software</td><td>{{{software}}}</td></tr>}} +{{#if:{{{software_version|}}}|<tr><td class="infobox-label">Version</td><td>{{{software_version}}}</td></tr>}} +{{#if:{{{software2|}}}|<tr><td class="infobox-label">{{{software2_label|Software 2}}}</td><td>{{{software2}}}</td></tr>}} +{{#if:{{{upstream|}}}|<tr><td class="infobox-label">Upstream DNS</td><td>{{{upstream}}}</td></tr>}} +{{#if:{{{zones|}}}|<tr><td class="infobox-label">Zones</td><td>{{{zones}}}</td></tr>}} +{{#if:{{{since|}}}|<tr><td colspan="2" class="infobox-server-section">History</td></tr><tr><td class="infobox-label">Online since</td><td>{{{since}}}</td></tr>}} +{{#if:{{{notes|}}}|<tr><td colspan="2" class="infobox-server-section">Notes</td></tr><tr><td colspan="2" style="padding:4px 6px;">{{{notes}}}</td></tr>}} +</table></div><noinclude> +== Usage == + +<pre> +{{Infobox server +| name = dns-a +| subtitle = Primary DNS resolver +| status = active +| type = DNS server +| purpose = Authoritative + recursive DNS for cluster +| hostname = dns-a.midnightthoughts.space +| ipv4 = 10.0.64.129 +| ipv6 = +| location = Nuremberg, DE (Hetzner) +| provider = Hetzner +| os = Fedora 43 (LXC) +| software = Unbound / BIND +| software_version = 1.19.0 +| upstream = 1.1.1.1, 8.8.8.8 +| zones = midnightthoughts.space, mtrnord.blog +| since = 2025-01-01 +| notes = Also serves as registry mirror endpoint. +}} +</pre> + +All parameters are optional — omit any you don't need and the row won't appear. + +=== Status values === +* <code>active</code> — green badge +* <code>maintenance</code> — orange badge +* <code>decommissioned</code> — red badge +* Any other text is shown as-is. + +<templatedata> +{ + "description": "Infobox for infrastructure servers and nodes. All parameters are optional.", + "params": { + "name": { "label": "Name", "type": "string", "required": true, "description": "Server or node name shown in the header." }, + "subtitle": { "label": "Subtitle", "type": "string", "description": "Short descriptor shown below the header, e.g. 'Primary DNS resolver'." }, + "image": { "label": "Image", "type": "wiki-file-name", "description": "Optional image filename (without File: prefix)." }, + "caption": { "label": "Caption", "type": "string", "description": "Caption for the image." }, + "status": { "label": "Status", "type": "string", "suggestedvalues": ["active","maintenance","decommissioned"] }, + "type": { "label": "Type", "type": "string", "description": "e.g. DNS server, web server, database." }, + "purpose": { "label": "Purpose", "type": "string" }, + "hostname": { "label": "Hostname", "type": "string" }, + "ipv4": { "label": "IPv4 address", "type": "string" }, + "ipv6": { "label": "IPv6 address", "type": "string" }, + "location": { "label": "Location", "type": "string", "description": "Datacenter or city." }, + "provider": { "label": "Provider", "type": "string" }, + "os": { "label": "Operating system", "type": "string" }, + "software": { "label": "Software", "type": "string" }, + "software_version": { "label": "Software version", "type": "string" }, + "software2": { "label": "Software 2", "type": "string" }, + "software2_label": { "label": "Software 2 label", "type": "string" }, + "upstream": { "label": "Upstream DNS", "type": "string", "description": "Upstream resolvers (DNS servers only)." }, + "zones": { "label": "Zones", "type": "string", "description": "DNS zones served (DNS servers only)." }, + "since": { "label": "Online since", "type": "date" }, + "notes": { "label": "Notes", "type": "string" } + }, + "format": "block" +} +</templatedata> +</noinclude> diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_server_styles.css b/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_server_styles.css @@ -0,0 +1,73 @@ +.infobox-server { + float: right; + clear: right; + margin: 0 0 1em 1.5em; + border: 1px solid var(--border-color-base, #a2a9b1); + background: var(--background-color-neutral-subtle, #f8f9fa); + color: var(--color-base, #202122); + font-size: 88%; + line-height: 1.5; + width: 22em; +} +.infobox-server-title { + background: #3366cc; + color: #fff; + font-size: 115%; + font-weight: bold; + text-align: center; + padding: 5px 8px; +} +.infobox-server-subtitle { + background: var(--background-color-neutral, #eaecf0); + color: var(--color-subtle, #54595d); + text-align: center; + font-style: italic; + padding: 3px 8px; + border-bottom: 1px solid var(--border-color-base, #a2a9b1); +} +.infobox-server-image { + text-align: center; + padding: 6px; + border-bottom: 1px solid var(--border-color-subtle, #c8ccd1); +} +.infobox-server table { + width: 100%; + border-collapse: collapse; +} +.infobox-server td { + padding: 3px 6px; + vertical-align: top; + border-top: 1px solid var(--border-color-subtle, #c8ccd1); +} +.infobox-server .infobox-label { + font-weight: bold; + width: 40%; + color: var(--color-subtle, #54595d); +} +.infobox-server-section { + background: var(--background-color-neutral, #eaecf0); + color: var(--color-base, #202122); + font-weight: bold; + text-align: center; + padding: 2px 6px; + border-top: 1px solid var(--border-color-base, #a2a9b1); +} + +/* Status badges — light mode */ +.infobox-status-active { color: #2a7a2a; font-weight: bold; } +.infobox-status-maintenance { color: #b36200; font-weight: bold; } +.infobox-status-decommissioned { color: #c00; font-weight: bold; } + +/* Status badges — manual Night toggle */ +@media screen { + html.skin-theme-clientpref-night .infobox-status-active { color: #6ecf6e; } + html.skin-theme-clientpref-night .infobox-status-maintenance { color: #ffb347; } + html.skin-theme-clientpref-night .infobox-status-decommissioned { color: #ff6b6b; } +} + +/* Status badges — OS dark preference */ +@media screen and (prefers-color-scheme: dark) { + html.skin-theme-clientpref-os .infobox-status-active { color: #6ecf6e; } + html.skin-theme-clientpref-os .infobox-status-maintenance { color: #ffb347; } + html.skin-theme-clientpref-os .infobox-status-decommissioned { color: #ff6b6b; } +} diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_License.wikitext b/apps/talos_cluster/mediawiki/wiki-templates/Template_License.wikitext @@ -43,7 +43,28 @@ <span style="color:red">Unknown license: <code>{{{1}}}</code></span> }}<noinclude> == Usage == -<pre>{{License|cc-by}}</pre> +Add <code><nowiki>{{License|cc-by-sa}}</nowiki></code> (or any variant below) to the top of a page to display a floating license box. + +== Available licenses == +{| class="wikitable" +! Code !! Full name !! Description +|- +| <code>cc-by</code> || [https://creativecommons.org/licenses/by/4.0/ CC BY 4.0] || Free to share and adapt for any purpose, including commercially, as long as you give attribution. +|- +| <code>cc-by-sa</code> || [https://creativecommons.org/licenses/by-sa/4.0/ CC BY-SA 4.0] || Same as CC BY, but derivatives must be shared under the same license (copyleft). +|- +| <code>cc-by-nc</code> || [https://creativecommons.org/licenses/by-nc/4.0/ CC BY-NC 4.0] || Share and adapt with attribution, but not for commercial purposes. +|- +| <code>cc-by-nc-sa</code> || [https://creativecommons.org/licenses/by-nc-sa/4.0/ CC BY-NC-SA 4.0] || Non-commercial use only, with attribution, and derivatives under the same license. +|- +| <code>cc-by-nd</code> || [https://creativecommons.org/licenses/by-nd/4.0/ CC BY-ND 4.0] || Redistribution with attribution is allowed, but no derivatives or adaptations. +|- +| <code>cc-by-nc-nd</code> || [https://creativecommons.org/licenses/by-nc-nd/4.0/ CC BY-NC-ND 4.0] || Non-commercial redistribution with attribution only; no derivatives. +|- +| <code>cc0</code> || [https://creativecommons.org/publicdomain/zero/1.0/ CC0 1.0] || Public domain dedication — no rights reserved, maximum freedom for reuse. +|- +| <code>arr</code> || All rights reserved || Standard copyright; no reuse without explicit permission. +|} <templatedata> { diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_License_styles.css b/apps/talos_cluster/mediawiki/wiki-templates/Template_License_styles.css @@ -1,6 +1,6 @@ .mw-license-box { display: inline-table; - border: 1px solid #aaa; + border: 1px solid var(--border-color-base, #a2a9b1); font-size: 88%; margin: 0.2em 0; clear: right; @@ -15,19 +15,105 @@ font-size: 115%; text-align: center; min-width: 52px; - border-right: 1px solid #aaa; + border-right: 1px solid var(--border-color-base, #a2a9b1); white-space: nowrap; + color: #202122; } .mw-license-desc { max-width: 220px; + color: var(--color-base, #202122); +} +.mw-license-desc a { + font-weight: bold; +} + +/* Light mode badge backgrounds */ +.mw-license-cc-by .mw-license-badge { + background: #b3e0b3; +} +.mw-license-cc-by-sa .mw-license-badge { + background: #99d699; +} +.mw-license-cc-by-nc .mw-license-badge { + background: #fde68a; +} +.mw-license-cc-by-nc-sa .mw-license-badge { + background: #fcd34d; +} +.mw-license-cc-by-nd .mw-license-badge { + background: #a5d8f3; +} +.mw-license-cc-by-nc-nd .mw-license-badge { + background: #f3a5d8; +} +.mw-license-cc0 .mw-license-badge { + background: #c4b5fd; +} +.mw-license-arr .mw-license-badge { + background: var(--background-color-neutral, #eaecf0); + color: var(--color-base, #202122); } -.mw-license-desc a { font-weight: bold; } -.mw-license-cc-by .mw-license-badge { background: #b3e0b3; } -.mw-license-cc-by-sa .mw-license-badge { background: #99d699; } -.mw-license-cc-by-nc .mw-license-badge { background: #fde68a; } -.mw-license-cc-by-nc-sa .mw-license-badge { background: #fcd34d; } -.mw-license-cc-by-nd .mw-license-badge { background: #a5d8f3; } -.mw-license-cc-by-nc-nd .mw-license-badge { background: #f3a5d8; } -.mw-license-cc0 .mw-license-badge { background: #c4b5fd; } -.mw-license-arr .mw-license-badge { background: #e8e8e8; } +/* Dark badge backgrounds + text — manual Night toggle */ +@media screen { + html.skin-theme-clientpref-night .mw-license-cc-by .mw-license-badge { + background: #1a4d1a; + color: #c8f0c8; + } + html.skin-theme-clientpref-night .mw-license-cc-by-sa .mw-license-badge { + background: #144014; + color: #a8e0a8; + } + html.skin-theme-clientpref-night .mw-license-cc-by-nc .mw-license-badge { + background: #4d3d00; + color: #ffe99a; + } + html.skin-theme-clientpref-night .mw-license-cc-by-nc-sa .mw-license-badge { + background: #4d3200; + color: #ffd97a; + } + html.skin-theme-clientpref-night .mw-license-cc-by-nd .mw-license-badge { + background: #0d3a52; + color: #a8d8f0; + } + html.skin-theme-clientpref-night .mw-license-cc-by-nc-nd .mw-license-badge { + background: #52112e; + color: #f0a8cc; + } + html.skin-theme-clientpref-night .mw-license-cc0 .mw-license-badge { + background: #2d1a5e; + color: #d4bbff; + } +} + +/* Dark badge backgrounds + text — OS dark preference */ +@media screen and (prefers-color-scheme: dark) { + html.skin-theme-clientpref-os .mw-license-cc-by .mw-license-badge { + background: #1a4d1a; + color: #c8f0c8; + } + html.skin-theme-clientpref-os .mw-license-cc-by-sa .mw-license-badge { + background: #144014; + color: #a8e0a8; + } + html.skin-theme-clientpref-os .mw-license-cc-by-nc .mw-license-badge { + background: #4d3d00; + color: #ffe99a; + } + html.skin-theme-clientpref-os .mw-license-cc-by-nc-sa .mw-license-badge { + background: #4d3200; + color: #ffd97a; + } + html.skin-theme-clientpref-os .mw-license-cc-by-nd .mw-license-badge { + background: #0d3a52; + color: #a8d8f0; + } + html.skin-theme-clientpref-os .mw-license-cc-by-nc-nd .mw-license-badge { + background: #52112e; + color: #f0a8cc; + } + html.skin-theme-clientpref-os .mw-license-cc0 .mw-license-badge { + background: #2d1a5e; + color: #d4bbff; + } +}