fix gallery js code

This commit is contained in:
Nuno Coração 2024-01-28 17:06:04 +00:00
parent f481e64411
commit 392e89722d
4 changed files with 8 additions and 3 deletions

View file

@ -50,6 +50,7 @@ disableTextInHeader = false
showDate = true
showViews = false
showLikes = false
showDateOnlyInArticle = false
showDateUpdated = false
showAuthor = true
showHero = false

View file

@ -50,6 +50,7 @@ smartTOCHideUnfocusedChildren = false
showDate = false
showViews = true
showLikes = true
showDateOnlyInArticle = false
showDateUpdated = false
showAuthor = true
showHero = true

View file

@ -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

View file

@ -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 }}