- Created loadout.html for a comprehensive loadout planner, allowing users to filter and view gear options across various categories including guns, armor, helmets, headwear, backpacks, and rigs. - Implemented a build builder feature to calculate total loadout weight and save builds. - Added quests.html to display quest trees with trader dependencies, filtering options, and quest completion tracking.
179 lines
4.6 KiB
HTML
179 lines
4.6 KiB
HTML
<!doctype html>
|
||
<html>
|
||
<head>
|
||
<title>OnlyScavs – Collector Checklist</title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<style>
|
||
:root {
|
||
--bg: #121212;
|
||
--panel: #1a1a1a;
|
||
--text: #eee;
|
||
--muted: #bbb;
|
||
--border: #333;
|
||
--accent: #9ccfff;
|
||
--done-bg: #1a2a1a;
|
||
--done-text: #6ec96e;
|
||
}
|
||
body {
|
||
font-family: sans-serif;
|
||
background: var(--bg);
|
||
color: var(--text);
|
||
margin: 0;
|
||
padding: 16px;
|
||
}
|
||
.page {
|
||
max-width: 780px;
|
||
margin: 0 auto;
|
||
}
|
||
h1 { margin-bottom: 4px; }
|
||
.subtitle {
|
||
color: var(--muted);
|
||
margin: 0 0 16px;
|
||
font-size: 0.95rem;
|
||
}
|
||
.progress-bar-wrap {
|
||
background: var(--panel);
|
||
border: 1px solid var(--border);
|
||
border-radius: 999px;
|
||
height: 10px;
|
||
margin-bottom: 20px;
|
||
overflow: hidden;
|
||
}
|
||
.progress-bar-fill {
|
||
background: var(--done-text);
|
||
height: 100%;
|
||
border-radius: 999px;
|
||
transition: width 0.3s;
|
||
}
|
||
.trader-group { margin-bottom: 8px; }
|
||
.trader-header {
|
||
font-size: 0.8rem;
|
||
font-weight: bold;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.08em;
|
||
color: var(--muted);
|
||
padding: 12px 0 4px;
|
||
border-bottom: 1px solid var(--border);
|
||
margin-bottom: 4px;
|
||
}
|
||
.quest-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 8px 4px;
|
||
border-bottom: 1px solid #222;
|
||
border-radius: 4px;
|
||
}
|
||
.quest-row.done {
|
||
background: var(--done-bg);
|
||
}
|
||
.quest-row.done .quest-name {
|
||
text-decoration: line-through;
|
||
color: var(--done-text);
|
||
}
|
||
.quest-name {
|
||
flex: 1;
|
||
font-size: 0.95rem;
|
||
}
|
||
.quest-name a {
|
||
color: var(--accent);
|
||
font-size: 0.8rem;
|
||
margin-left: 6px;
|
||
}
|
||
.toggle-btn {
|
||
background: #2a2a2a;
|
||
color: var(--text);
|
||
border: 1px solid #444;
|
||
border-radius: 6px;
|
||
padding: 4px 10px;
|
||
cursor: pointer;
|
||
font-size: 0.85rem;
|
||
white-space: nowrap;
|
||
}
|
||
.quest-row.done .toggle-btn {
|
||
background: #1e3a1e;
|
||
border-color: #3a6a3a;
|
||
color: var(--done-text);
|
||
}
|
||
nav { margin-bottom: 20px; }
|
||
nav a { color: var(--accent); font-size: 0.9rem; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="page">
|
||
<nav>
|
||
<a href="/">← Keys</a>
|
||
|
|
||
<a href="/quests">Quest Trees</a>
|
||
|
|
||
<a href="/loadout">Loadout Planner</a>
|
||
</nav>
|
||
<h1>Collector Checklist</h1>
|
||
<p class="subtitle">
|
||
{{ done }} / {{ total }} quests completed
|
||
</p>
|
||
|
||
<div class="progress-bar-wrap">
|
||
<div class="progress-bar-fill" style="width: {{ (done / total * 100) | round(1) if total else 0 }}%"></div>
|
||
</div>
|
||
|
||
{% set ns = namespace(current_trader=None) %}
|
||
{% for quest in quests %}
|
||
{% if quest.trader != ns.current_trader %}
|
||
{% if ns.current_trader is not none %}</div>{% endif %}
|
||
<div class="trader-group">
|
||
<div class="trader-header">{{ quest.trader }}</div>
|
||
{% set ns.current_trader = quest.trader %}
|
||
{% endif %}
|
||
|
||
<div class="quest-row {% if quest.done %}done{% endif %}" id="quest-{{ quest.id }}" data-id="{{ quest.id }}" data-done="{{ '1' if quest.done else '0' }}">
|
||
<span class="quest-name">
|
||
{{ quest.name }}
|
||
{% if quest.wiki_link %}
|
||
<a href="{{ quest.wiki_link }}" target="_blank">wiki</a>
|
||
{% endif %}
|
||
</span>
|
||
<button class="toggle-btn" onclick="toggle(this)">
|
||
{{ '✓ Done' if quest.done else 'Mark done' }}
|
||
</button>
|
||
</div>
|
||
{% endfor %}
|
||
{% if ns.current_trader is not none %}</div>{% endif %}
|
||
|
||
</div>
|
||
<script>
|
||
let doneCount = {{ done }};
|
||
const total = {{ total }};
|
||
|
||
function updateProgress() {
|
||
document.querySelector('.subtitle').textContent = doneCount + ' / ' + total + ' quests completed';
|
||
const pct = total ? (doneCount / total * 100).toFixed(1) : 0;
|
||
document.querySelector('.progress-bar-fill').style.width = pct + '%';
|
||
}
|
||
|
||
function toggle(btn) {
|
||
const row = btn.closest('.quest-row');
|
||
const id = row.dataset.id;
|
||
const nowDone = row.dataset.done === '1' ? 0 : 1;
|
||
|
||
const body = new URLSearchParams({ quest_id: id, done: nowDone });
|
||
fetch('/collector/toggle', { method: 'POST', body })
|
||
.then(r => r.json())
|
||
.then(() => {
|
||
row.dataset.done = nowDone;
|
||
if (nowDone) {
|
||
row.classList.add('done');
|
||
btn.textContent = '✓ Done';
|
||
doneCount++;
|
||
} else {
|
||
row.classList.remove('done');
|
||
btn.textContent = 'Mark done';
|
||
doneCount--;
|
||
}
|
||
updateProgress();
|
||
});
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|