Use dynamic config for system names and components
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- Station: Ward -> Station, Cabinet -> Desk, Table -> Desk
- Atlas: Album -> Atlas
- All templates now read from config.json for titles/taglines
- Added shunts.json and plexuses.json data files
- run.py passes system and components to all templates
This commit is contained in:
buenosairesam
2026-01-02 23:52:43 -03:00
parent c4ec112607
commit 27b32deba4
5 changed files with 121 additions and 114 deletions

View File

@@ -3,11 +3,11 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ward · Soleprint</title>
<title>{{ system.title or 'Station' }} · Soleprint</title>
<link
rel="icon"
type="image/svg+xml"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%231d4ed8'%3E%3Ccircle cx='24' cy='10' r='8'/%3E%3Cellipse cx='24' cy='32' rx='12' ry='14'/%3E%3Ccircle cx='20' cy='8' r='1.5' fill='white'/%3E%3Ccircle cx='28' cy='8' r='1.5' fill='white'/%3E%3Cellipse cx='24' cy='13' rx='2' ry='1' fill='white'/%3E%3Crect x='18' y='28' width='12' height='8' rx='2' fill='white' opacity='0.5'/%3E%3C/svg%3E"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%231d4ed8'%3E%3Crect x='4' y='8' width='40' height='28' rx='3' fill='%231d4ed8'/%3E%3Crect x='8' y='12' width='32' height='20' rx='2' fill='%230a0a0a'/%3E%3Crect x='16' y='36' width='16' height='4' fill='%231d4ed8'/%3E%3Crect x='12' y='40' width='24' height='3' rx='1' fill='%231d4ed8'/%3E%3C/svg%3E"
/>
<style>
* {
@@ -160,26 +160,23 @@
</head>
<body>
<header style="position: relative">
<!-- Operation game patient -->
<!-- Control station / monitor -->
<svg class="logo" viewBox="0 0 48 48" fill="currentColor">
<circle cx="24" cy="10" r="8" />
<ellipse cx="24" cy="32" rx="12" ry="14" />
<circle cx="20" cy="8" r="1.5" fill="#1d4ed8" />
<circle cx="28" cy="8" r="1.5" fill="#1d4ed8" />
<ellipse cx="24" cy="13" rx="2" ry="1" fill="#1d4ed8" />
<rect x="4" y="8" width="40" height="28" rx="3" />
<rect
x="18"
y="28"
width="12"
height="8"
x="8"
y="12"
width="32"
height="20"
rx="2"
fill="#1d4ed8"
opacity="0.5"
/>
<rect x="16" y="36" width="16" height="4" />
<rect x="12" y="40" width="24" height="3" rx="1" />
</svg>
<h1>Ward</h1>
{% if pawprint_url %}<a
href="{{ pawprint_url }}"
<h1>{{ system.title or 'Station' }}</h1>
{% if soleprint_url %}<a
href="{{ soleprint_url }}"
style="
position: absolute;
right: 0;
@@ -191,61 +188,28 @@
>← Soleprint</a
>{% endif %}
</header>
<p class="tagline">
Monitores, herramientas y pruebas<!-- Monitors & Tools -->
</p>
<p class="tagline">{{ system.tagline or 'Monitors & Tools' }}</p>
<section>
<div class="composition">
<h3>Table</h3>
<div class="components">
<div
class="component"
style="
display: flex;
flex-direction: column;
gap: 0.5rem;
"
>
<h4 style="margin-bottom: 0.25rem">Cabinet</h4>
<div
style="
background: #1a1a1a;
border: 1px solid #3f3f3f;
padding: 0.5rem;
border-radius: 6px;
font-size: 0.85rem;
color: #93c5fd;
"
>
Monitor
</div>
<div
style="
background: #1a1a1a;
border: 1px solid #3f3f3f;
padding: 0.5rem;
border-radius: 6px;
font-size: 0.85rem;
color: #93c5fd;
"
>
Tool
</div>
</div>
<div class="component"><h4>Room</h4></div>
<div class="component"><h4>Depot</h4></div>
</div>
<h3>
{{ components.composed.title or 'Desk' }} = {{
components.composed.formula or 'Tools + Room + Depots' }}
</h3>
<p>
{{ components.composed.description or 'A configured
workspace' }}
</p>
</div>
</section>
<section>
<h2>Tables</h2>
<h2>{{ (components.composed.plural or 'desks')|title }}</h2>
<ul class="tables">
{% for table in tables %}
{% for desk in desks %}
<li>
<span class="name">{{ table.title }}</span
><span class="status">{{ table.status }}</span>
<span class="name">{{ desk.title }}</span
><span class="status">{{ desk.status }}</span>
</li>
{% else %}
<li><span class="name">--</span></li>
@@ -254,21 +218,7 @@
</section>
<section>
<h2>Cabinets</h2>
<ul class="tables">
{% for cabinet in cabinets %}
<li>
<span class="name">{{ cabinet.title }}</span
><span class="status">{{ cabinet.status }}</span>
</li>
{% else %}
<li><span class="name">--</span></li>
{% endfor %}
</ul>
</section>
<section>
<h2>Monitors</h2>
<h2>{{ (components.watcher.plural or 'monitors')|title }}</h2>
<ul class="tables">
{% for monitor in monitors %}
<li>
@@ -283,7 +233,7 @@
</section>
<section>
<h2>Tools</h2>
<h2>{{ (components.utility.plural or 'tools')|title }}</h2>
<ul class="tables">
{% for tool in tools %}
<li>
@@ -310,8 +260,8 @@
<a href="/health" class="health">/health</a>
<footer>
{% if pawprint_url %}<a href="{{ pawprint_url }}">← Soleprint</a>{%
else %}<span class="disabled">← Soleprint</span>{% endif %}
{% if soleprint_url %}<a href="{{ soleprint_url }}">← Soleprint</a
>{% else %}<span class="disabled">← Soleprint</span>{% endif %}
</footer>
</body>
</html>