v0.1.1 -
feat: collector task checklist. chore: docs updated, gitignore updated. Docs: TARKOV_DEV_API.md fully explains tarkov.dev's api for future coding agents and forgetful people llike me.
This commit is contained in:
143
templates/collector.html
Normal file
143
templates/collector.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!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="/">← Back to Keys</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 %}
|
||||
|
||||
<form method="post" action="/collector/toggle" style="margin:0">
|
||||
<input type="hidden" name="quest_id" value="{{ quest.id }}">
|
||||
<input type="hidden" name="done" value="{{ '0' if quest.done else '1' }}">
|
||||
<div class="quest-row {% if quest.done %}done{% endif %}">
|
||||
<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" type="submit">
|
||||
{{ '✓ Done' if quest.done else 'Mark done' }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% if ns.current_trader is not none %}</div>{% endif %}
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user