-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
197 additions
and
187 deletions.
There are no files selected for viewing
14 changes: 8 additions & 6 deletions
14
templates/_site/_snippet/_content/_blocks/_customTable.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{% if block.blockTitle|length %} | ||
<h2 class="text-center">{{ block.blockTitle }}</h2> | ||
{% endif %} | ||
<div class="text-editor custom-table"> | ||
{{block.table}} | ||
</div> | ||
{% apply enkode_emails %} | ||
{% if block.blockTitle|length %} | ||
<h2 class="text-center">{{ block.blockTitle }}</h2> | ||
{% endif %} | ||
<div class="text-editor custom-table"> | ||
{{block.table}} | ||
</div> | ||
{% endapply %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,36 @@ | ||
<div class="w-full {% if settings.centered is not defined %}md:w-8/12{% endif %}"> | ||
<div class="flex"> | ||
{% if block.authorImage|length %} | ||
<div class="mr-12"> | ||
{% set asset = block.authorImage|first %} | ||
{% do asset.setTransform({ width: 225, height: 225 }) %} | ||
{{ tag('img', { | ||
src: asset.url, | ||
width: asset.width, | ||
height: asset.height, | ||
srcset: asset.getSrcset(['1.5x', '2x', '3x']), | ||
alt: asset.alt ?? asset.title ?? block.author, | ||
class: "max-w-[225px] rounded-full", | ||
loading: "lazy" | ||
}) }} | ||
</div> | ||
{% endif %} | ||
<div> | ||
<blockquote> | ||
{% if block.text|length %} | ||
{{ block.text }} | ||
{% endif %} | ||
{% if block.writer|length %} | ||
<footer class="mt-4">{{ block.writer }}</footer> | ||
{% endif %} | ||
</blockquote> | ||
{% if block.cta|length %} | ||
<div class="mt-6"> | ||
{{ render_hyper_links(block.cta) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
{% apply enkode_emails %} | ||
<div class="w-full {% if settings.centered is not defined %}md:w-8/12{% endif %}"> | ||
<div class="flex"> | ||
{% if block.authorImage|length %} | ||
<div class="mr-12"> | ||
{% set asset = block.authorImage|first %} | ||
{% do asset.setTransform({ width: 225, height: 225 }) %} | ||
{{ tag('img', { | ||
src: asset.url, | ||
width: asset.width, | ||
height: asset.height, | ||
srcset: asset.getSrcset(['1.5x', '2x', '3x']), | ||
alt: asset.alt ?? asset.title ?? block.author, | ||
class: 'max-w-[225px] rounded-full', | ||
loading: 'lazy' | ||
}) }} | ||
</div> | ||
{% endif %} | ||
<div> | ||
<blockquote> | ||
{% if block.text|length %} | ||
{{ block.text }} | ||
{% endif %} | ||
{% if block.writer|length %} | ||
<footer class="mt-4">{{ block.writer }}</footer> | ||
{% endif %} | ||
</blockquote> | ||
{% if block.cta|length %} | ||
<div class="mt-6"> | ||
{{ render_hyper_links(block.cta) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endapply %} |
108 changes: 55 additions & 53 deletions
108
templates/_site/_snippet/_content/_blocks/_textImage.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,57 @@ | ||
{% set inverseClass = block.position == 'right' and block.image|length ? 'flex-row-reverse' : '' %} | ||
|
||
<div class="flex flex-wrap -mx-4 {{ inverseClass }}"> | ||
{% if block.image.eagerly().one() %} | ||
<div class="w-full px-4 md:w-1/2"> | ||
{% set image = block.image.collect().first() %} | ||
{% set optimizedImage = image.optimizedTextImage %} | ||
<picture> | ||
{% if craft.imageOptimize.serverSupportsWebP() and image.extension != 'svg' and image.extension != 'gif' %} | ||
<source srcset="{{ optimizedImage.srcsetWebP() }}" | ||
sizes="(max-width: 479px) 95vw, (min-width: 480px) and (max-width: 659px) 448px, (min-width: 660px) and (max-width: 819px) 628px, (min-width: 820px) and (max-width: 979px) 378px, (min-width: 980px) and (max-width: 1199px) 458px, (min-width: 1200px) 568px" | ||
type="image/webp"/> | ||
{% endif %} | ||
{% if image.extension == 'svg' or image.extension == 'gif' %} | ||
<img src="{{ image.getUrl() }}" | ||
width="{{image.width}}" height="{{image.height}}" | ||
alt="{{ image.alt }}" | ||
class="w-full" loading="lazy"/> | ||
{% else %} | ||
<img src="{{ optimizedImage.placeholderBox() }}" | ||
srcset="{{ optimizedImage.srcset() }}" | ||
sizes="(max-width: 479px) 95vw, (min-width: 480px) and (max-width: 659px) 448px, (min-width: 660px) and (max-width: 819px) 628px, (min-width: 820px) and (max-width: 979px) 378px, (min-width: 980px) and (max-width: 1199px) 458px, (min-width: 1200px) 568px" | ||
width="{{optimizedImage.placeholderWidth}}" height="{{optimizedImage.placeholderHeight}}" | ||
alt="{{ image.alt }}" | ||
class="w-full" loading="lazy"/> | ||
{% endif %} | ||
</picture> | ||
{% if image.imageCopyright|length or image.imageCaption|length %} | ||
<div class="mt-1 text-sm italic opacity-50"> | ||
{% if image.imageCaption|length %} | ||
{{ image.imageCaption }} | ||
{% endif %} | ||
{% if image.imageCopyright|length %} | ||
© {{ image.imageCopyright }} | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
<div class="w-full px-4 {% if block.image|length %}mt-8 md:mt-0 md:w-1/2{% else %}lg:w-3/4{% endif %}"> | ||
{% if block.blockTitle|length %} | ||
<h2 id="{{ block.blockTitle|slugify }}">{{ block.blockTitle }}</h2> | ||
{% endif %} | ||
{% if block.text|length %} | ||
<div class="text-editor"> | ||
{{ block.text }} | ||
</div> | ||
{% endif %} | ||
{% if block.cta|length %} | ||
<div class="flex flex-wrap items-baseline gap-4 mt-6"> | ||
{{ render_hyper_links(block.cta) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% apply enkode_emails %} | ||
<div class="flex flex-wrap -mx-4 {{ inverseClass }}"> | ||
{% if block.image.eagerly().one() %} | ||
<div class="w-full px-4 md:w-1/2"> | ||
{% set image = block.image.collect().first() %} | ||
{% set optimizedImage = image.optimizedTextImage %} | ||
<picture> | ||
{% if craft.imageOptimize.serverSupportsWebP() and image.extension != 'svg' and image.extension != 'gif' %} | ||
<source srcset="{{ optimizedImage.srcsetWebP() }}" | ||
sizes="(max-width: 479px) 95vw, (min-width: 480px) and (max-width: 659px) 448px, (min-width: 660px) and (max-width: 819px) 628px, (min-width: 820px) and (max-width: 979px) 378px, (min-width: 980px) and (max-width: 1199px) 458px, (min-width: 1200px) 568px" | ||
type="image/webp"/> | ||
{% endif %} | ||
{% if image.extension == 'svg' or image.extension == 'gif' %} | ||
<img src="{{ image.getUrl() }}" | ||
width="{{image.width}}" height="{{image.height}}" | ||
alt="{{ image.alt }}" | ||
class="w-full" loading="lazy"/> | ||
{% else %} | ||
<img src="{{ optimizedImage.placeholderBox() }}" | ||
srcset="{{ optimizedImage.srcset() }}" | ||
sizes="(max-width: 479px) 95vw, (min-width: 480px) and (max-width: 659px) 448px, (min-width: 660px) and (max-width: 819px) 628px, (min-width: 820px) and (max-width: 979px) 378px, (min-width: 980px) and (max-width: 1199px) 458px, (min-width: 1200px) 568px" | ||
width="{{optimizedImage.placeholderWidth}}" height="{{optimizedImage.placeholderHeight}}" | ||
alt="{{ image.alt }}" | ||
class="w-full" loading="lazy"/> | ||
{% endif %} | ||
</picture> | ||
{% if image.imageCopyright|length or image.imageCaption|length %} | ||
<div class="mt-1 text-sm italic opacity-50"> | ||
{% if image.imageCaption|length %} | ||
{{ image.imageCaption }} | ||
{% endif %} | ||
{% if image.imageCopyright|length %} | ||
© {{ image.imageCopyright }} | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
<div class="w-full px-4 {% if block.image|length %}mt-8 md:mt-0 md:w-1/2{% else %}lg:w-3/4{% endif %}"> | ||
{% if block.blockTitle|length %} | ||
<h2 id="{{ block.blockTitle|slugify }}">{{ block.blockTitle }}</h2> | ||
{% endif %} | ||
{% if block.text|length %} | ||
<div class="text-editor"> | ||
{{ block.text }} | ||
</div> | ||
{% endif %} | ||
{% if block.cta|length %} | ||
<div class="flex flex-wrap items-baseline gap-4 mt-6"> | ||
{{ render_hyper_links(block.cta) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endapply %} |
68 changes: 35 additions & 33 deletions
68
templates/_site/_snippet/_content/_blocks/_textTwoColumns.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
{% if not block.titleColumn2|length and block.titleColumn1|length %} | ||
<h2 class="w-full" id="{{ block.titleColumn1|slugify }}">{{ block.titleColumn1 }}</h2> | ||
{% endif %} | ||
<div class="flex flex-wrap -mx-4"> | ||
<div class="w-full px-4 md:w-1/2"> | ||
{% if block.titleColumn2|length %} | ||
{% if block.titleColumn1|length %} | ||
<h2 id="{{ block.titleColumn1|slugify }}">{{ block.titleColumn1 }}</h2> | ||
{% endif %} | ||
{% endif %} | ||
<div class="text-editor"> | ||
{{ block.textColumn1 }} | ||
</div> | ||
{% if not block.ctaColumn1.isEmpty() %} | ||
<div class="mt-4"> | ||
{{ render_hyper_links(block.ctaColumn1) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
<div class="w-full px-4 mt-4 md:mt-0 md:w-1/2"> | ||
{% if block.titleColumn2|length %} | ||
<h2 id="{{ block.titleColumn2|slugify }}">{{ block.titleColumn2 }}</h2> | ||
{% endif %} | ||
<div class="text-editor"> | ||
{{ block.textColumn2 }} | ||
</div> | ||
{% if not block.ctaColumn2.isEmpty() %} | ||
<div class="mt-4"> | ||
{{ render_hyper_links(block.ctaColumn2) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% apply enkode_emails %} | ||
{% if not block.titleColumn2|length and block.titleColumn1|length %} | ||
<h2 class="w-full" id="{{ block.titleColumn1|slugify }}">{{ block.titleColumn1 }}</h2> | ||
{% endif %} | ||
<div class="flex flex-wrap -mx-4"> | ||
<div class="w-full px-4 md:w-1/2"> | ||
{% if block.titleColumn2|length %} | ||
{% if block.titleColumn1|length %} | ||
<h2 id="{{ block.titleColumn1|slugify }}">{{ block.titleColumn1 }}</h2> | ||
{% endif %} | ||
{% endif %} | ||
<div class="text-editor"> | ||
{{ block.textColumn1 }} | ||
</div> | ||
{% if not block.ctaColumn1.isEmpty() %} | ||
<div class="mt-4"> | ||
{{ render_hyper_links(block.ctaColumn1) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
<div class="w-full px-4 mt-4 md:mt-0 md:w-1/2"> | ||
{% if block.titleColumn2|length %} | ||
<h2 id="{{ block.titleColumn2|slugify }}">{{ block.titleColumn2 }}</h2> | ||
{% endif %} | ||
<div class="text-editor"> | ||
{{ block.textColumn2 }} | ||
</div> | ||
{% if not block.ctaColumn2.isEmpty() %} | ||
<div class="mt-4"> | ||
{{ render_hyper_links(block.ctaColumn2) | raw }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endapply %} |
Oops, something went wrong.