Voyage/templates/thread.html
2019-12-17 18:46:54 -05:00

56 lines
1.9 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>
</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>