From 4eff9129aba6477511c3cfafa9d2626fa236f9b0 Mon Sep 17 00:00:00 2001 From: Steven vanZyl Date: Fri, 12 Sep 2025 16:41:39 -0400 Subject: [PATCH] feat(ui): add "back to top" link --- internal/locale/translations/de_DE.json | 1 + internal/locale/translations/el_EL.json | 1 + internal/locale/translations/en_US.json | 1 + internal/locale/translations/es_ES.json | 1 + internal/locale/translations/fi_FI.json | 1 + internal/locale/translations/fr_FR.json | 1 + internal/locale/translations/hi_IN.json | 1 + internal/locale/translations/id_ID.json | 1 + internal/locale/translations/it_IT.json | 1 + internal/locale/translations/ja_JP.json | 1 + .../locale/translations/nan_Latn_pehoeji.json | 1 + internal/locale/translations/nl_NL.json | 1 + internal/locale/translations/pl_PL.json | 1 + internal/locale/translations/pt_BR.json | 1 + internal/locale/translations/ro_RO.json | 1 + internal/locale/translations/ru_RU.json | 1 + internal/locale/translations/tr_TR.json | 1 + internal/locale/translations/uk_UA.json | 1 + internal/locale/translations/zh_CN.json | 1 + internal/locale/translations/zh_TW.json | 1 + .../template/templates/common/pagination.html | 2 ++ internal/template/templates/views/categories.html | 4 ++++ internal/template/templates/views/entry.html | 2 ++ internal/ui/static/bin/sprite.svg | 5 +++++ internal/ui/static/css/common.css | 15 +++++++++++++++ 25 files changed, 48 insertions(+) diff --git a/internal/locale/translations/de_DE.json b/internal/locale/translations/de_DE.json index 19b139bb..6b7ee2bc 100644 --- a/internal/locale/translations/de_DE.json +++ b/internal/locale/translations/de_DE.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Nächste Aktualisierung:", "page.feeds.read_counter": "Anzahl der gelesenen Artikel", "page.feeds.title": "Abonnements", + "page.footer.elevator": "Back to top", "page.history.title": "Verlauf", "page.import.title": "Importieren", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/el_EL.json b/internal/locale/translations/el_EL.json index e2bdff56..9b14f075 100644 --- a/internal/locale/translations/el_EL.json +++ b/internal/locale/translations/el_EL.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Επόμενος έλεγχος:", "page.feeds.read_counter": "Αριθμός αναγνωσμένων καταχωρήσεων", "page.feeds.title": "Ροές", + "page.footer.elevator": "Back to top", "page.history.title": "Ιστορικό", "page.import.title": "Εισαγωγή", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/en_US.json b/internal/locale/translations/en_US.json index 93fbddde..35bff0f4 100644 --- a/internal/locale/translations/en_US.json +++ b/internal/locale/translations/en_US.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Next check:", "page.feeds.read_counter": "Number of read entries", "page.feeds.title": "Feeds", + "page.footer.elevator": "Back to top", "page.history.title": "History", "page.import.title": "Import", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/es_ES.json b/internal/locale/translations/es_ES.json index 7afc7f5f..80de07fb 100644 --- a/internal/locale/translations/es_ES.json +++ b/internal/locale/translations/es_ES.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Próxima verificación:", "page.feeds.read_counter": "Número de artículos leídos", "page.feeds.title": "Fuentes", + "page.footer.elevator": "Back to top", "page.history.title": "Historial", "page.import.title": "Importar", "page.integration.bookmarklet": "Marcapáginas", diff --git a/internal/locale/translations/fi_FI.json b/internal/locale/translations/fi_FI.json index ba6a31c7..fbe3a909 100644 --- a/internal/locale/translations/fi_FI.json +++ b/internal/locale/translations/fi_FI.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Next check:", "page.feeds.read_counter": "Luettujen artikkeleiden määrä", "page.feeds.title": "Syötteet", + "page.footer.elevator": "Back to top", "page.history.title": "Historia", "page.import.title": "Tuo", "page.integration.bookmarklet": "Sovelluskirjanmerkki", diff --git a/internal/locale/translations/fr_FR.json b/internal/locale/translations/fr_FR.json index e0215822..8d695c77 100644 --- a/internal/locale/translations/fr_FR.json +++ b/internal/locale/translations/fr_FR.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Prochaine vérification :", "page.feeds.read_counter": "Nombre d'entrées lues", "page.feeds.title": "Abonnements", + "page.footer.elevator": "Back to top", "page.history.title": "Historique", "page.import.title": "Importation", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/hi_IN.json b/internal/locale/translations/hi_IN.json index 28914da5..0a50fd66 100644 --- a/internal/locale/translations/hi_IN.json +++ b/internal/locale/translations/hi_IN.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Next check:", "page.feeds.read_counter": "पड़े हुए विषयवस्तुया", "page.feeds.title": "फ़ीड", + "page.footer.elevator": "Back to top", "page.history.title": "इतिहास", "page.import.title": "आयात", "page.integration.bookmarklet": "बुकमार्कलेट", diff --git a/internal/locale/translations/id_ID.json b/internal/locale/translations/id_ID.json index 0bfa1f89..cb26e018 100644 --- a/internal/locale/translations/id_ID.json +++ b/internal/locale/translations/id_ID.json @@ -468,6 +468,7 @@ "page.feeds.next_check": "Akan diperiksa kembali:", "page.feeds.read_counter": "Jumlah entri yang telah dibaca", "page.feeds.title": "Umpan", + "page.footer.elevator": "Back to top", "page.history.title": "Riwayat", "page.import.title": "Impor", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/it_IT.json b/internal/locale/translations/it_IT.json index fa896696..f5dae9f4 100644 --- a/internal/locale/translations/it_IT.json +++ b/internal/locale/translations/it_IT.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Next check:", "page.feeds.read_counter": "Numero di voci lette", "page.feeds.title": "Feed", + "page.footer.elevator": "Back to top", "page.history.title": "Cronologia", "page.import.title": "Importa", "page.integration.bookmarklet": "Segnalibro", diff --git a/internal/locale/translations/ja_JP.json b/internal/locale/translations/ja_JP.json index cad72160..7e0829ea 100644 --- a/internal/locale/translations/ja_JP.json +++ b/internal/locale/translations/ja_JP.json @@ -468,6 +468,7 @@ "page.feeds.next_check": "Next check:", "page.feeds.read_counter": "既読記事の数", "page.feeds.title": "フィード一覧", + "page.footer.elevator": "Back to top", "page.history.title": "履歴", "page.import.title": "インポート", "page.integration.bookmarklet": "ブックマークレット", diff --git a/internal/locale/translations/nan_Latn_pehoeji.json b/internal/locale/translations/nan_Latn_pehoeji.json index 0acca29b..63627ffe 100644 --- a/internal/locale/translations/nan_Latn_pehoeji.json +++ b/internal/locale/translations/nan_Latn_pehoeji.json @@ -468,6 +468,7 @@ "page.feeds.next_check": "Āu-pái kiám-cha sî-kan:", "page.feeds.read_counter": "Tha̍k kè--ê siau-sit sò͘", "page.feeds.title": "Siau-sit lâi-goân", + "page.footer.elevator": "Back to top", "page.history.title": "Kì-lo̍k", "page.import.title": "Hōe-li̍p", "page.integration.bookmarklet": "Chheh-chhiam ke-si", diff --git a/internal/locale/translations/nl_NL.json b/internal/locale/translations/nl_NL.json index 1c5b48c2..1562837a 100644 --- a/internal/locale/translations/nl_NL.json +++ b/internal/locale/translations/nl_NL.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Volgende controle:", "page.feeds.read_counter": "Aantal gelezen artikelen", "page.feeds.title": "Feeds", + "page.footer.elevator": "Back to top", "page.history.title": "Geschiedenis", "page.import.title": "Importeren", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/pl_PL.json b/internal/locale/translations/pl_PL.json index 3016d869..8f2af4e6 100644 --- a/internal/locale/translations/pl_PL.json +++ b/internal/locale/translations/pl_PL.json @@ -480,6 +480,7 @@ "page.feeds.next_check": "Następna aktualizacja:", "page.feeds.read_counter": "Liczba przeczytanych wpisów", "page.feeds.title": "Kanały", + "page.footer.elevator": "Back to top", "page.history.title": "Historia", "page.import.title": "Importuj", "page.integration.bookmarklet": "Skryptozakładka", diff --git a/internal/locale/translations/pt_BR.json b/internal/locale/translations/pt_BR.json index 8af38a5f..0c97a68e 100644 --- a/internal/locale/translations/pt_BR.json +++ b/internal/locale/translations/pt_BR.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Próxima verificação:", "page.feeds.read_counter": "Número de itens lidos", "page.feeds.title": "Fontes", + "page.footer.elevator": "Back to top", "page.history.title": "Histórico", "page.import.title": "Importar", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/ro_RO.json b/internal/locale/translations/ro_RO.json index 56a97bb9..2d1f6714 100644 --- a/internal/locale/translations/ro_RO.json +++ b/internal/locale/translations/ro_RO.json @@ -480,6 +480,7 @@ "page.feeds.next_check": "Următoarea verificare:", "page.feeds.read_counter": "Numărul de intrări citite", "page.feeds.title": "Fluxuri", + "page.footer.elevator": "Back to top", "page.history.title": "Istoric", "page.import.title": "Import", "page.integration.bookmarklet": "Marcaje", diff --git a/internal/locale/translations/ru_RU.json b/internal/locale/translations/ru_RU.json index dde8a3da..e3bd71d5 100644 --- a/internal/locale/translations/ru_RU.json +++ b/internal/locale/translations/ru_RU.json @@ -480,6 +480,7 @@ "page.feeds.next_check": "Следующее обновление:", "page.feeds.read_counter": "Количество прочитанных статей", "page.feeds.title": "Подписки", + "page.footer.elevator": "Back to top", "page.history.title": "История", "page.import.title": "Импорт", "page.integration.bookmarklet": "Букмарклет", diff --git a/internal/locale/translations/tr_TR.json b/internal/locale/translations/tr_TR.json index 89abb7f9..2e85d248 100644 --- a/internal/locale/translations/tr_TR.json +++ b/internal/locale/translations/tr_TR.json @@ -474,6 +474,7 @@ "page.feeds.next_check": "Sonraki kontrol:", "page.feeds.read_counter": "Okunmuş makalelerin sayısı", "page.feeds.title": "Beslemeler", + "page.footer.elevator": "Back to top", "page.history.title": "Geçmiş", "page.import.title": "İçeri Aktar", "page.integration.bookmarklet": "Bookmarklet", diff --git a/internal/locale/translations/uk_UA.json b/internal/locale/translations/uk_UA.json index c9ff7ff0..14d6d6ab 100644 --- a/internal/locale/translations/uk_UA.json +++ b/internal/locale/translations/uk_UA.json @@ -480,6 +480,7 @@ "page.feeds.next_check": "Наступна перевірка:", "page.feeds.read_counter": "Кількість прочитаних записів", "page.feeds.title": "Стрічки", + "page.footer.elevator": "Back to top", "page.history.title": "Історія", "page.import.title": "Імпорт", "page.integration.bookmarklet": "Букмарклет", diff --git a/internal/locale/translations/zh_CN.json b/internal/locale/translations/zh_CN.json index 4e7516d1..bc355fa0 100644 --- a/internal/locale/translations/zh_CN.json +++ b/internal/locale/translations/zh_CN.json @@ -468,6 +468,7 @@ "page.feeds.next_check": "下次检查:", "page.feeds.read_counter": "已读条目数", "page.feeds.title": "订阅源", + "page.footer.elevator": "Back to top", "page.history.title": "历史记录", "page.import.title": "导入", "page.integration.bookmarklet": "书签小应用", diff --git a/internal/locale/translations/zh_TW.json b/internal/locale/translations/zh_TW.json index 59a61b90..bad9c8a4 100644 --- a/internal/locale/translations/zh_TW.json +++ b/internal/locale/translations/zh_TW.json @@ -468,6 +468,7 @@ "page.feeds.next_check": "下次檢查時間:", "page.feeds.read_counter": "已讀文章數", "page.feeds.title": "Feeds", + "page.footer.elevator": "Back to top", "page.history.title": "歷史", "page.import.title": "匯入", "page.integration.bookmarklet": "書籤小工具", diff --git a/internal/template/templates/common/pagination.html b/internal/template/templates/common/pagination.html index 7bcf870e..53c02de7 100644 --- a/internal/template/templates/common/pagination.html +++ b/internal/template/templates/common/pagination.html @@ -18,6 +18,8 @@ + {{ icon "up" }}{{ t "page.footer.elevator" }} +
{{ if .ShowNext }} diff --git a/internal/template/templates/views/categories.html b/internal/template/templates/views/categories.html index 91abdda9..3e775748 100644 --- a/internal/template/templates/views/categories.html +++ b/internal/template/templates/views/categories.html @@ -82,6 +82,10 @@ {{ end }}
+ + {{ end }} {{ end }} diff --git a/internal/template/templates/views/entry.html b/internal/template/templates/views/entry.html index 0b8e45dd..b5c60467 100644 --- a/internal/template/templates/views/entry.html +++ b/internal/template/templates/views/entry.html @@ -10,6 +10,8 @@ {{ end }}
+ {{ icon "up" }}{{ t "page.footer.elevator" }} +
{{ if .nextEntry }} diff --git a/internal/ui/static/bin/sprite.svg b/internal/ui/static/bin/sprite.svg index 54142d4f..3ff3b054 100644 --- a/internal/ui/static/bin/sprite.svg +++ b/internal/ui/static/bin/sprite.svg @@ -197,4 +197,9 @@ Source: https://github.com/tabler/tabler-icons + + + + + diff --git a/internal/ui/static/css/common.css b/internal/ui/static/css/common.css index d9f1a04a..9a318993 100644 --- a/internal/ui/static/css/common.css +++ b/internal/ui/static/css/common.css @@ -1327,3 +1327,18 @@ audio, video { .hidden { display: none; } + +footer { + margin: 1em auto; +} + +footer .elevator { + display: block; + width: fit-content; + margin: 0 auto; +} + +.pagination-top .elevator, +.pagination-entry-top .elevator { + display: none; +}