From e06f703799154e824ea49a392ed05285382fd51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sat, 27 Jan 2024 21:10:30 +0000 Subject: [PATCH 1/4] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bcfa5b4f..18f9a5dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.52.0", + "version": "2.53.0", "description": "Blowfish theme for Hugo", "scripts": { "postinstall": "vendor-copy", From c97a2b0d040f47640a1c43e19cd90459ccaf9edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sun, 28 Jan 2024 16:30:35 +0000 Subject: [PATCH 2/4] fix gallery js code --- assets/js/shortcodes/gallery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/shortcodes/gallery.js b/assets/js/shortcodes/gallery.js index bc61fadb..1365bb5b 100644 --- a/assets/js/shortcodes/gallery.js +++ b/assets/js/shortcodes/gallery.js @@ -7,7 +7,8 @@ function _getDefaultPackeryOptions() { } (function init() { - window.addEventListener("DOMContentLoaded", (event) => { + + $(window).on("load", function () { console.groupCollapsed('[DEBUG] Gallery feature enable'); let packeries = []; let nodeGalleries = document.querySelectorAll('.gallery'); From 392e89722d35e9be7443d684aa67f49737e26df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sun, 28 Jan 2024 17:06:04 +0000 Subject: [PATCH 3/4] fix gallery js code --- config/_default/params.toml | 1 + exampleSite/config/_default/params.toml | 1 + exampleSite/content/docs/configuration/index.md | 5 +++-- layouts/partials/article-meta/basic.html | 4 +++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index 4ec4494b..5bd80fd6 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -50,6 +50,7 @@ disableTextInHeader = false showDate = true showViews = false showLikes = false + showDateOnlyInArticle = false showDateUpdated = false showAuthor = true showHero = false diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 11319d68..ed3328af 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -50,6 +50,7 @@ smartTOCHideUnfocusedChildren = false showDate = false showViews = true showLikes = true + showDateOnlyInArticle = false showDateUpdated = false showAuthor = true showHero = true diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 4f2b7fe0..1594ef56 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -203,7 +203,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | | `homepage.showRecent` | `false` | Whether or not to display the recent articles list on the homepage. | | `homepage.showRecentItems` | 5 | How many articles to display if showRecent is true. If variable is set to 0 or if it isn't defined the system will default to 5 articles. | -| `homepage.showMoreLink` | `false` | Whether or not to display a show more link at the end of your posts that takes the user to a predefined place. | +| `homepage.showMoreLink` | `false` | Whether or not to display a show more link at the end of your posts that takes the user to a predefined place. | | `homepage.showMoreLinkDest` | `/posts` | The destination of the show more button. | | `homepage.cardView` | `false` | Display recent articles as a gallery of cards. | | `homepage.cardViewScreenWidth` | `false` | Enhance the width of the recent articles card gallery to take the full width available. | @@ -215,6 +215,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showDate` | `true` | Whether or not article dates are displayed. | | `article.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. | | `article.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. | +| `article.showDateOnlyInArticle` | `false` | Show date within article even if not displayed in article listings/cards. | | `article.showDateUpdated` | `false` | Whether or not the dates articles were updated are displayed. | | `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. | | `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. | @@ -239,7 +240,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showWordCount` | `false` | Whether or not article word counts are displayed. | | `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | | `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "linkedin", "twitter", "reddit", "pinterest", "facebook", "email", "whatsapp", and "telegram" | -| `article.showZenMode` | `false` | Flag to activate Zen Mode reading feature for articles. | +| `article.showZenMode` | `false` | Flag to activate Zen Mode reading feature for articles. | ### List diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index 5b158130..1fd4d72e 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -12,7 +12,9 @@ {{ $meta := newScratch }} {{/* Gather partials for this context */}} -{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }} +{{ if .Params.showDate | default (.Site.Params.article.showDate | default false) }} + {{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }} +{{else if and (eq $scope "single") (.Params.showDateOnlyInArticle | default (.Site.Params.article.showDateOnlyInArticle | default false)) }} {{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }} {{ end }} From 8c4fb4d64c0075abec8650e5b408a7c6fa479c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Sun, 28 Jan 2024 17:09:49 +0000 Subject: [PATCH 4/4] fix small default --- layouts/partials/article-meta/basic.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index 1fd4d72e..40d12d53 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -12,7 +12,7 @@ {{ $meta := newScratch }} {{/* Gather partials for this context */}} -{{ if .Params.showDate | default (.Site.Params.article.showDate | default false) }} +{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }} {{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }} {{else if and (eq $scope "single") (.Params.showDateOnlyInArticle | default (.Site.Params.article.showDateOnlyInArticle | default false)) }} {{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }}