diff --git a/component-library/components/cards/cards.bookshop.yml b/component-library/components/cards/cards.bookshop.yml index 3969667..eae2605 100644 --- a/component-library/components/cards/cards.bookshop.yml +++ b/component-library/components/cards/cards.bookshop.yml @@ -31,6 +31,12 @@ blueprint: mode: content: link: + links: + - + title: + url: + icon: + force: orientation: class: width: diff --git a/component-library/components/cards/cards.hugo.html b/component-library/components/cards/cards.hugo.html index 95258d4..9ad17c5 100644 --- a/component-library/components/cards/cards.hugo.html +++ b/component-library/components/cards/cards.hugo.html @@ -65,6 +65,18 @@ "wrapper" (printf "d-none d-%s-block" $breakpoint.prev) ))) -}} +{{ $links := "" }} +{{ if .links }} + {{ $links = partial "assets/links.html" (dict + "page" page + "links" .links + "align" "start" + "justify" "start" + "link-type" .link_type + ) }} + {{ $raw = printf "%s%s" $raw $links }} +{{ end }} + {{ if $raw }} {{ partial "utilities/section.html" (dict "component-name" "cards" diff --git a/component-library/components/hero/hero.bookshop.yml b/component-library/components/hero/hero.bookshop.yml index 12cfa30..57602a7 100644 --- a/component-library/components/hero/hero.bookshop.yml +++ b/component-library/components/hero/hero.bookshop.yml @@ -32,6 +32,11 @@ blueprint: width: link-type: links: + - + title: + url: + icon: + force: align: order: overlay-mode: diff --git a/component-library/components/testimonials/testimonials.bookshop.yml b/component-library/components/testimonials/testimonials.bookshop.yml index 9716f19..e351406 100644 --- a/component-library/components/testimonials/testimonials.bookshop.yml +++ b/component-library/components/testimonials/testimonials.bookshop.yml @@ -9,6 +9,12 @@ spec: # Defines the structure of this component, as well as the default values blueprint: + heading: + preheading: + heading: + content: + align: + width: background: color: subtle: @@ -21,7 +27,7 @@ blueprint: icon: content: client: - name: + contact: url: image: mode: diff --git a/component-library/components/testimonials/testimonials.hugo.html b/component-library/components/testimonials/testimonials.hugo.html index 1b7c3f9..95898be 100644 --- a/component-library/components/testimonials/testimonials.hugo.html +++ b/component-library/components/testimonials/testimonials.hugo.html @@ -9,8 +9,17 @@ https://github.com/CloudCannon/bookshop/blob/main/guides/hugo.adoc#passing-data-to-bookshop-components */}} +{{/* Initialize global arguments */}} +{{- $padding := partial "utilities/GetPadding.html" -}} + {{/* Main code */}} -{{ $raw := partial "assets/testimonial-carousel.html" (dict +{{- $raw := partial "assets/section-title.html" (dict + "heading" .heading + "justify" .justify + "class" (printf "pb-%d" $padding.y)) +-}} + +{{ $partial := partial "assets/testimonial-carousel.html" (dict "carousel" .carousel "testimonials" .testimonials "card" .card @@ -18,6 +27,8 @@ "icon-style" (or .icon_style (index . "icon-style")) ) }} +{{ $raw = printf "%s%s" $raw $partial }} + {{ if $raw }} {{ partial "utilities/section.html" (dict "component-name" "testimonials" diff --git a/layouts/partials/page/blocks.html b/layouts/partials/page/blocks.html index dd3138b..9860e7b 100644 --- a/layouts/partials/page/blocks.html +++ b/layouts/partials/page/blocks.html @@ -1,4 +1,13 @@ {{ with .Params.content_blocks }} {{ partial "bookshop_bindings" `.Params.content_blocks` | safeHTML }} {{ partial "bookshop_partial" (slice "page" .) | safeHTML }} + + {{ $last := . | last 1 }} + {{ with index $last 0 }} + {{ $fluid := index . "fluid" | default true }} + {{ if and (index (index . "background") "color") (not $fluid) }} + {{- $padding := partial "utilities/GetPadding.html" -}} +
+ {{ end }} + {{ end }} {{ end }}