From 18507fe97197d6c4f41875cd007ee087f9eed1ff Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 31 Jan 2024 21:07:25 +0200 Subject: [PATCH] show next post icon on mobile --- files/assets/js/post_navigation.js | 6 ++++-- files/templates/header.html | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/files/assets/js/post_navigation.js b/files/assets/js/post_navigation.js index d1d4bbfa2..28b9a0d86 100644 --- a/files/assets/js/post_navigation.js +++ b/files/assets/js/post_navigation.js @@ -4,7 +4,9 @@ if (current_index > -1) { const id_after = post_permalinks[current_index+1] if (id_after) { - document.getElementById('post_navigation').classList.remove('d-none') - document.getElementById('post_after').href = id_after.slice(1, -1) + for (const btn of document.getElementsByClassName('post_navigation')) { + btn.classList.remove('d-none') + btn.href = id_after.slice(1, -1) + } } } diff --git a/files/templates/header.html b/files/templates/header.html index 37b56d19f..1cecebbce 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -181,6 +181,12 @@ {% endif %} + {% if request.path.startswith('/post/') and p %} + + + + {% endif %} + {% if not (v and v.patron) and not (v and v.admin_level) %} {% if v %}