aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/resources
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-24 15:30:51 +0300
committerGravatar Vitaly Takmazov2018-10-24 15:30:51 +0300
commit0886b0290dd35b01776856db40e960863f200c68 (patch)
tree6ff79fcbdd5f9eb56691427cd3c7bd40af6e6a99 /juick-server/src/main/resources
parent13bf7289cc2dac1897530e6d465bf0a0fef8b3d1 (diff)
AcitvityPub: render Note using pebble
Diffstat (limited to 'juick-server/src/main/resources')
-rw-r--r--juick-server/src/main/resources/templates/layouts/note.html7
-rw-r--r--juick-server/src/main/resources/templates/views/macros/tags.html6
2 files changed, 13 insertions, 0 deletions
diff --git a/juick-server/src/main/resources/templates/layouts/note.html b/juick-server/src/main/resources/templates/layouts/note.html
new file mode 100644
index 00000000..57ec667f
--- /dev/null
+++ b/juick-server/src/main/resources/templates/layouts/note.html
@@ -0,0 +1,7 @@
+{% import "views/macros/tags" %}
+{% if msg.tags.size > 0 %}
+<div class="msg-tags">
+ {{ allTags(baseUri, msg.tags | tagsList) }}
+</div>
+{% endif %}
+<p>{{ msg | formatMessage }}</p> \ No newline at end of file
diff --git a/juick-server/src/main/resources/templates/views/macros/tags.html b/juick-server/src/main/resources/templates/views/macros/tags.html
index 09278ffe..1e668292 100644
--- a/juick-server/src/main/resources/templates/views/macros/tags.html
+++ b/juick-server/src/main/resources/templates/views/macros/tags.html
@@ -2,4 +2,10 @@
{% for tag in tagsList %}
<a href="/{{ uname }}/?tag={{ tag | urlencode }}">{{ tag | raw }}</a>
{% endfor %}
+{% endmacro %}
+
+{% macro allTags(baseUri, tagsList) %}
+{% for tag in tagsList %}
+<a href="{{ baseUri }}tag/{{ tag | urlencode }}">{{ tag | raw }}</a>
+{% endfor %}
{% endmacro %} \ No newline at end of file