From bd11cc6c0da144430429660d4c3918808718d58e Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 6 Aug 2025 18:27:29 +0800 Subject: [PATCH] Fix inaccessible /categories and /tags routes (#251) Signed-off-by: Ryan Wang --- i18n/default.properties | 3 +++ i18n/es.properties | 3 +++ i18n/zh_CN.properties | 3 +++ i18n/zh_TW.properties | 3 +++ templates/categories.html | 54 ++++++++++++++++++++++++------------- templates/tags.html | 56 +++++++++++++++++++++++++-------------- 6 files changed, 83 insertions(+), 39 deletions(-) diff --git a/i18n/default.properties b/i18n/default.properties index 64848dc..7295779 100644 --- a/i18n/default.properties +++ b/i18n/default.properties @@ -24,8 +24,11 @@ page.moments.title=Moments page.photos.title=Photos page.tags.title=Tags page.tags.morePosts=More Posts +page.tags.empty=No Tags page.tag.title=Tag: {0} page.categories.title=Categories +page.categories.morePosts=More Posts +page.categories.empty=No Categories page.category.title=Category: {0} page.author.title=Author: {0} page.error.backToHome=Back to Home diff --git a/i18n/es.properties b/i18n/es.properties index a1a243f..3111455 100644 --- a/i18n/es.properties +++ b/i18n/es.properties @@ -24,8 +24,11 @@ page.moments.title=Momentos page.photos.title=Galería page.tags.title=Etiquetas page.tags.morePosts=Más Publicaciones +page.tags.empty=No hay Etiquetas page.tag.title=Etiqueta: {0} page.categories.title=Categorías +page.categories.morePosts=Más Publicaciones +page.categories.empty=No hay Categorías page.category.title=Categoría: {0} page.author.title=Autor: {0} page.error.backToHome=Volver al Inicio diff --git a/i18n/zh_CN.properties b/i18n/zh_CN.properties index 77be93b..006539d 100644 --- a/i18n/zh_CN.properties +++ b/i18n/zh_CN.properties @@ -24,8 +24,11 @@ page.moments.title=瞬间 page.photos.title=图库 page.tags.title=标签 page.tags.morePosts=更多文章 +page.tags.empty=暂无标签 page.tag.title=标签:{0} page.categories.title=分类 +page.categories.morePosts=更多文章 +page.categories.empty=暂无分类 page.category.title=分类:{0} page.author.title=作者:{0} page.error.backToHome=返回首页 diff --git a/i18n/zh_TW.properties b/i18n/zh_TW.properties index fd9ae49..7018411 100644 --- a/i18n/zh_TW.properties +++ b/i18n/zh_TW.properties @@ -24,8 +24,11 @@ page.moments.title=瞬間 page.photos.title=圖庫 page.tags.title=標籤 page.tags.morePosts=更多文章 +page.tags.empty=暫無標籤 page.tag.title=標籤:{0} page.categories.title=分類 +page.categories.morePosts=更多文章 +page.categories.empty=暫無分類 page.category.title=分類:{0} page.author.title=作者:{0} page.error.backToHome=返回首頁 diff --git a/templates/categories.html b/templates/categories.html index c8fc1fb..b287ec2 100644 --- a/templates/categories.html +++ b/templates/categories.html @@ -7,28 +7,44 @@ - -
- - - + +
+
+
-
- -
+ + th:with="posts = ${postFinder.listByCategory(1,10,category.metadata.name)},list_layout=${theme.config.layout.post_list_layout}" + > +
+ + + +
+ +
+ +
+ +
diff --git a/templates/tags.html b/templates/tags.html index eb66c86..1033ed2 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -8,29 +8,45 @@
- - -
- - - + + +
+
+
-
- -
+ + +
+ + + +
- +
+ +
+ + +