Improve interface and subject display (Thanks to the blabber.im group chat).

This commit is contained in:
Schimon Jehudah, Adv. 2024-10-14 12:31:31 +03:00
parent 928f5272e0
commit 26d92eff7c
5 changed files with 145 additions and 61 deletions

View file

@ -6,7 +6,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<title>XMPP: {{action}} {{title}}</title>
<title>XMPP: {{action}} {% if title %}{{title}}{% else %}{{jid_bare}}{% endif %}</title>
<meta name="description" content="{{action}} {{title}}" />
<meta name="generator" content="Fast And Sleek Invite" />
<meta name="uri" content="{{xmpp_uri}}" />
@ -36,8 +36,8 @@
{% if links %}
<div id="action-bar">
{% for link in links %}
<a href="{{link[1]}}">
{{link[0]}}
<a href="{{link['href']}}" id="{{link['iden']}}">
{{link['name']}}
</a>
{% endfor %}
</div>
@ -46,7 +46,7 @@
{% if filename %}
<img id="photo" src="/photo/{{filename}}" />
{% endif %}
<span>
<span id="titles">
<h1>{% if jid_title %}{{jid_title}}{% else %}Group Chat{% endif %}</h1>
<a href="/{{jid_bare}}">
<h2>{% if jid_note %}{{jid_note}}{% else %}{{jid_bare}}{% endif %}</h2>
@ -56,9 +56,7 @@
</div>
<div>
{% if subject %}
<h3>
{{subject}}
</h3>
<pre id="subject">{{subject}}</pre>
{% endif %}
</div>
{% if messages %}
@ -89,21 +87,21 @@
{% endif %}
{% if number_of_pages %}
<div id="number-of-pages">
{% if number_of_pages > 5 %}
{% if number_of_pages > 3 %}
{% if page_number < 2 %}
<span class="inactive">First</span>
<span class="inactive" id="first">First</span>
<span class="inactive">Back</span>
{% else %}
<a href="?page=1">First</a>
<a href="?page=1" id="first">First</a>
<a href="?page={{page_number-1}}">Back</a>
{% endif %}
<a href="?page={{page_number}}">{{page_number}}</a>
{% if page_number == number_of_pages %}
<span class="inactive">Proceed</span>
<span class="inactive">Last</span>
<span class="inactive" id="last">Last</span>
{% else %}
<a href="?page={{page_number+1}}">Proceed</a>
<a href="?page={{number_of_pages}}">Last</a>
<a href="?page={{number_of_pages}}" id="last">Last</a>
{% endif %}
{% else %}
{% for number in range(number_of_pages) %}

View file

@ -92,15 +92,17 @@
Preview journal OR Preview group chat
</a>
</div -->
<div id="count">
<a href="{{view_href}}">
{% if count %}
{{count}} {{instance}}
{% else %}
Preview
{% endif %}
</a>
</div>
{% if count or jid_kind in ('mix', 'muc') %}
<div id="count">
<a href="{{view_href}}">
{% if count %}
{{count}} {{instance}}
{% elif jid_kind in ('mix', 'muc') %}
Preview
{% endif %}
</a>
</div>
{% endif %}
<!-- div>
<a href="https://xmpp.org">
<img id="logo-bottom" src="/img/logo-wordmark-vertical.svg" />

View file

@ -6,7 +6,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<title>XMPP: {{action}} {{title}}</title>
<title>XMPP: {{action}} {% if title %}{{title}}{% else %}{{jid_bare}}{% endif %}</title>
<meta name="description" content="{{action}} {{title}}" />
<meta name="generator" content="Fast And Sleek Invite" />
<meta name="uri" content="{{xmpp_uri}}" />
@ -36,8 +36,8 @@
{% if links %}
<div id="action-bar">
{% for link in links %}
<a href="{{link[1]}}">
{{link[0]}}
<a href="{{link['href']}}" id="{{link['iden']}}">
{{link['name']}}
</a>
{% endfor %}
</div>
@ -46,7 +46,7 @@
{% if filename %}
<img id="photo" src="/photo/{{filename}}" />
{% endif %}
<span>
<span id="titles">
<h1>{{node_title}}</h1>
<a href="/{{jid_bare}}/{{node_name}}">
<h2>{{jid_title}}</h2>
@ -81,7 +81,7 @@
class="permalink">
🔗️
</a>
<a href="{{entry['link']}}">
<a href="{{entry['href']}}">
{{entry['title']}}
</a>
</div>
@ -96,21 +96,21 @@
{% endif %}
{% if number_of_pages %}
<div id="number-of-pages">
{% if number_of_pages > 5 %}
{% if number_of_pages > 3 %}
{% if page_number < 2 %}
<span class="inactive">First</span>
<span class="inactive" id="first">First</span>
<span class="inactive">Back</span>
{% else %}
<a href="?page=1">First</a>
<a href="?page=1" id="first">First</a>
<a href="?page={{page_number-1}}">Back</a>
{% endif %}
<a href="?page={{page_number}}">{{page_number}}</a>
{% if page_number == number_of_pages %}
<span class="inactive">Proceed</span>
<span class="inactive">Last</span>
<span class="inactive" id="last">Last</span>
{% else %}
<a href="?page={{page_number+1}}">Proceed</a>
<a href="?page={{number_of_pages}}">Last</a>
<a href="?page={{number_of_pages}}" id="last">Last</a>
{% endif %}
{% else %}
{% for number in range(number_of_pages) %}
@ -121,7 +121,8 @@
{% endif %}
{% if previous %}
<div id="number-of-pages">
<a href="./">Previous</a>
<!-- a href="./">Return to {{node_title}}</a -->
<a href="./">Return</a>
</div>
{% endif %}
<!-- div>