diff options
| author | czaks <marcin@6irc.net> | 2014-04-16 15:01:37 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-04-16 15:01:37 +0200 |
| commit | 59874b83769259e3a1b0730405e5f65e46243666 (patch) | |
| tree | 6610f5126a4f71affd0855996a74f2917ffcbd6a /templates/post | |
| parent | c4317cdbf7b24a9745f2126646162d527bd50c7b (diff) | |
modularize post templates a little more
Diffstat (limited to 'templates/post')
| -rw-r--r-- | templates/post/ip.html | 3 | ||||
| -rw-r--r-- | templates/post/name.html | 16 | ||||
| -rw-r--r-- | templates/post/poster_id.html | 3 | ||||
| -rw-r--r-- | templates/post/subject.html | 5 | ||||
| -rw-r--r-- | templates/post/time.html | 1 |
5 files changed, 28 insertions, 0 deletions
diff --git a/templates/post/ip.html b/templates/post/ip.html new file mode 100644 index 00000000..11581ff9 --- /dev/null +++ b/templates/post/ip.html @@ -0,0 +1,3 @@ +{% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %} + [<a class="ip-link" style="margin:0;" href="?/IP/{{ post.ip }}">{{ post.ip }}</a>] +{% endif %} diff --git a/templates/post/name.html b/templates/post/name.html new file mode 100644 index 00000000..009b234d --- /dev/null +++ b/templates/post/name.html @@ -0,0 +1,16 @@ +{% set capcode = post.capcode|capcode %} +{% if post.email|length > 0 %} + {# start email #} + <a class="email" href="mailto:{{ post.email }}"> +{% endif %} + <span {% if capcode.name %}style="{{ capcode.name }}" {% endif %}class="name">{{ post.name|bidi_cleanup }}</span> + {% if post.trip|length > 0 %} + <span {% if capcode.trip %}style="{{ capcode.trip }}" {% endif %}class="trip">{{ post.trip }}</span> + {% endif %} +{% if post.email|length > 0 %} + {# end email #} + </a> +{% endif %} +{% if capcode %} + {{ capcode.cap }} +{% endif %} diff --git a/templates/post/poster_id.html b/templates/post/poster_id.html new file mode 100644 index 00000000..3f168003 --- /dev/null +++ b/templates/post/poster_id.html @@ -0,0 +1,3 @@ +{% if config.poster_ids %} + ID: {{ post.ip|poster_id(post.id) }} +{% endif %} diff --git a/templates/post/subject.html b/templates/post/subject.html new file mode 100644 index 00000000..0d80d95e --- /dev/null +++ b/templates/post/subject.html @@ -0,0 +1,5 @@ +{% if post.subject|length > 0 %} + {# show subject #} + <span class="subject">{{ post.subject|bidi_cleanup }}</span> +{% endif %} + diff --git a/templates/post/time.html b/templates/post/time.html new file mode 100644 index 00000000..e6273f94 --- /dev/null +++ b/templates/post/time.html @@ -0,0 +1 @@ + <time datetime="{{ post.time|date('%Y-%m-%dT%H:%M:%S') }}{{ timezone() }}">{{ post.time|date(config.post_date) }}</time> |
