add anchors to posts
This commit is contained in:
parent
2cf6ef7c6f
commit
a899e9f5a9
@ -12,6 +12,9 @@ import argparse, json, os, re, shutil
|
||||
from datetime import datetime
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
import sys
|
||||
reload(sys); sys.setdefaultencoding('utf-8')
|
||||
|
||||
def fromunixtime(value):
|
||||
return datetime.fromtimestamp(value).strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
|
@ -9,7 +9,9 @@
|
||||
<body>
|
||||
<h1>{{ thread.title }}</h1>
|
||||
{% for post in thread.posts %}
|
||||
<h3><a href={{ "../../user/" + post.user.name |url_replacer + ".html" }}>{{ post.user.name }}</a> - {{ post.timestamp | fromunixtime }}</h3>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user