feat: adds efficiency calculation for rigs and back pack (WIP). UX cleaned up, graphic added to landing page.
This commit is contained in:
@@ -14,17 +14,40 @@
|
||||
--amber: #ffd580;
|
||||
}
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
padding-top: 52px;
|
||||
background-image: url('/assets/onlyscavs.png');
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
background-position: center 65%;
|
||||
}
|
||||
.page { max-width: 1100px; margin: 0 auto; }
|
||||
body::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(14,14,14,0.88);
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
.page { max-width: 1100px; margin: 0 auto; padding: 24px 16px; position: relative; z-index: 1; }
|
||||
h1 { margin-bottom: 4px; }
|
||||
nav { margin-bottom: 20px; }
|
||||
nav a { color: var(--accent); font-size: 0.9rem; }
|
||||
a { color: var(--accent); }
|
||||
.site-nav {
|
||||
position: fixed; top: 0; left: 0; right: 0; z-index: 100;
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 0 24px; height: 52px;
|
||||
background: rgba(14,14,14,0.92);
|
||||
backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
|
||||
border-bottom: 1px solid rgba(255,255,255,0.06);
|
||||
}
|
||||
.nav-brand { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); text-decoration: none; flex-shrink: 0; }
|
||||
.nav-links { display: flex; gap: 2px; flex-wrap: wrap; }
|
||||
.nav-links a { color: #666; text-decoration: none; font-size: 0.8rem; padding: 5px 10px; border-radius: 5px; transition: color 0.15s, background 0.15s; }
|
||||
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
|
||||
.nav-links a.active { color: var(--accent); background: rgba(156,207,255,0.08); }
|
||||
|
||||
/* Tab bar */
|
||||
.tab-bar {
|
||||
@@ -221,13 +244,16 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<nav>
|
||||
<a href="/">Home</a> |
|
||||
<a href="/keys">Keys</a> |
|
||||
<a href="/collector">Collector</a> |
|
||||
<a href="/quests">Quests</a> |
|
||||
<a href="/meds">Injectors</a> |
|
||||
<a href="/barters">Barters</a>
|
||||
<nav class="site-nav">
|
||||
<a class="nav-brand" href="/">OnlyScavs</a>
|
||||
<div class="nav-links">
|
||||
<a href="/keys">Keys</a>
|
||||
<a href="/collector">Collector</a>
|
||||
<a href="/quests">Quests</a>
|
||||
<a href="/loadout" class="active">Loadout</a>
|
||||
<a href="/meds">Injectors</a>
|
||||
<a href="/barters">Barters</a>
|
||||
</div>
|
||||
</nav>
|
||||
<h1>Loadout Planner</h1>
|
||||
<p style="color:var(--muted);margin:0 0 16px;font-size:0.9rem;">
|
||||
@@ -235,7 +261,7 @@
|
||||
</p>
|
||||
|
||||
<div class="tab-bar">
|
||||
{% for t_id, t_label in [('guns','Guns'),('armor','Armor'),('helmets','Helmets'),('headwear','Headwear'),('backpacks','Backpacks'),('rigs','Rigs'),('plates','Plates'),('builder','Build Builder')] %}
|
||||
{% for t_id, t_label in [('guns','Guns'),('armor','Armor'),('helmets','Helmets'),('headwear','Headwear'),('backpacks','Backpacks'),('rigs','Soft Rigs'),('armored_rigs','Armored Rigs'),('plates','Plates'),('builder','Build Builder')] %}
|
||||
<a href="/loadout?tab={{ t_id }}" class="{% if tab == t_id %}active{% endif %}">{{ t_label }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -599,18 +625,19 @@
|
||||
<input type="number" name="min_capacity" value="{{ min_capacity or '' }}" min="0" placeholder="0" style="width:60px">
|
||||
<label>Sort</label>
|
||||
<select name="sort">
|
||||
<option value="weight_asc" {% if sort=='weight_asc' %}selected{% endif %}>Weight ↑</option>
|
||||
<option value="weight_desc" {% if sort=='weight_desc' %}selected{% endif %}>Weight ↓</option>
|
||||
<option value="capacity_desc" {% if sort=='capacity_desc' %}selected{% endif %}>Capacity ↓</option>
|
||||
<option value="capacity_asc" {% if sort=='capacity_asc' %}selected{% endif %}>Capacity ↑</option>
|
||||
<option value="name_asc" {% if sort=='name_asc' %}selected{% endif %}>Name A→Z</option>
|
||||
<option value="weight_asc" {% if sort=='weight_asc' %}selected{% endif %}>Weight ↑</option>
|
||||
<option value="weight_desc" {% if sort=='weight_desc' %}selected{% endif %}>Weight ↓</option>
|
||||
<option value="capacity_desc" {% if sort=='capacity_desc' %}selected{% endif %}>Capacity ↓</option>
|
||||
<option value="capacity_asc" {% if sort=='capacity_asc' %}selected{% endif %}>Capacity ↑</option>
|
||||
<option value="efficiency_desc" {% if sort=='efficiency_desc' %}selected{% endif %}>Carry Efficiency ↓</option>
|
||||
<option value="name_asc" {% if sort=='name_asc' %}selected{% endif %}>Name A→Z</option>
|
||||
</select>
|
||||
<button type="submit">Filter</button>
|
||||
</form>
|
||||
<table class="gear-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th><th>Name</th><th>Capacity (slots)</th><th>Weight</th>
|
||||
<th></th><th>Name</th><th>Capacity (slots)</th><th>Weight</th><th>Carry Efficiency</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -624,45 +651,97 @@
|
||||
</td>
|
||||
<td class="muted">{{ item.capacity or '—' }}</td>
|
||||
<td class="w">{% if item.weight_kg is not none %}{{ "%.3f"|format(item.weight_kg) }} kg{% else %}—{% endif %}</td>
|
||||
<td class="muted">
|
||||
{% if item.slots_per_kg is not none %}
|
||||
<span title="{{ "%.3f"|format(item.kg_per_slot) }} kg/slot">{{ "%.2f"|format(item.slots_per_kg) }} slots/kg</span>
|
||||
{% else %}—{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="4" class="empty">No backpacks found.</td></tr>
|
||||
<tr><td colspan="5" class="empty">No backpacks found.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{# =============================== RIGS TAB =============================== #}
|
||||
{# =============================== SOFT RIGS TAB =============================== #}
|
||||
{% if tab == "rigs" %}
|
||||
<form method="get" class="filter-bar">
|
||||
<input type="hidden" name="tab" value="rigs">
|
||||
<label>Min slots</label>
|
||||
<input type="number" name="min_capacity" value="{{ min_capacity or '' }}" min="0" placeholder="0" style="width:60px">
|
||||
<label>Min class</label>
|
||||
<select name="min_class">
|
||||
<option value="0" {% if min_class==0 %}selected{% endif %}>Any</option>
|
||||
{% for c in range(1,7) %}
|
||||
<option value="{{ c }}" {% if min_class==c %}selected{% endif %}>Class {{ c }}+</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<label>Sort</label>
|
||||
<select name="sort">
|
||||
<option value="weight_asc" {% if sort=='weight_asc' %}selected{% endif %}>Weight ↑</option>
|
||||
<option value="weight_desc" {% if sort=='weight_desc' %}selected{% endif %}>Weight ↓</option>
|
||||
<option value="capacity_desc" {% if sort=='capacity_desc' %}selected{% endif %}>Capacity ↓</option>
|
||||
<option value="class_desc" {% if sort=='class_desc' %}selected{% endif %}>Class ↓</option>
|
||||
<option value="name_asc" {% if sort=='name_asc' %}selected{% endif %}>Name A→Z</option>
|
||||
<option value="weight_asc" {% if sort=='weight_asc' %}selected{% endif %}>Weight ↑</option>
|
||||
<option value="weight_desc" {% if sort=='weight_desc' %}selected{% endif %}>Weight ↓</option>
|
||||
<option value="capacity_desc" {% if sort=='capacity_desc' %}selected{% endif %}>Capacity ↓</option>
|
||||
<option value="efficiency_desc" {% if sort=='efficiency_desc' %}selected{% endif %}>Carry Efficiency ↓</option>
|
||||
<option value="name_asc" {% if sort=='name_asc' %}selected{% endif %}>Name A→Z</option>
|
||||
</select>
|
||||
<button type="submit">Filter</button>
|
||||
</form>
|
||||
<table class="gear-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th><th>Name</th><th>Class</th><th>Capacity (slots)</th><th>Zones</th><th>Weight</th>
|
||||
<th></th><th>Name</th><th>Capacity (slots)</th><th>Weight</th><th>Carry Efficiency</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in rigs %}
|
||||
<tr>
|
||||
<td>{% if item.grid_image_url %}<img src="{{ item.grid_image_url }}" loading="lazy" alt="">{% endif %}</td>
|
||||
<td class="name-cell">
|
||||
<strong>{{ item.short_name or item.name }}</strong>
|
||||
{% if item.short_name and item.short_name != item.name %}<small>{{ item.name }}</small>{% endif %}
|
||||
{% if item.wiki_url %}<a href="{{ item.wiki_url }}" target="_blank" style="font-size:0.78rem;margin-left:4px">wiki</a>{% endif %}
|
||||
</td>
|
||||
<td class="muted">{{ item.capacity or '—' }}</td>
|
||||
<td class="w">{% if item.weight_kg is not none %}{{ "%.3f"|format(item.weight_kg) }} kg{% else %}—{% endif %}</td>
|
||||
<td class="muted">
|
||||
{% if item.slots_per_kg is not none %}
|
||||
<span title="{{ "%.3f"|format(item.kg_per_slot) }} kg/slot">{{ "%.2f"|format(item.slots_per_kg) }} slots/kg</span>
|
||||
{% else %}—{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="5" class="empty">No soft rigs found.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{# =============================== ARMORED RIGS TAB =============================== #}
|
||||
{% if tab == "armored_rigs" %}
|
||||
<form method="get" class="filter-bar">
|
||||
<input type="hidden" name="tab" value="armored_rigs">
|
||||
<label>Min slots</label>
|
||||
<input type="number" name="min_capacity" value="{{ min_capacity or '' }}" min="0" placeholder="0" style="width:60px">
|
||||
<label>Min class</label>
|
||||
<select name="min_class">
|
||||
<option value="0" {% if min_class==0 %}selected{% endif %}>Any</option>
|
||||
{% for c in range(1,7) %}
|
||||
<option value="{{ c }}" {% if min_class==c %}selected{% endif %}>Class {{ c }}+</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<label>Sort</label>
|
||||
<select name="sort">
|
||||
<option value="weight_asc" {% if sort=='weight_asc' %}selected{% endif %}>Weight ↑</option>
|
||||
<option value="weight_desc" {% if sort=='weight_desc' %}selected{% endif %}>Weight ↓</option>
|
||||
<option value="capacity_desc" {% if sort=='capacity_desc' %}selected{% endif %}>Capacity ↓</option>
|
||||
<option value="class_desc" {% if sort=='class_desc' %}selected{% endif %}>Class ↓</option>
|
||||
<option value="efficiency_desc" {% if sort=='efficiency_desc' %}selected{% endif %}>Carry Efficiency ↓</option>
|
||||
<option value="name_asc" {% if sort=='name_asc' %}selected{% endif %}>Name A→Z</option>
|
||||
</select>
|
||||
<button type="submit">Filter</button>
|
||||
</form>
|
||||
<table class="gear-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th><th>Name</th><th>Class</th><th>Capacity (slots)</th><th>Zones</th><th>Weight</th><th>Carry Efficiency</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in armored_rigs %}
|
||||
<tr>
|
||||
<td>{% if item.grid_image_url %}<img src="{{ item.grid_image_url }}" loading="lazy" alt="">{% endif %}</td>
|
||||
<td class="name-cell">
|
||||
@@ -671,9 +750,7 @@
|
||||
{% if item.wiki_url %}<a href="{{ item.wiki_url }}" target="_blank" style="font-size:0.78rem;margin-left:4px">wiki</a>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if item.armor_class %}
|
||||
<span class="cls cls-{{ item.armor_class }}">{{ item.armor_class }}</span>
|
||||
{% else %}<span class="muted">—</span>{% endif %}
|
||||
<span class="cls cls-{{ item.armor_class }}">{{ item.armor_class }}</span>
|
||||
</td>
|
||||
<td class="muted">{{ item.capacity or '—' }}</td>
|
||||
<td class="muted" style="font-size:0.8rem">{{ item.zones or '—' }}</td>
|
||||
@@ -681,9 +758,14 @@
|
||||
{% if item.weight_kg is not none %}{{ "%.3f"|format(item.weight_kg) }} kg{% else %}—{% endif %}
|
||||
{% if item.id in carrier_ids_with_open_slots %}<br><small class="muted">no plates</small>{% endif %}
|
||||
</td>
|
||||
<td class="muted">
|
||||
{% if item.slots_per_kg is not none %}
|
||||
<span title="{{ "%.3f"|format(item.kg_per_slot) }} kg/slot">{{ "%.2f"|format(item.slots_per_kg) }} slots/kg</span>
|
||||
{% else %}—{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="6" class="empty">No rigs found.</td></tr>
|
||||
<tr><td colspan="7" class="empty">No armored rigs found.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user