diff --git a/i18n/de.toml b/i18n/de.toml index 7530ae9a..1a5e683c 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -106,7 +106,6 @@ other = "Teilen auf" contents= "Inhalt" repost= "" publishedOnDate= "veröffentlicht an {{ .Date }}" -includedInCategories= "enthalten in {{ .Categories }}" views = "Aufrufe" comments = "Kommentare" author = "Autor" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "Passwort" encryptyAgain = "" +[single.includedIn] +categories = "enthalten in {{ .Categories }}" +collections = "enthalten in {{ .Collections }}" +both = "enthalten in {{ .Categories }} und {{ .Collections }}" + [single.wordCount] one = "Ein Wort" other = "{{ .Count }} Wörter" diff --git a/i18n/en.toml b/i18n/en.toml index 0fbaa52a..46eab613 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -105,7 +105,6 @@ other = "Share on" contents = "Contents" repost = "Repost" publishedOnDate = "published on {{ .Date }}" -includedInCategories = "included in {{ .Categories }}" views = "views" comments = "comments" author = "Author" @@ -121,6 +120,11 @@ encryptedMessage = "Please enter the password" password = "Password" encryptyAgain = "Encrypt again" +[single.includedIn] +categories = "included in {{ .Categories }}" +collections = "included in {{ .Collections }}" +both = "included in {{ .Categories }} and {{ .Collections }}" + [single.wordCount] one = "One word" other = "{{ .Count }} words" diff --git a/i18n/es.toml b/i18n/es.toml index f76800d9..ebcce785 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -106,7 +106,6 @@ other = "Compartir en" contents= "Contenido" repost= "" publishedOnDate= "publicado el {{ .Date }}" -includedInCategories= "incluido en {{ .Categories }}" views = "vistas" comments = "Comentarios" author = "Autor" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "Contraseña" encryptyAgain = "" +[single.includedIn] +categories = "incluido en {{ .Categories }}" +collections = "incluido en {{ .Collections }}" +both = "incluido en {{ .Categories }} y {{ .Collections }}" + [single.wordCount] one = "Una palabra" other = "{{ .Count }} palabras" diff --git a/i18n/fr.toml b/i18n/fr.toml index bfa28cc3..65aac9a6 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -105,7 +105,6 @@ other = "Partager via" contents= "Contenus" repost= "Reposter" publishedOnDate= "publié le {{ .Date }}" -includedInCategories= "inclus dans {{ .Categories }}" views = "vues" comments = "commentaires" author = "Auteur" @@ -121,6 +120,11 @@ encryptedMessage = "Entrer le mot de passe" password = "Mot de passe" encryptyAgain = "Chiffrer à nouveau" +[single.includedIn] +categories = "inclus dans {{ .Categories }}" +collections = "inclus dans {{ .Collections }}" +both = "inclus dans {{ .Categories }} et {{ .Collections }}" + [single.wordCount] one = "1 mot" other = "{{ .Count }} mots" diff --git a/i18n/it.toml b/i18n/it.toml index 6d4b20df..ece275ef 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -106,7 +106,6 @@ other = "Condividi su" contents= "Contenuti" repost= "" publishedOnDate= "pubblicato su {{ .Date }}" -includedInCategories= "incluso in {{ .Categories }}" views = "visualizzazioni" comments = "commenti" author = "Autore" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "Password" encryptyAgain = "" +[single.includedIn] +categories = "incluso in {{ .Categories }}" +collections = "incluso in {{ .Collections }}" +both = "incluso in {{ .Categories }} e {{ .Collections }}" + [single.wordCount] one = "Una parola" other = "{{ .Count }} parole" diff --git a/i18n/pl.toml b/i18n/pl.toml index ddca26fb..35541a73 100644 --- a/i18n/pl.toml +++ b/i18n/pl.toml @@ -106,7 +106,6 @@ other = "Udostępnij na" contents= "Spis treści" repost= "" publishedOnDate= "opublikowano {{ .Date }}" -includedInCategories= "zawarty w {{ .Categories }}" views = "wyświetleń" comments = "komentarzy" author = "Autor" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "Hasło" encryptyAgain = "" +[single.includedIn] +categories = "zawarty w {{ .Categories }}" +collections = "zawarty w {{ .Collections }}" +both = "zawarty w {{ .Categories }} i {{ .Collections }}" + [single.wordCount] one = "Jedno słowo" other = "{{ .Count }} słów" diff --git a/i18n/pt-BR.toml b/i18n/pt-BR.toml index d5c55ad7..c2f84b0c 100644 --- a/i18n/pt-BR.toml +++ b/i18n/pt-BR.toml @@ -106,7 +106,6 @@ other = "Compartilhe em" contents= "Conteúdos" repost= "" publishedOnDate= "publicado em {{ .Date }}" -includedInCategories= "incluido em {{ .Categories }}" views = "visualizações" comments = "comentários" author = "Autor" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "Contrasinha" encryptyAgain = "" +[single.includedIn] +categories = "incluido em {{ .Categories }}" +collections = "incluido em {{ .Collections }}" +both = "incluido em {{ .Categories }} e {{ .Collections }}" + [single.wordCount] one = "Uma palavra" other = "{{ .Count }} palavras" diff --git a/i18n/ro.toml b/i18n/ro.toml index e3981b8a..7afc903d 100644 --- a/i18n/ro.toml +++ b/i18n/ro.toml @@ -106,7 +106,6 @@ other = "Distribuie pe" contents= "Cuprins" repost= "" publishedOnDate= "publicat la {{ .Date }}" -includedInCategories= "inclus în {{ .Categories }}" views = "vizualizări" comments = "comentarii" author = "Autor" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "Parolă" encryptyAgain = "" +[single.includedIn] +categories = "inclus în {{ .Categories }}" +collections = "inclus în {{ .Collections }}" +both = "inclus în {{ .Categories }} și {{ .Collections }}" + [single.wordCount] one = "Un cuvânt" other = "{{ .Count }} cuvinte" diff --git a/i18n/ru.toml b/i18n/ru.toml index 2d8cf6e7..a8d164b2 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -106,7 +106,6 @@ other = "Поделиться в" contents= "Содержание" repost= "" publishedOnDate= "Опубликовано {{ .Date }}" -includedInCategories= "включен в {{ .Categories }}" views = "просмотров" comments = "комментариев" author = "Автор" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "арготизм" encryptyAgain = "" +[single.includedIn] +categories = "включен в {{ .Categories }}" +collections = "включен в {{ .Collections }}" +both = "включен в {{ .Categories }} и {{ .Collections }}" + [single.wordCount] one = "Одно слово" other = "{{ .Count }} слов" diff --git a/i18n/sr.toml b/i18n/sr.toml index 0c171693..f97b8c7e 100644 --- a/i18n/sr.toml +++ b/i18n/sr.toml @@ -106,7 +106,6 @@ other = "Подели на" contents= "Садржаји" repost= "" publishedOnDate= "објављено {{ .Date }}" -includedInCategories= "укључено {{ .Categories }}" views = "прегледа" comments = "коментари" author = "Аутор" @@ -122,6 +121,11 @@ encryptedMessage = "" password = "Паролица" encryptyAgain = "" +[single.includedIn] +categories = "укључено {{ .Categories }}" +collections = "укључено {{ .Collections }}" +both = "укључено {{ .Categories }} и {{ .Collections }}" + [single.wordCount] one = "Једна реч" other = "{{ .Count }} речи" diff --git a/i18n/vi.toml b/i18n/vi.toml index 378cedd4..ae04e26b 100644 --- a/i18n/vi.toml +++ b/i18n/vi.toml @@ -105,7 +105,6 @@ other = "Chia sẻ trên" contents= "Nội dung" repost= "" publishedOnDate= "đăng ngày {{ .Date }}" -includedInCategories= "trong {{ .Categories }}" views = "lượt xem" comments = "bình luận" author = "Tác giả" @@ -121,6 +120,11 @@ encryptedMessage = "" password = "Mật khẩu" encryptyAgain = "" +[single.includedIn] +categories = "trong {{ .Categories }}" +collections = "trong {{ .Collections }}" +both = "trong {{ .Categories }} và {{ .Collections }}" + [single.wordCount] one = "One word" other = "{{ .Count }} từ" diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml index 084fd398..271b0871 100644 --- a/i18n/zh-CN.toml +++ b/i18n/zh-CN.toml @@ -104,7 +104,6 @@ other = "分享到" contents= "目录" repost= "转载" publishedOnDate= "发布于 {{ .Date }}" -includedInCategories= "收录于 {{ .Categories }}" views = "次阅读" comments = "条评论" author = "作者" @@ -120,6 +119,11 @@ encryptedMessage = "请输入密码" password = "密码" encryptyAgain = "重新加密" +[single.includedIn] +categories = "收录于 {{ .Categories }}" +collections = "收录于 {{ .Collections }}" +both = "收录于 {{ .Categories }} 和 {{ .Collections }}" + [single.wordCount] other = "{{ .Count }} 字" diff --git a/i18n/zh-TW.toml b/i18n/zh-TW.toml index 3732c671..92685876 100644 --- a/i18n/zh-TW.toml +++ b/i18n/zh-TW.toml @@ -104,7 +104,6 @@ other = "分享到" contents= "目錄" repost= "轉貼" publishedOnDate= "發佈於 {{ .Date }}" -includedInCategories= "收錄於 {{ .Categories }}" views = "次閱讀" comments = "條評論" author = "作者" @@ -120,6 +119,11 @@ encryptedMessage = "請輸入密碼" password = "密碼" encryptyAgain = "重新加密" +[single.includedIn] +categories = "收錄於 {{ .Categories }}" +collections = "收錄於 {{ .Collections }}" +both = "收錄於 {{ .Categories }} 和 {{ .Collections }}" + [single.wordCount] other = "{{ .Count }} 字" diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 7ec4a328..0970e865 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -40,16 +40,7 @@ {{- end -}} - {{- $categories := slice -}} - {{- range .Params.categories -}} - {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}} - {{- $categories = $categories | append (printf `%v %v` (partial "function/escapeurl.html" $category.RelPermalink) (dict "Class" "fa-regular fa-folder fa-fw" | partial "plugin/icon.html") $category.Title) -}} - {{- end -}} - {{- with delimit $categories " " -}} -   - {{- dict "Categories" . | T "single.includedInCategories" | safeHTML -}} - - {{- end -}} + {{- partial "single/post-included-in.html" . -}} {{- /* Summary content */ -}} diff --git a/layouts/partials/single/post-included-in.html b/layouts/partials/single/post-included-in.html new file mode 100644 index 00000000..ee614adb --- /dev/null +++ b/layouts/partials/single/post-included-in.html @@ -0,0 +1,37 @@ +{{- $categories := slice -}} +{{- range .Params.categories -}} + {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}} + {{- $categories = $categories | append ( + printf `%v %v` + (partial "function/escapeurl.html" $category.RelPermalink) + (printf "%v - %v" (T "category") $category.Title) + (dict "Class" "fa-regular fa-folder fa-fw" | partial "plugin/icon.html") + $category.Title + ) -}} +{{- end -}} +{{- $categoriesStr := delimit $categories " " -}} + +{{- $collections := slice -}} +{{- range .Params.collections -}} + {{- $collection := partialCached "function/path.html" . . | printf "/collections/%v" | $.Site.GetPage -}} + {{- $collections = $collections | append ( + printf `%v %v` + (partial "function/escapeurl.html" $collection.RelPermalink) + (printf "%v - %v" (T "collection") $collection.Title) + (dict "Class" "fa-solid fa-layer-group fa-fw" | partial "plugin/icon.html") + $collection.Title + ) -}} +{{- end -}} +{{- $collectionStr := delimit $collections " " -}} + +{{- if .Params.categories | or .Params.collections -}} + + {{- if not .Params.collections -}} +  {{- dict "Categories" $categoriesStr | T "single.includedIn.categories" | safeHTML -}} + {{- else if not .Params.categories -}} +  {{- dict "Collections" $collectionStr | T "single.includedIn.collections" | safeHTML -}} + {{- else -}} +  {{- dict "Categories" $categoriesStr "Collections" $collectionStr | T "single.includedIn.both" | safeHTML -}} + {{- end -}} + +{{- end -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 1c356561..140dc87e 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -4,7 +4,7 @@ {{- $params := .Scratch.Get "params" -}} {{- $toc := .Scratch.Get "toc" -}} -