Skip to content

Commit

Permalink
feat(article-cards): add the bootstrap.article_cards.limit and bootst…
Browse files Browse the repository at this point in the history
…rap.article_cards.image_height parameter
  • Loading branch information
razonyang committed Nov 17, 2023
1 parent 37e5bf0 commit a878fba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ path = "github.com/hugomods/images"

[params.bootstrap.config_toggle]
langs = ["toml", "yaml", "json"]

[params.bootstrap.article_cards]
limit = 12
image_height = 240
4 changes: 2 additions & 2 deletions layouts/partials/bootstrap/article-cards.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- $summaryLen := 120 }}
{{- $limit := 12 }}
{{- $limit := default 12 site.Params.bootstrap.article_cards.limit }}
{{- $sections := slice }}
{{- $linkText := i18n "read_more" }}
{{- $itemAttrs := slice }}
{{- $imgHeight := 240 }}
{{- $imgHeight := default 240 site.Params.bootstrap.article_cards.image_height }}
{{- $imgPlaceholder := "NO IMAGE" }}
{{- if .IsNamedParams }}
{{- with .Get "limit" }}{{ $limit = . }}{{ end }}
Expand Down

0 comments on commit a878fba

Please sign in to comment.