commit bf971a33463e9776b085c409311917eba4f2f7a9 parent 4f35c15f93b48775b26dfe64845e8cba35377588 Author: MTRNord <MTRNord@users.noreply.github.com> Date: Sat, 18 Apr 2026 17:11:53 +0200 add more templates Signed-off-by: MTRNord <MTRNord@users.noreply.github.com> Diffstat:
8 files changed, 439 insertions(+), 0 deletions(-)
diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_network.wikitext b/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_network.wikitext @@ -0,0 +1,51 @@ +<templatestyles src="Template:Infobox network/styles.css" /><div class="infobox-network"> +<div class="infobox-network-title">{{{name|Network}}}</div>{{#if:{{{subtitle|}}}|<div class="infobox-network-subtitle">{{{subtitle}}}</div>}}<table> +{{#if:{{{purpose|}}}|<tr><td class="infobox-label">Purpose</td><td>{{{purpose}}}</td></tr>}} +{{#if:{{{type|}}}|<tr><td class="infobox-label">Type</td><td>{{{type}}}</td></tr>}} +{{#if:{{{cidr|}}}|<tr><td colspan="2" class="infobox-network-section">Addressing</td></tr><tr><td class="infobox-label">IPv4 CIDR</td><td><code>{{{cidr}}}</code></td></tr>}} +{{#if:{{{cidr6|}}}|<tr><td class="infobox-label">IPv6 CIDR</td><td><code>{{{cidr6}}}</code></td></tr>}} +{{#if:{{{gateway|}}}|<tr><td class="infobox-label">Gateway</td><td><code>{{{gateway}}}</code></td></tr>}} +{{#if:{{{vlan_id|}}}|<tr><td class="infobox-label">VLAN ID</td><td>{{{vlan_id}}}</td></tr>}} +{{#if:{{{dhcp|}}}|<tr><td class="infobox-label">DHCP</td><td>{{{dhcp}}}</td></tr>}} +{{#if:{{{assigned_to|}}}|<tr><td colspan="2" class="infobox-network-section">Assignment</td></tr><tr><td class="infobox-label">Assigned to</td><td>{{{assigned_to}}}</td></tr>}} +{{#if:{{{since|}}}|<tr><td colspan="2" class="infobox-network-section">History</td></tr><tr><td class="infobox-label">In use since</td><td>{{{since}}}</td></tr>}} +{{#if:{{{notes|}}}|<tr><td colspan="2" class="infobox-network-section">Notes</td></tr><tr><td colspan="2" style="padding:4px 6px;">{{{notes}}}</td></tr>}} +</table></div><noinclude> +== Usage == +<pre> +{{Infobox network +| name = Node subnet +| subtitle = Hetzner Cloud worker nodes +| purpose = Kubernetes worker node IPs +| type = IPv4 +| cidr = 10.0.64.0/19 +| gateway = 10.0.64.1 +| assigned_to = [[cluster-2025-worker-nbg-v2-1]], [[cluster-2025-worker-nbg-v2-2]] +| since = 2025-01-01 +| notes = Allocated within the 10.0.0.0/16 Hetzner private network. +}} +</pre> + +All parameters are optional. + +<templatedata> +{ + "description": "Infobox for network segments, subnets, and VLANs.", + "params": { + "name": { "label": "Name", "type": "string", "required": true }, + "subtitle": { "label": "Subtitle", "type": "string" }, + "purpose": { "label": "Purpose", "type": "string" }, + "type": { "label": "IP version", "type": "string", "suggestedvalues": ["IPv4","IPv6","Dual-stack"] }, + "cidr": { "label": "IPv4 CIDR", "type": "string" }, + "cidr6": { "label": "IPv6 CIDR", "type": "string" }, + "gateway": { "label": "Gateway", "type": "string" }, + "vlan_id": { "label": "VLAN ID", "type": "number" }, + "dhcp": { "label": "DHCP", "type": "string", "description": "e.g. 'Yes', 'No', or DHCP range." }, + "assigned_to": { "label": "Assigned to", "type": "string", "description": "Wikilinks to nodes or services using this subnet." }, + "since": { "label": "In use since","type": "date" }, + "notes": { "label": "Notes", "type": "string" } + }, + "format": "block" +} +</templatedata> +</noinclude> diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_network_styles.css b/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_network_styles.css @@ -0,0 +1,54 @@ +/* + * Infobox network — for subnets and network segments. + * Teal header distinguishes it from the blue server/service infoboxes. + */ + +.infobox-network { + 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-network-title { + background: #117a8b; + color: #fff; + font-size: 115%; + font-weight: bold; + text-align: center; + padding: 5px 8px; +} +.infobox-network-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-network table { + width: 100%; + border-collapse: collapse; +} +.infobox-network td { + padding: 3px 6px; + vertical-align: top; + border-top: 1px solid var(--border-color-subtle, #c8ccd1); +} +.infobox-network .infobox-label { + font-weight: bold; + width: 40%; + color: var(--color-subtle, #54595d); +} +.infobox-network-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); +} diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_service.wikitext b/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_service.wikitext @@ -0,0 +1,59 @@ +<templatestyles src="Template:Infobox service/styles.css" /><div class="infobox-service"> +<div class="infobox-service-title">{{{name|Service}}}</div>{{#if:{{{subtitle|}}}|<div class="infobox-service-subtitle">{{{subtitle}}}</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:{{{url|}}}|<tr><td class="infobox-label">URL</td><td>[{{{url}}} {{{url_label|{{{url}}}}}}]</td></tr>}} +{{#if:{{{namespace|}}}|<tr><td colspan="2" class="infobox-service-section">Kubernetes</td></tr><tr><td class="infobox-label">Namespace</td><td><code>{{{namespace}}}</code></td></tr>}} +{{#if:{{{helm_chart|}}}|<tr><td class="infobox-label">Helm chart</td><td>{{{helm_chart}}}{{#if:{{{helm_version|}}}| <code>{{{helm_version}}}</code>}}</td></tr>}} +{{#if:{{{image|}}}|<tr><td class="infobox-label">Image</td><td><code>{{{image}}}{{#if:{{{image_tag|}}}|:{{{image_tag}}}}}</code></td></tr>}} +{{#if:{{{ports|}}}|<tr><td class="infobox-label">Ports</td><td>{{{ports}}}</td></tr>}} +{{#if:{{{replicas|}}}|<tr><td class="infobox-label">Replicas</td><td>{{{replicas}}}</td></tr>}} +{{#if:{{{dependencies|}}}|<tr><td colspan="2" class="infobox-service-section">Dependencies</td></tr><tr><td colspan="2" style="padding:3px 6px;">{{{dependencies}}}</td></tr>}} +{{#if:{{{since|}}}|<tr><td colspan="2" class="infobox-service-section">History</td></tr><tr><td class="infobox-label">Online since</td><td>{{{since}}}</td></tr>}} +{{#if:{{{notes|}}}|<tr><td colspan="2" class="infobox-service-section">Notes</td></tr><tr><td colspan="2" style="padding:4px 6px;">{{{notes}}}</td></tr>}} +</table></div><noinclude> +== Usage == +<pre> +{{Infobox service +| name = Stalwart Mail +| subtitle = Mail server (SMTP/IMAP) +| status = active +| url = https://webmail.midnightthoughts.space +| namespace = stalwart +| helm_chart = stalwart-mail +| helm_version = 1.0.x +| image = ghcr.io/stalwartlabs/stalwart +| image_tag = latest +| ports = 25 (SMTP), 587 (Submission), 993 (IMAPS) +| replicas = 1 +| dependencies = [[PostgreSQL]], [[Hetzner Object Storage]] +| since = 2025-01-01 +| notes = Internal submission on port 2587 (no PROXY protocol). +}} +</pre> + +All parameters are optional. + +<templatedata> +{ + "description": "Infobox for Kubernetes-deployed services and applications.", + "params": { + "name": { "label": "Name", "type": "string", "required": true }, + "subtitle": { "label": "Subtitle", "type": "string", "description": "Short descriptor, e.g. 'Mail server (SMTP/IMAP)'." }, + "status": { "label": "Status", "type": "string", "suggestedvalues": ["active","maintenance","decommissioned"] }, + "url": { "label": "URL", "type": "url" }, + "url_label": { "label": "URL label", "type": "string", "description": "Display text for the URL link. Defaults to the URL itself." }, + "namespace": { "label": "K8s namespace", "type": "string" }, + "helm_chart": { "label": "Helm chart", "type": "string" }, + "helm_version": { "label": "Helm version", "type": "string" }, + "image": { "label": "Container image","type": "string" }, + "image_tag": { "label": "Image tag", "type": "string" }, + "ports": { "label": "Ports", "type": "string", "description": "Comma-separated list of ports and protocols." }, + "replicas": { "label": "Replicas", "type": "number" }, + "dependencies": { "label": "Dependencies", "type": "string", "description": "Wikilinks to services this depends on." }, + "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_service_styles.css b/apps/talos_cluster/mediawiki/wiki-templates/Template_Infobox_service_styles.css @@ -0,0 +1,70 @@ +/* + * Infobox service — for Kubernetes-deployed services. + * Theme support: CSS custom properties for generic colours; explicit + * @media screen overrides for accent colours. + */ + +.infobox-service { + 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-service-title { + background: #3366cc; + color: #fff; + font-size: 115%; + font-weight: bold; + text-align: center; + padding: 5px 8px; +} +.infobox-service-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-service table { + width: 100%; + border-collapse: collapse; +} +.infobox-service td { + padding: 3px 6px; + vertical-align: top; + border-top: 1px solid var(--border-color-subtle, #c8ccd1); +} +.infobox-service .infobox-label { + font-weight: bold; + width: 40%; + color: var(--color-subtle, #54595d); +} +.infobox-service-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); +} + +.infobox-status-active { color: #2a7a2a; font-weight: bold; } +.infobox-status-maintenance { color: #b36200; font-weight: bold; } +.infobox-status-decommissioned { color: #c00; font-weight: bold; } + +@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; } +} +@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_Navbox.wikitext b/apps/talos_cluster/mediawiki/wiki-templates/Template_Navbox.wikitext @@ -0,0 +1,46 @@ +<templatestyles src="Template:Navbox/styles.css" /><table class="mw-navbox mw-collapsible"><caption class="mw-navbox-title">{{{title|Navigation}}}</caption> +<tr><td><table class="mw-navbox-inner"> +{{#if:{{{group1_label|}}}|<tr><th class="mw-navbox-group">{{{group1_label}}}</th><td class="mw-navbox-list">{{{group1_links|}}}</td></tr>}} +{{#if:{{{group2_label|}}}|<tr><th class="mw-navbox-group">{{{group2_label}}}</th><td class="mw-navbox-list">{{{group2_links|}}}</td></tr>}} +{{#if:{{{group3_label|}}}|<tr><th class="mw-navbox-group">{{{group3_label}}}</th><td class="mw-navbox-list">{{{group3_links|}}}</td></tr>}} +{{#if:{{{group4_label|}}}|<tr><th class="mw-navbox-group">{{{group4_label}}}</th><td class="mw-navbox-list">{{{group4_links|}}}</td></tr>}} +</table></td></tr> +</table><noinclude> +== Usage == + +Place at the bottom of related pages. Each group has a label on the left and pipe-separated wikilinks on the right. + +<pre> +{{Navbox +| title = Cluster networking +| group1_label = DNS +| group1_links = [[DNS servers]] · [[dns-a]] · [[dns-b]] +| group2_label = Subnets +| group2_links = [[Node subnet (10.0.64.0/19)]] · [[Pod subnet (10.0.128.0/17)]] +| group3_label = Ingress +| group3_links = [[Envoy Gateway]] · [[HTTP routes]] +| group4_label = Mesh +| group4_links = [[Cilium]] · [[WireGuard (Proxmox)]] +}} +</pre> + +Use <code>·</code> (middle dot) or spaces as link separators. + +<templatedata> +{ + "description": "Bottom navigation box linking a cluster of related infrastructure pages. Complements categories by providing curated lateral navigation.", + "params": { + "title": { "label": "Title", "type": "string", "required": true }, + "group1_label": { "label": "Group 1 label", "type": "string" }, + "group1_links": { "label": "Group 1 links", "type": "string", "description": "Wikilinks separated by · or spaces." }, + "group2_label": { "label": "Group 2 label", "type": "string" }, + "group2_links": { "label": "Group 2 links", "type": "string" }, + "group3_label": { "label": "Group 3 label", "type": "string" }, + "group3_links": { "label": "Group 3 links", "type": "string" }, + "group4_label": { "label": "Group 4 label", "type": "string" }, + "group4_links": { "label": "Group 4 links", "type": "string" } + }, + "format": "block" +} +</templatedata> +</noinclude> diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Navbox_styles.css b/apps/talos_cluster/mediawiki/wiki-templates/Template_Navbox_styles.css @@ -0,0 +1,61 @@ +.mw-navbox { + border: 1px solid var(--border-color-base, #a2a9b1); + background: var(--background-color-neutral-subtle, #f8f9fa); + color: var(--color-base, #202122); + font-size: 88%; + margin: 1em auto 0; + width: 100%; + clear: both; + border-collapse: collapse; +} +.mw-navbox-title { + background: #cee0f2; + color: var(--color-base, #202122); + font-weight: bold; + text-align: center; + padding: 3px 6px; + border-bottom: 1px solid var(--border-color-base, #a2a9b1); +} +/* Toggle button injected into caption by mw-collapsible JS */ +.mw-navbox-title .mw-collapsible-toggle { + float: right; + font-weight: normal; + font-size: 95%; + line-height: inherit; +} +.mw-navbox-inner { + width: 100%; + border-collapse: collapse; +} +.mw-navbox-inner tr + tr td, +.mw-navbox-inner tr + tr th { + border-top: 1px solid var(--border-color-subtle, #c8ccd1); +} +.mw-navbox-group { + font-weight: bold; + white-space: nowrap; + text-align: right; + padding: 2px 8px 2px 6px; + width: 15%; + color: var(--color-subtle, #54595d); + border-right: 1px solid var(--border-color-base, #a2a9b1); + background: var(--background-color-neutral, #eaecf0); +} +.mw-navbox-list { + padding: 2px 6px; + text-align: left; +} + +/* Dark — title bar */ +@media screen { + html.skin-theme-clientpref-night .mw-navbox-title { + background: #1a3a5c; + color: #eaecf0; + } +} +@media screen and (prefers-color-scheme: dark) { + html.skin-theme-clientpref-os .mw-navbox-title { + background: #1a3a5c; + color: #eaecf0; + } +} diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Notice.wikitext b/apps/talos_cluster/mediawiki/wiki-templates/Template_Notice.wikitext @@ -0,0 +1,45 @@ +<templatestyles src="Template:Notice/styles.css" /><div class="mw-notice mw-notice-{{#switch:{{{type|info}}}|info=info|warning=warning|deprecated=deprecated|maintenance=maintenance|info}}"><div class="mw-notice-badge">{{#switch:{{{type|info}}}|info=Info|warning=Warning|deprecated=Deprecated|maintenance=Maintenance|Info}}</div><div class="mw-notice-body">{{#if:{{{title|}}}|<div class="mw-notice-title">{{{title}}}</div>}}{{{1|}}}</div></div><noinclude> +== Usage == +<pre>{{Notice|type=info|This page describes a live service.}}</pre> +<pre>{{Notice|type=warning|title=Read before editing|Configuration changes require a pod restart.}}</pre> + +=== Types === +{| class="wikitable" +! Type !! Border colour !! Use for +|- +| <code>info</code> || Blue || General information notices +|- +| <code>warning</code> || Yellow || Things to be careful about +|- +| <code>deprecated</code> || Red || Services or pages that are decommissioned or outdated +|- +| <code>maintenance</code> || Orange || Systems currently under maintenance +|} + +<templatedata> +{ + "description": "Displays a full-width callout/notice box. Supports info, warning, deprecated and maintenance variants.", + "params": { + "type": { + "label": "Type", + "type": "string", + "required": true, + "suggestedvalues": ["info","warning","deprecated","maintenance"], + "default": "info" + }, + "title": { + "label": "Title", + "type": "string", + "description": "Optional bold heading shown above the message." + }, + "1": { + "label": "Message", + "type": "string", + "required": true, + "description": "The notice body text. Wikitext is supported." + } + }, + "format": "inline" +} +</templatedata> +</noinclude> diff --git a/apps/talos_cluster/mediawiki/wiki-templates/Template_Notice_styles.css b/apps/talos_cluster/mediawiki/wiki-templates/Template_Notice_styles.css @@ -0,0 +1,53 @@ +/* + * Notice/callout boxes — info, warning, deprecated, maintenance. + * Structural colours via CSS vars; accent colours with explicit dark overrides. + */ + +.mw-notice { + display: flex; + align-items: flex-start; + gap: 0.75em; + border: 1px solid var(--border-color-base, #a2a9b1); + border-left-width: 4px; + background: var(--background-color-neutral-subtle, #f8f9fa); + color: var(--color-base, #202122); + padding: 0.6em 0.9em; + margin: 0.8em 0; + font-size: 95%; + line-height: 1.5; +} +.mw-notice-badge { + font-weight: bold; + font-size: 90%; + white-space: nowrap; + padding: 1px 6px; + border-radius: 3px; + flex-shrink: 0; + margin-top: 1px; +} +.mw-notice-body { flex: 1; } +.mw-notice-title { font-weight: bold; margin-bottom: 2px; } + +/* info — blue */ +.mw-notice-info { border-left-color: #3366cc; } +.mw-notice-info .mw-notice-badge { background: #3366cc; color: #fff; } + +/* warning — yellow */ +.mw-notice-warning { border-left-color: #ac6600; } +.mw-notice-warning .mw-notice-badge { background: #ffd966; color: #202122; } + +/* deprecated — red */ +.mw-notice-deprecated { border-left-color: #c00; } +.mw-notice-deprecated .mw-notice-badge { background: #c00; color: #fff; } + +/* maintenance — orange */ +.mw-notice-maintenance { border-left-color: #d35400; } +.mw-notice-maintenance .mw-notice-badge { background: #d35400; color: #fff; } + +/* Dark — warning badge needs lighter text */ +@media screen { + html.skin-theme-clientpref-night .mw-notice-warning .mw-notice-badge { background: #7a5200; color: #ffe99a; } +} +@media screen and (prefers-color-scheme: dark) { + html.skin-theme-clientpref-os .mw-notice-warning .mw-notice-badge { background: #7a5200; color: #ffe99a; } +}