Software /
code /
prosody-modules
Changeset
3690:8c0a6d4541d5
mod_http_muc_log: Wrap navigation in unorderded lists (thanks jonas’)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 30 Sep 2019 00:27:25 +0200 |
parents | 3689:65e94270c413 |
children | 3691:be430d077d1c |
files | mod_http_muc_log/http_muc_log.html mod_http_muc_log/mod_http_muc_log.lua |
diffstat | 2 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_muc_log/http_muc_log.html Sun Sep 29 18:53:00 2019 +0100 +++ b/mod_http_muc_log/http_muc_log.html Mon Sep 30 00:27:25 2019 +0200 @@ -45,8 +45,10 @@ <header> <h1 title="xmpp:{jid?}">{title}</h1> <nav> -<a href="xmpp:{jid?}?join">Join using a client</a>{links# -<a class="{item.rel?}" href="{item.href}{hide_presence&?p=h}" rel="{item.rel?}">{item.text}</a>} +<ul> +<li><a href="xmpp:{jid?}?join">Join using a client</a></li>{links# +<li><a class="{item.rel?}" href="{item.href}{hide_presence&?p=h}" rel="{item.rel?}">{item.text}</a></li>} +</ul> </nav> </header> <hr> @@ -95,8 +97,10 @@ </div> <hr> <footer> -<nav>{links# -<a class="{item.rel?}" href="{item.href}{hide_presence&?p=h}" rel="{item.rel?}">{item.text}</a>} +<nav> +<ul>{links# +<li><a class="{item.rel?}" href="{item.href}{hide_presence&?p=h}" rel="{item.rel?}">{item.text}</a></li>} +</ul> </nav> <br> <div class="powered-by">Prosody</div>
--- a/mod_http_muc_log/mod_http_muc_log.lua Sun Sep 29 18:53:00 2019 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Mon Sep 30 00:27:25 2019 +0200 @@ -359,6 +359,16 @@ end end + local links = { + { href = "./", rel = "up", text = "Calendar" }, + }; + if prev_when ~= "" then + table.insert(links, { href = prev_when, rel = "prev", text = prev_when}); + end + if next_when ~= "" then + table.insert(links, { href = next_when, rel = "next", text = next_when}); + end + response.headers.content_type = "text/html; charset=utf-8"; return render(template, { title = ("%s - %s"):format(get_room(room):get_name(), date); @@ -366,11 +376,7 @@ hide_presence = hide_presence(request); presence_available = presence_logged; lines = logs; - links = { - { href = "./", rel = "up", text = "Calendar" }, - { href = prev_when, rel = "prev", text = prev_when}, - { href = next_when, rel = "next", text = next_when}, - }; + links = links; }); end