proboards-website-generator/templates/thread.html.j2
Sebastian Hugentobler a899e9f5a9 add anchors to posts
2015-05-13 11:43:17 +02:00

24 lines
808 B
Django/Jinja

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link href="styles.css" rel="stylesheet" type="text/css" />
<title>{{ title }}</title>
</head>
<body>
<h1>{{ thread.title }}</h1>
{% for post in thread.posts %}
<a href="#{{ loop.index }}">{{ loop.index }} - </a>
<b><a name="{{ loop.index }}" href={{ "../../user/" + post.user.name |url_replacer + ".html" }}>{{ post.user.name }}</a></b>
<i>({{ post.timestamp | fromunixtime }})</i>
<p>{{ post.message | tohtml }}</p>
{% for attachment in post.attachments %}
--<br>
<a href="{{ attachment.url.replace('{{baseurl}}', 'static') }}">{{ attachment.name }}</a>
{% endfor %}
<hr>
{% endfor %}
</body>
</html>