78 lines
2.6 KiB
HTML
78 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Voyage</title>
|
|
<link rel="stylesheet" type="text/css" href="/static/voyage.css">
|
|
<script>const url_prefix = "{{ url_prefix }}";</script>
|
|
<script type="text/javascript" src="/static/voyage.js"></script>
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.8">
|
|
<meta name="description" content="A quest archive viewer.">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>Voyage</h1>
|
|
<span id="visibility_menu_toggle" onclick="toggle_visibility_menu(event)">Visibility</span>
|
|
<div id="visibility_menu" style="display: none;">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Tag</th>
|
|
<th>Faded</th>
|
|
<th>Hidden</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>non-qm posts</td><td><input type="checkbox" onchange="toggle_visibility(event)" checked></td><td><input type="checkbox" onchange="toggle_visibility(event)"></td>
|
|
</tr>
|
|
{% for tag in tags_vis %}
|
|
<tr>
|
|
<td>{{ tag }}</td><td><input type="checkbox" onchange="toggle_visibility(event)"></td><td><input type="checkbox" onchange="toggle_visibility(event)"></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</header>
|
|
<main>
|
|
{% for post in posts %}
|
|
<div id="{{ post.id }}" class="post_container{% if tags[post.id] %} {{ ' '.join(tags[post.id]) }}{% endif %}{% if 'qm_post' not in tags[post.id] %} faded{% endif %}">
|
|
<div class="tags">
|
|
{% for tag in tags.get(post.id, []) %}
|
|
<span class="tag">{{ tag }} <span class="tag_button" onclick="remove_tag(event)">-</span></span>
|
|
{% endfor %}
|
|
<span class="tag"><input type="text"><span class="tag_button" onclick="add_tag(event)">+</span></span>
|
|
</div>
|
|
<div class="header">
|
|
{% if post.subject %}
|
|
<span class="subject">{{ post.subject }}</span>
|
|
{% endif %}
|
|
<span class="name">{{ post.name }}</span>
|
|
{% if post.tripcode %}
|
|
<span class="tripcode">{{ post.tripcode }}</span>
|
|
{% endif %}
|
|
<span class="time">{{ post.time.astimezone().strftime('%Y-%m-%d %H:%M') }}</span>
|
|
<span class="id">No.{{ post.id }}</span>
|
|
{% if backlinks.get(post.id) %}
|
|
<span class="backlinks">
|
|
{% for link in backlinks[post.id] %}
|
|
<a class="backlink" href="#{{ link }}">>>{{ link }}</a>
|
|
{% endfor %}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
<div class="body">
|
|
{% for line in post.body.splitlines() %}
|
|
{% if line.startswith('>') %}
|
|
<span class="quote">{{ line|quotelink(links[post.id]) }}</span><br>
|
|
{% else %}
|
|
{{ line|quotelink(links[post.id]) }}<br>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</main>
|
|
</body>
|
|
</html>
|