diff --git a/src/css/components/blocks/rich-text.scss b/src/css/components/blocks/rich-text.scss index f2a48876..4b5ceacb 100644 --- a/src/css/components/blocks/rich-text.scss +++ b/src/css/components/blocks/rich-text.scss @@ -78,10 +78,21 @@ } figure { + margin: 10px 0 30px 0; width: 100%; - margin: 10px 0 30px; - background-color: #f7f7f7; - box-shadow: 0px 70px 50px -50px rgba(0,0,0,0.2); + + img, picture { + background-color: #f7f7f7; + box-shadow: 0px 70px 50px -50px rgba(0,0,0,0.2); + } + + figcaption { + font-family: 'EuropaSansRegular', sans-serif; + font-size: 12px; + margin: 10px auto 0 auto; + max-width: 500px; + text-align: center; + } } &.layout-imageFullWidth figure { diff --git a/templates/_/components/block-matrix.twig b/templates/_/components/block-matrix.twig index 686c6b07..70ba018b 100644 --- a/templates/_/components/block-matrix.twig +++ b/templates/_/components/block-matrix.twig @@ -1,4 +1,4 @@ -{% set contentBlocks = contentBlocks ?? null ? contentBlocks : entry.contentBlocks.all() %} +{% set contentBlocks = contentBlocks ?? entry.contentBlocks.all() ?? [] %} {% if contentBlocks | length %} diff --git a/templates/_/components/blocks/imageAndHeadings.twig b/templates/_/components/blocks/imageAndHeadings.twig index 6ddf8109..7b83d0a2 100644 --- a/templates/_/components/blocks/imageAndHeadings.twig +++ b/templates/_/components/blocks/imageAndHeadings.twig @@ -2,7 +2,7 @@ {% set isFirst = isFirst ? 'isFirst' : '' %} -{% set image = theBlock.image.eagerly().one() ?? null %} +{% set image = theBlock.image.eagerly().one() %} {% set textColor = theBlock.textColor | default('#000') %} {% set highlightText = theBlock.highlightText ? 'is-highlighted' : '' %} diff --git a/templates/_/components/blocks/slider.twig b/templates/_/components/blocks/slider.twig index dc1cb57e..a13f6719 100644 --- a/templates/_/components/blocks/slider.twig +++ b/templates/_/components/blocks/slider.twig @@ -1,7 +1,7 @@ {# @var craft \craft\web\twig\variables\CraftVariable #} {% set ctaLinkText = theBlock.ctaLinkText %} -{% set ctaLink = theBlock.ctaLink.eagerly().one().url ?? null %} +{% set ctaLink = theBlock.ctaLink.eagerly().one() %} {% set slideImages = theBlock.slideImages.eagerly().all() %} {% set slideEntries = theBlock.slideEntries.eagerly().all() %} {% set slideLayoutCentered = theBlock.slideLayoutCentered %} @@ -12,9 +12,9 @@

diff --git a/templates/_/components/blocks/statsAndImage.twig b/templates/_/components/blocks/statsAndImage.twig index 602bdd66..28f23606 100644 --- a/templates/_/components/blocks/statsAndImage.twig +++ b/templates/_/components/blocks/statsAndImage.twig @@ -1,6 +1,6 @@ {# @var craft \craft\web\twig\variables\CraftVariable #} -{% set image = theBlock.image.one() ?? null %} +{% set image = theBlock.image.eagerly().one() %}
diff --git a/templates/_/pages/about.twig b/templates/_/pages/about.twig index 8f580e2b..49b9964d 100644 --- a/templates/_/pages/about.twig +++ b/templates/_/pages/about.twig @@ -9,7 +9,7 @@ {% block content %} {% set heroTitle = entry.heroTitle | default(entry.title) %} - {% set heroImage = entry.heroImage.one() ?? null %} + {% set heroImage = entry.heroImage.one() %}
diff --git a/templates/_/pages/contact.twig b/templates/_/pages/contact.twig index ab3224f2..74c7f91f 100644 --- a/templates/_/pages/contact.twig +++ b/templates/_/pages/contact.twig @@ -16,7 +16,7 @@ {{ entry.title }}

- {% set heroImage = entry.heroImage.one() ?? null %} + {% set heroImage = entry.heroImage.one() %} {% if heroImage %} diff --git a/templates/_/pages/exhibitions.twig b/templates/_/pages/exhibitions.twig index 92fec3e3..338022cd 100644 --- a/templates/_/pages/exhibitions.twig +++ b/templates/_/pages/exhibitions.twig @@ -16,7 +16,7 @@ {{ entry.title }} - {% set heroImage = entry.heroImage.one() ?? null %} + {% set heroImage = entry.heroImage.one() %} {% if heroImage %} diff --git a/templates/_/pages/visit.twig b/templates/_/pages/visit.twig index bb76915a..c5cf3a8b 100644 --- a/templates/_/pages/visit.twig +++ b/templates/_/pages/visit.twig @@ -16,7 +16,7 @@ {{ entry.title }} - {% set heroImage = entry.heroImage.one() ?? null %} + {% set heroImage = entry.heroImage.one() %} {% if heroImage %}