Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions component-library/components/cards/cards.bookshop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ blueprint:
mode:
content:
link:
links:
-
title:
url:
icon:
force:
orientation:
class:
width:
Expand Down
12 changes: 12 additions & 0 deletions component-library/components/cards/cards.hugo.html
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions component-library/components/hero/hero.bookshop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ blueprint:
width:
link-type:
links:
-
title:
url:
icon:
force:
align:
order:
overlay-mode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -21,7 +27,7 @@ blueprint:
icon:
content:
client:
name:
contact:
url:
image:
mode:
Expand Down
13 changes: 12 additions & 1 deletion component-library/components/testimonials/testimonials.hugo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@
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
"cols" .cols
"icon-style" (or .icon_style (index . "icon-style"))
) }}

{{ $raw = printf "%s%s" $raw $partial }}

{{ if $raw }}
{{ partial "utilities/section.html" (dict
"component-name" "testimonials"
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/page/blocks.html
Original file line number Diff line number Diff line change
@@ -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" -}}
<div class="mt-{{ $padding.y }}"></div>
{{ end }}
{{ end }}
{{ end }}