From 48bc9d9e297d14bd549bd10513537052d7ce221c Mon Sep 17 00:00:00 2001 From: czaks Date: Wed, 16 Apr 2014 11:58:41 +0200 Subject: add some files missing from the previous commit --- templates/post/flag.html | 18 +++++++++++++ templates/post/image.html | 45 ++++++++++++++++++++++++++++++++ templates/post/image_identification.html | 10 +++++++ 3 files changed, 73 insertions(+) create mode 100644 templates/post/flag.html create mode 100644 templates/post/image.html create mode 100644 templates/post/image_identification.html (limited to 'templates/post') diff --git a/templates/post/flag.html b/templates/post/flag.html new file mode 100644 index 00000000..61622368 --- /dev/null +++ b/templates/post/flag.html @@ -0,0 +1,18 @@ +{% if config.display_flags and post.modifiers.flag %} + {{ post.modifiers['flag alt'] | e('html_attr') }} +{% endif %} diff --git a/templates/post/image.html b/templates/post/image.html new file mode 100644 index 00000000..5020f782 --- /dev/null +++ b/templates/post/image.html @@ -0,0 +1,45 @@ + + {% if post.thumb|extension == 'webm' %} + + {% else %} + + {% endif %} + diff --git a/templates/post/image_identification.html b/templates/post/image_identification.html new file mode 100644 index 00000000..3d3bd655 --- /dev/null +++ b/templates/post/image_identification.html @@ -0,0 +1,10 @@ +{% if post.thumb != 'file' and config.image_identification %} + , + + io + {% if post.file|extension == 'jpg' %} + e + {% endif %} + g + +{% endif %} -- cgit v1.3 From 59874b83769259e3a1b0730405e5f65e46243666 Mon Sep 17 00:00:00 2001 From: czaks Date: Wed, 16 Apr 2014 15:01:37 +0200 Subject: modularize post templates a little more --- templates/post/ip.html | 3 +++ templates/post/name.html | 16 ++++++++++++++++ templates/post/poster_id.html | 3 +++ templates/post/subject.html | 5 +++++ templates/post/time.html | 1 + templates/post_reply.html | 33 ++++++--------------------------- templates/post_thread.html | 32 +++++--------------------------- 7 files changed, 39 insertions(+), 54 deletions(-) create mode 100644 templates/post/ip.html create mode 100644 templates/post/name.html create mode 100644 templates/post/poster_id.html create mode 100644 templates/post/subject.html create mode 100644 templates/post/time.html (limited to 'templates/post') 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) %} + [{{ post.ip }}] +{% 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 #} + +{% 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 #} + {{ post.subject|bidi_cleanup }} +{% 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 @@ + diff --git a/templates/post_reply.html b/templates/post_reply.html index 530d2626..90ac5065 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -5,35 +5,14 @@

- {% if config.poster_ids %} - ID: {{ post.ip|poster_id(post.thread) }} - {% endif %} + {% include 'post/poster_id.html' %} + No. {{ post.id }} diff --git a/templates/post_thread.html b/templates/post_thread.html index acacd602..f74427e4 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -36,35 +36,13 @@

- {% endif %} - {% if capcode %} - {{ capcode.cap }} - {% endif %} - {% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %} - [{{ post.ip }}] - {% endif %} + {% include 'post/subject.html' %} + {% include 'post/name.html' %} + {% include 'post/ip.html' %} {% include 'post/flag.html' %} - + {% include 'post/time.html' %} - {% if config.poster_ids %} - ID: {{ post.ip|poster_id(post.id) }} - {% endif %} + {% include 'post/poster_id.html' %} No. {{ post.id }} -- cgit v1.3