a few more minor template indentation changes
This commit is contained in:
parent
1cf6ec52a1
commit
1d80f0a24e
|
@ -5,9 +5,9 @@
|
|||
<a class="flex-container" href="/posts/{{ peer.0.public_key | urlencode_strict }}">
|
||||
<code{% if selected_peer and peer.0.public_key == selected_peer %} style="font-weight: bold;"{% endif %}>
|
||||
{% if peer.0.name %}
|
||||
{{ peer.0.name }}
|
||||
{{ peer.0.name }}
|
||||
{% else %}
|
||||
{{ peer.0.public_key }}
|
||||
{{ peer.0.public_key }}
|
||||
{% endif %}
|
||||
</code>
|
||||
{% if peer.1 != "0" %}<p>{{ peer.1 }}</p>{% endif %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="content">
|
||||
{% if post %}
|
||||
{% if post %}
|
||||
{{ post.text | trim_start_matches(pat='"') | trim_end_matches(pat='"') | trim }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,13 @@
|
|||
{% for post in posts -%}
|
||||
<li{% if selected_post and post.key == selected_post %} class="selected"{% endif %}>
|
||||
<a class="flex-container"{% if not post.read %} style="font-weight: bold;"{% endif %} href="/posts/{{ selected_peer | urlencode_strict }}/{{ post.key | urlencode_strict }}">
|
||||
<code>{% if post.subject %}{{ post.subject | trim_start_matches(pat='"') }}...{% else %}{{ post.text | trim_start_matches(pat='"') | trim_end_matches(pat='"') }}{% endif %}</code>
|
||||
<code>
|
||||
{% if post.subject %}
|
||||
{{ post.subject | trim_start_matches(pat='"') }}...
|
||||
{% else %}
|
||||
{{ post.text | trim_start_matches(pat='"') | trim_end_matches(pat='"') }}
|
||||
{% endif %}
|
||||
</code>
|
||||
<p>{{ post.date }}</p>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -4,44 +4,44 @@
|
|||
<img src="/icons/download.png">
|
||||
</a>
|
||||
{% if post_is_selected %}
|
||||
{% if post.read %}
|
||||
{% set mark_unread_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/unread" %}
|
||||
<a class="disabled icon" title="Mark as read">
|
||||
<img src="/icons/read_post.png">
|
||||
</a>
|
||||
<a href={{ mark_unread_url }} class="icon" title="Mark as unread">
|
||||
<img src="/icons/unread_post.png">
|
||||
</a>
|
||||
{% if post.read %}
|
||||
{% set mark_unread_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/unread" %}
|
||||
<a class="disabled icon" title="Mark as read">
|
||||
<img src="/icons/read_post.png">
|
||||
</a>
|
||||
<a href={{ mark_unread_url }} class="icon" title="Mark as unread">
|
||||
<img src="/icons/unread_post.png">
|
||||
</a>
|
||||
{% else %}
|
||||
{% set mark_read_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/read" %}
|
||||
<a href={{ mark_read_url }} class="icon" title="Mark as read">
|
||||
<img src="/icons/read_post.png">
|
||||
</a>
|
||||
<a class="disabled icon" title="Mark as unread">
|
||||
<img src="/icons/unread_post.png">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% set delete_post_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/delete" %}
|
||||
<a href={{ delete_post_url }} class="icon" title="Delete post">
|
||||
<img src="/icons/delete_post.png">
|
||||
</a>
|
||||
{% else %}
|
||||
{% set mark_read_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/read" %}
|
||||
<a href={{ mark_read_url }} class="icon" title="Mark as read">
|
||||
<img src="/icons/read_post.png">
|
||||
</a>
|
||||
<a class="disabled icon" title="Mark as unread">
|
||||
<img src="/icons/unread_post.png">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% set delete_post_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/delete" %}
|
||||
<a href={{ delete_post_url }} class="icon" title="Delete post">
|
||||
<img src="/icons/delete_post.png">
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="disabled icon" title="Mark as read">
|
||||
<img src="/icons/read_post.png">
|
||||
</a>
|
||||
<a class="disabled icon" title="Mark as unread">
|
||||
<img src="/icons/unread_post.png">
|
||||
</a>
|
||||
<a class="disabled icon" title="Delete post">
|
||||
<img src="/icons/delete_post.png">
|
||||
</a>
|
||||
<a class="disabled icon" title="Mark as read">
|
||||
<img src="/icons/read_post.png">
|
||||
</a>
|
||||
<a class="disabled icon" title="Mark as unread">
|
||||
<img src="/icons/unread_post.png">
|
||||
</a>
|
||||
<a class="disabled icon" title="Delete post">
|
||||
<img src="/icons/delete_post.png">
|
||||
</a>
|
||||
{% endif %}
|
||||
<form class="flex-container" action="/subscribe" method="post">
|
||||
<label for="public_key">Public Key</label>
|
||||
{% if selected_peer %}
|
||||
<input type="text" id="public_key" name="public_key" maxlength=53 value={{ selected_peer }}>
|
||||
<input type="text" id="public_key" name="public_key" maxlength=53 value={{ selected_peer }}>
|
||||
{% else %}
|
||||
<input type="text" id="public_key" name="public_key" maxlength=53>
|
||||
<input type="text" id="public_key" name="public_key" maxlength=53>
|
||||
{% endif %}
|
||||
<input type="submit" value="Subscribe">
|
||||
<input type="submit" value="Unsubscribe" formaction="/unsubscribe">
|
||||
|
|
Loading…
Reference in New Issue