@total_onion/onion-library 2.0.64 → 2.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/block-accordion-v3/accordion-v3.twig +23 -24
- package/components/block-betterreviews-display-v3/betterreviews-display-v3.twig +2 -3
- package/components/block-block-interactions-v3/block-interactions-v3.twig +7 -9
- package/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.twig +5 -3
- package/components/block-cover-link-v3/cover-link-v3.twig +1 -1
- package/components/block-divider-v3/divider-v3.twig +1 -1
- package/components/block-featured-image-gallery-v3/featured-image-gallery-v3.twig +3 -3
- package/components/block-featured-image-gallery-v3/group_5f91897095b42.json +162 -7
- package/components/block-gradient-layer-v3/gradient-layer-v3.twig +2 -2
- package/components/block-group-container-v3/group-container-v3.twig +5 -4
- package/components/block-group-container-v3/group_6865578ada499.json +364 -38
- package/components/block-lottie-content-v3/lottie-content-v3.twig +5 -7
- package/components/block-nav-menu-container-v3/group_687e00b45e9a3.json +96 -66
- package/components/block-nav-menu-container-v3/nav-menu-container-v3.twig +9 -8
- package/components/block-post-info-v3/post-info-v3/post-buy-now.twig +5 -4
- package/components/block-post-type-filter-grid-v3/group_64690c62487bc.json +3674 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/better-reviews-widget.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/buy-now-widget.vue +72 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/cocktail-category.vue +40 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/cocktail-tasting-notes.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/divider-widget.vue +11 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/drink-tastes.vue +26 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/featured-post-component.vue +62 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/global-image-widget.vue +23 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/media-widget.vue +23 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/person-email-widget.vue +20 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/person-name-widget.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/person-questionaire-widget.vue +17 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/person-rating-widget.vue +25 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-author-widget.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-category-widget.vue +20 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-component.vue +130 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-headline-widget.vue +16 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-image-widget.vue +60 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-info-description.vue +14 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-info-subtitle.vue +14 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-link-widget.vue +44 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-publish-widget.vue +44 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-tags-widget.vue +19 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-text-alternative-style.vue +18 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-title-widget.vue +20 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/pre-render-posts-html.twig +17 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-abv.vue +18 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-age-statement.vue +17 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-bazaarvoice.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-brand.vue +16 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-cask-type.vue +16 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-country.vue +14 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-description.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-details-name.vue +18 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-details-price.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-finish.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-history.vue +16 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-link.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-logo-widget.vue +22 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-name.vue +17 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-nose.vue +16 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-price.vue +15 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-slug.vue +14 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-taste.vue +16 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/product-whisky-type.vue +25 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/ptfg-posts.twig +474 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/ptfg-utils.vue +38 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/shopify-add-to-cart.vue +31 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/social-media-item.vue +58 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/spacer-widget.vue +13 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/text-search.vue +10 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.js +14 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.php +48 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.scss +1084 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.twig +157 -0
- package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.vue +938 -0
- package/components/block-product-info-v3/group_68909995b6550.json +119 -5
- package/components/block-product-info-v3/product-info-v3/spacer-v3.twig +9 -0
- package/components/block-product-info-v3/product-info-v3.twig +2 -1
- package/components/block-scrolling-banner-v3/group_68e67fca1ec80.json +1 -56
- package/components/block-scrolling-banner-v3/scrolling-banner-v3.twig +7 -4
- package/components/block-section-separator-v3/section-separator-v3.twig +2 -2
- package/components/block-single-column-container-v3/single-column-container-v3.twig +1 -1
- package/components/block-single-responsive-image-v3/group_6867bcf24c2fc.json +5 -11
- package/components/block-single-responsive-image-v3/single-responsive-image-v3.twig +2 -2
- package/components/block-site-copyright-notice-v3/site-copyright-notice-v3.php +1 -1
- package/components/block-site-logo-container-v3/group_687e3b887b508.json +53 -5
- package/components/block-site-logo-container-v3/site-logo-container-v3.twig +4 -2
- package/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.twig +2 -2
- package/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.twig +2 -2
- package/components/block-standard-content-v3/standard-content-v3.twig +2 -3
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.twig +59 -59
- package/components/block-sub-group-container-v3/group_686ceba7d6066.json +197 -56
- package/components/block-sub-group-container-v3/sub-group-container-v3.twig +3 -4
- package/components/block-video-content-v3/group_687190b8d26df.json +175 -167
- package/components/block-video-content-v3/video-content-v3.twig +1 -1
- package/components/component-accent-image-v3/group_686cd5547efd2.json +5 -5
- package/components/component-block-settings-v3/group_689f649af2ac4.json +22 -1
- package/components/component-child-block-video-fields/group_6852a4f384204.json +351 -349
- package/components/component-content-box-settings-v3/group_686e6ec702acc.json +1727 -1937
- package/components/component-content-box-v3/group_686b8a4f1fe5d.json +50 -1
- package/components/component-cta-selection-v3/cta-selection-v3.twig +1 -2
- package/components/component-grid-layout-container-v3/grid-layout-container-v3.twig +1 -1
- package/components/component-responsive-image-v3/group_6867bc53f1da8.json +4 -31
- package/components/component-video-component-v3/video-component-v3.twig +1 -1
- package/components/component-video-trigger-button-v3/video-trigger-button-v3.twig +1 -1
- package/components/fields-block-editor-assets-v3/block-editor-assets-v3.php +5 -7
- package/components/{fields-core-athena-block-render-function-v3/core-athena-block-render-function-v3.php → fields-core-block-render-function-v3/core-block-render-function-v3.php} +1 -1
- package/components/fields-core-generic-v3/core-generic-v3.scss +1 -0
- package/components/fields-drink-responsibly-notice-v3/group_68751257883ad.json +2 -1
- package/components/fields-dynamic-critical-css-v3/group_65abcd463e8d0.json +1 -1
- package/components/fields-modal-popup-content-v3/group_689876f1ee3fc.json +403 -0
- package/components/fields-modal-popup-content-v3/modal-popup-content-v3.twig +18 -0
- package/package.json +3 -2
- package/public/block-featured-image-gallery-v3/featured-image-gallery-v3.css +16 -12
- package/components/block-smash-balloon-social-media-v3/group_6890a2ab0e0a9.json +0 -143
- package/components/fields-buy-now-button/group_658432636bde2.json +0 -340
- package/components/fields-cta-icons-v3/group_677ed96c3c64f.json +0 -822
- package/components/fields-design-system-v3/group_6870e9e74a347.json +0 -743
- package/components/fields-site-logos-v3/group_6877b1697bf9f.json +0 -149
- package/components/fields-typography-settings-v3/group_6876149264002.json +0 -5636
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/better-reviews-widget.vue
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
4
|
+
|
|
5
|
+
const props = defineProps(["post", "element"]);
|
|
6
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
7
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
8
|
+
|
|
9
|
+
</script>
|
|
10
|
+
<template>
|
|
11
|
+
<div :class="`${blockClassname}__better-reviews ${blockClassname}__info-item`"
|
|
12
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
13
|
+
<div v-html="props.post.rating"></div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
+
const props = defineProps(["post", "element", "ctaIcons", "blockClassname"]);
|
|
4
|
+
|
|
5
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
6
|
+
|
|
7
|
+
const blockClassname = props.blockClassname;
|
|
8
|
+
const ctaIcons = props.ctaIcons;
|
|
9
|
+
const element = props.element;
|
|
10
|
+
const ctaStyle = element.cta_style.replace('__', '');
|
|
11
|
+
|
|
12
|
+
const post = props.post;
|
|
13
|
+
|
|
14
|
+
const click2buyPimId = post.post_data.click_to_buy_pim_id;
|
|
15
|
+
const debrainId = post.post_data.debrain_pim_id;
|
|
16
|
+
const productDebrainSkuId = post.post_data.debrain_sku_id;
|
|
17
|
+
const directLinkURL = post.product_buynow_direct_link;
|
|
18
|
+
|
|
19
|
+
const productEANs = post.post_data.mikmak_ean_ids;
|
|
20
|
+
const mikmakDrawerWidgetID = post.mikmak_drawer_widget_ID;
|
|
21
|
+
const relatedProductEANs = post.related_product_eans;
|
|
22
|
+
|
|
23
|
+
let totalProductEANs = '';
|
|
24
|
+
if (productEANs !== '') {
|
|
25
|
+
totalProductEANs = productEANs + (relatedProductEANs !== '' ? ',' + relatedProductEANs : '');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
</script>
|
|
29
|
+
<template>
|
|
30
|
+
<div :class="`${blockClassname}__product-buy-now ${blockClassname}__info-item`"
|
|
31
|
+
:style="`--post-colour: ${postColour}; --post-text-colour-style: ${postTextColourStyle}; ${gridLayoutString}`">
|
|
32
|
+
<a href="#"
|
|
33
|
+
:class="`${blockClassname}__cta cmpl-cta-style-${ctaStyle} ${blockClassname}__cta-animation-style-${ctaAnimationStyle} ctb`"
|
|
34
|
+
v-if="element.buy_now_text && post.post_data.buy_now_option_select.slice(2) == 'ctb'" data-ctbuy
|
|
35
|
+
:data-ctbuy-variant="click2buyPimId">
|
|
36
|
+
<span :class="`${blockClassname}__cta-span`">{{ element.buy_now_text }}</span>
|
|
37
|
+
<span :class="`${blockClassname}__cta-icon`" v-if="element.enable_cta_icon">
|
|
38
|
+
<img :class="`${blockClassname}__icon-image style-svg`" :src="ctaIcons.cta_link_icon">
|
|
39
|
+
</span>
|
|
40
|
+
</a>
|
|
41
|
+
<a href="#"
|
|
42
|
+
:class="`dloc-link ${blockClassname}__cta cmpl-cta-style-${ctaStyle} ${blockClassname}__cta-animation-style-${ctaAnimationStyle} wtb`"
|
|
43
|
+
v-if="element.buy_now_text && post.post_data.buy_now_option_select.slice(2) == 'wtb'" data-ctbuy
|
|
44
|
+
:data-filter="debrainId" data-action="where-to-buy">
|
|
45
|
+
<span :class="`${blockClassname}__cta-span`">{{ element.buy_now_text }}</span>
|
|
46
|
+
<span :class="`${blockClassname}__cta-icon`" v-if="element.enable_cta_icon">
|
|
47
|
+
<img :class="`${blockClassname}__icon-image style-svg`" :src="ctaIcons.cta_link_icon">
|
|
48
|
+
</span>
|
|
49
|
+
</a>
|
|
50
|
+
<a :href="directLinkURL[0]"
|
|
51
|
+
:class="`${blockClassname}__cta cmpl-cta-style-${ctaStyle} ${blockClassname}__cta-animation-style-${ctaAnimationStyle} link`"
|
|
52
|
+
v-if="element.buy_now_text && post.post_data.buy_now_option_select.slice(2) == 'link'"
|
|
53
|
+
:target="(directLinkURL[2] !== '' ? directLinkURL[2] : '_blank')">
|
|
54
|
+
<span :class="`${blockClassname}__cta-span`">{{ element.buy_now_text }}</span>
|
|
55
|
+
<span :class="`${blockClassname}__cta-icon`" v-if="element.enable_cta_icon">
|
|
56
|
+
<img :class="`${blockClassname}__icon-image style-svg`" :src="ctaIcons.cta_link_icon">
|
|
57
|
+
</span>
|
|
58
|
+
</a>
|
|
59
|
+
<wtb-button v-if="post.post_data.buy_now_option_select.slice(2) == 'wtb-v2' && productDebrainSkuId"
|
|
60
|
+
:sku="productDebrainSkuId"></wtb-button>
|
|
61
|
+
<a href="#" :data-mm-wtbid="`${mikmakDrawerWidgetID}`" :data-mm-ids="`${totalProductEANs}`"
|
|
62
|
+
:data-mm-default-id="`${productEANs}`"
|
|
63
|
+
:class="`${blockClassname}__cta cmpl-cta-style-${ctaStyle} ${blockClassname}__cta-animation-style-${ctaAnimationStyle} mikmak-buy-now`"
|
|
64
|
+
v-if="element.buy_now_text && post.post_data.buy_now_option_select.slice(2) == 'mikmak'"
|
|
65
|
+
:data-filter="debrainId">
|
|
66
|
+
<span :class="`${blockClassname}__cta-span`">{{ element.buy_now_text }}</span>
|
|
67
|
+
<span :class="`${blockClassname}__cta-icon`" v-if="element.enable_cta_icon">
|
|
68
|
+
<img :class="`${blockClassname}__icon-image style-svg`" :src="ctaIcons.cta_link_icon">
|
|
69
|
+
</span>
|
|
70
|
+
</a>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/cocktail-category.vue
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps(["post", "element"]);
|
|
3
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
4
|
+
const textColourType = props.element?.text_style?.text_colour.slice(2);
|
|
5
|
+
let textColour = textColourType;
|
|
6
|
+
|
|
7
|
+
if (textColourType == "post_text_colour_style") {
|
|
8
|
+
textColour = props.post.post_data?.post_text_colour_style?.slice(2);
|
|
9
|
+
}
|
|
10
|
+
if (textColourType == "post_colour") {
|
|
11
|
+
textColour = props.post.post_data?.post_colour;
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
<template>
|
|
15
|
+
<div :class="`${blockClassname}__cocktail-category ${blockClassname}__info-item`" :style="`--grid-column-start-mobile: ${element.grid_layout_element?.grid_column_start_mobile
|
|
16
|
+
}; --grid-column-span-mobile: ${element.grid_layout_element?.grid_column_span_mobile
|
|
17
|
+
}; --grid-row-start-mobile: ${element.grid_layout_element?.grid_row_start_mobile
|
|
18
|
+
}; --grid-row-span-mobile: ${element.grid_layout_element?.grid_row_span_mobile
|
|
19
|
+
}; --grid-column-start: ${element.grid_layout_element?.grid_column_start
|
|
20
|
+
}; --grid-column-span: ${element.grid_layout_element?.grid_column_span
|
|
21
|
+
}; --grid-row-start: ${element.grid_layout_element?.grid_row_start
|
|
22
|
+
}; --grid-row-span: ${element.grid_layout_element?.grid_row_span
|
|
23
|
+
}; --grid-horizontal-placement: ${element.grid_layout_element?.grid_horizontal_placement.slice(
|
|
24
|
+
2
|
|
25
|
+
)}; --grid-vertical-placement: ${element.grid_layout_element?.grid_vertical_placement.slice(
|
|
26
|
+
2
|
|
27
|
+
)}; --text-align: ${element.text_style?.text_align.slice(
|
|
28
|
+
2
|
|
29
|
+
)}; --text-transform: ${element.text_style?.text_transform.slice(
|
|
30
|
+
2
|
|
31
|
+
)}; --font-weight: ${element.text_style.text_font_weight.slice(
|
|
32
|
+
2
|
|
33
|
+
)}; --font-style: ${element.text_style.font_style.slice(
|
|
34
|
+
2
|
|
35
|
+
)}; --text-colour: ${textColour}`">
|
|
36
|
+
<p v-html="post.cocktail_category" :class="`${blockClassname}__cocktail-category--item ${element.text_style?.typography_style.slice(
|
|
37
|
+
2
|
|
38
|
+
)}`"></p>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
const props = defineProps(["post", "element"]);
|
|
4
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
5
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
6
|
+
|
|
7
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
8
|
+
const element = props.element;
|
|
9
|
+
</script>
|
|
10
|
+
<template>
|
|
11
|
+
<div :class="`${blockClassname}__cocktail-tasting-notes ${blockClassname}__info-item`"
|
|
12
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
13
|
+
<div v-html="props.post.post_data?.cocktail_tasting_notes"></div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
+
const props = defineProps(["post", "element"]);
|
|
4
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
5
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
6
|
+
|
|
7
|
+
</script>
|
|
8
|
+
<template>
|
|
9
|
+
<div :class="`${blockClassname}__post-divider ${blockClassname}__info-item`" :style="`${gridLayoutString}`">
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
const props = defineProps(["post", "element"]);
|
|
4
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
5
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
6
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
7
|
+
const textColourType = props.element?.text_style?.text_colour.slice(2);
|
|
8
|
+
let textColour = textColourType;
|
|
9
|
+
|
|
10
|
+
if (textColourType == "post_text_colour_style") {
|
|
11
|
+
textColour = props.post.post_data?.post_text_colour_style?.slice(2);
|
|
12
|
+
}
|
|
13
|
+
if (textColourType == "post_colour") {
|
|
14
|
+
textColour = props.post.post_data?.post_colour;
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
<template>
|
|
18
|
+
<div :class="`${blockClassname}__drink-tastes ${blockClassname}__info-item`"
|
|
19
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
20
|
+
<template v-for="(category, index) in props.post.categories" :key="index">
|
|
21
|
+
<div v-if="category.taxonomy === 'taste'" v-html="category.name" :class="`${blockClassname}__drink-taste--item ${element.text_style?.typography_style.slice(
|
|
22
|
+
2
|
|
23
|
+
)}`"></div>
|
|
24
|
+
</template>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps(["featuredpost", "fields", "mappedIcons", "ctaStyles"]);
|
|
3
|
+
|
|
4
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
5
|
+
let sizes = "(min-width: 1440px) 50vw, (min-width: 1024px) 50vw, (min-width: 768px) 768px') 100vw";
|
|
6
|
+
const post = props.featuredpost.post;
|
|
7
|
+
|
|
8
|
+
const iconImage = props.mappedIcons['cta_link_icon']['type'] == 'image/svg+xml' ? props.mappedIcons['cta_link_icon']['image'] : '<img src="' + props.mappedIcons['cta_link_icon']['image'] + '">';
|
|
9
|
+
// const enableCtaIcon = props.ctaStyles[ctaStyle - 1]?.cta_settings?.include_cta_icon;
|
|
10
|
+
let ctaAnimationStyle = '1';
|
|
11
|
+
if (props.element?.cta_style_select) {
|
|
12
|
+
if (props.element?.cta_style_select?.slice(2) == 'post-colour') {
|
|
13
|
+
postCtaStyle = 'post-colour';
|
|
14
|
+
postCtaStyleValue = `color: ${postColour};--post-text-colour-style: ${postColour};`;
|
|
15
|
+
}
|
|
16
|
+
if (props.element?.cta_style_select?.slice(2) == 'post-text-colour-style') {
|
|
17
|
+
postCtaStyle = 'post-text-colour-style';
|
|
18
|
+
postCtaStyleValue = `color: ${postTextColourStyle};--post-text-colour-style: ${postTextColourStyle};`;
|
|
19
|
+
}
|
|
20
|
+
if (props.ctaStyles) {
|
|
21
|
+
ctaAnimationStyle = props.ctaStyles[ctaStyle - 1]?.cta_settings?.cta_animation_style;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
</script>
|
|
26
|
+
<template>
|
|
27
|
+
<a :class="`${blockClassname}__featured-post-container-link`" :href="featuredpost.post_link"
|
|
28
|
+
:aria-label="post.post_title">
|
|
29
|
+
<div :class="`${blockClassname}__featured-post-image-container`">
|
|
30
|
+
<picture>
|
|
31
|
+
<source media="(min-width: 1024px)" :srcset="props.featuredpost.post_image_src" width="1" height="1" />
|
|
32
|
+
<source :srcset="props.featuredpost.post_image_src_mobile" width="16" height="9" />
|
|
33
|
+
<img v-if="props.featuredpost.post_image_src" :class="`${blockClassname}__featured-post-image`"
|
|
34
|
+
loading="lazy" :src="props.featuredpost.post_image_src" :width="props.featuredpost.post_image_width"
|
|
35
|
+
:height="props.featuredpost.post_image_height" :srcset="props.post_image_srcset" :sizes="sizes"
|
|
36
|
+
:alt="props.post_image_alt" />
|
|
37
|
+
</picture>
|
|
38
|
+
<div v-if="featuredpost.post_category" :class="`${blockClassname}__featured-post-category`">
|
|
39
|
+
<template v-for="(category, index) in featuredpost.post_category" :key="index">
|
|
40
|
+
<p v-if="featuredpost.post_category != 'translation_priority'" v-html="category.name"
|
|
41
|
+
:class="`${blockClassname}__featured-post-category--item`">
|
|
42
|
+
</p>
|
|
43
|
+
</template>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div :class="`${blockClassname}__featured-post-content-container`">
|
|
47
|
+
<h2 v-if="post.post_title" :class="`${blockClassname}__featured-post-title`" v-html="post.post_title"></h2>
|
|
48
|
+
<p v-if="featuredpost.post_info_subtitle" :class="`${blockClassname}__featured-post-subtitle`">{{
|
|
49
|
+
featuredpost.post_info_subtitle }}</p>
|
|
50
|
+
<p v-if="featuredpost.post_info_description" :class="`${blockClassname}__featured-post-description`">{{
|
|
51
|
+
featuredpost.post_info_description }}</p>
|
|
52
|
+
<a v-if="featuredpost.post_link"
|
|
53
|
+
:class="`${blockClassname}__featured-post-link ${blockClassname}__cta cmpl-cta-style-${fields.featured_post_button_style} cmpl-cta-animation-style-${ctaAnimationStyle}`"
|
|
54
|
+
:href="featuredpost.post_link">
|
|
55
|
+
<span :class="`${blockClassname}__cta-span`">Read more</span>
|
|
56
|
+
<span :class="`${blockClassname}__cta-icon cmpl-cta-icon ${blockClassname}__icon-image`"
|
|
57
|
+
v-html="iconImage">
|
|
58
|
+
</span>
|
|
59
|
+
</a>
|
|
60
|
+
</div>
|
|
61
|
+
</a>
|
|
62
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/global-image-widget.vue
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element", "fields", "globalImages"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
const imageSelect = props.element.image_select?.slice(2);
|
|
7
|
+
let globalImage = '';
|
|
8
|
+
if (props.globalImages[imageSelect]) {
|
|
9
|
+
globalImage = props.globalImages[imageSelect]['global_image'];
|
|
10
|
+
}
|
|
11
|
+
let globalImageWidthString = `--global-image-width-mobile: ${props.element.global_image_width}%; --global-image-width-desktop: ${props.element.global_image_width}%;`;
|
|
12
|
+
const globalImageStyles = `--global-image-z-index: ${props.element.global_image_zindex}; --global-image-position: ${props.element.global_image_position.replace('__', '')}; --global-image-fit-style: ${props.element.global_image_fit_style.replace('__', '')}; --global-image-max-width-desktop: ${props.element.global_image_max_width_desktop}%; --global-image-max-width-mobile: ${props.element.global_image_max_width_mobile}%;`
|
|
13
|
+
let sizes = "(min-width: 1440px) 50vw, (min-width: 1024px) 50vw, (min-width: 768px) 768px') 100vw";
|
|
14
|
+
|
|
15
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
16
|
+
|
|
17
|
+
</script>
|
|
18
|
+
<template>
|
|
19
|
+
<img v-if="globalImage.url"
|
|
20
|
+
:class="`${blockClassname}__info-item ${blockClassname}__global-image ${blockClassname}__global-image--1`"
|
|
21
|
+
loading="lazy" :src="globalImage.url" :width="globalImage.width" :height="globalImage.height" :sizes=sizes
|
|
22
|
+
:alt="globalImage.alt" :style="`${gridLayoutString} ${globalImageStyles}`" />
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element", "fields"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
const imageType = 'image';
|
|
7
|
+
let postType = props.post.post_data.post_type;
|
|
8
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
9
|
+
|
|
10
|
+
</script>
|
|
11
|
+
<template>
|
|
12
|
+
<div :class="`${blockClassname}__media-image-container ${blockClassname}__info-item`" :href="props.post.link"
|
|
13
|
+
:style="`${gridLayoutString}`">
|
|
14
|
+
<img :class="`${blockClassname}__post-image ${blockClassname}__media-${imageType}`" loading="lazy"
|
|
15
|
+
:src="props.post.post_images['post_' + imageType + '_src']"
|
|
16
|
+
:width="props.post.post_images['post_' + imageType + '_width']"
|
|
17
|
+
:height="props.post.post_images['post_' + imageType + '_height']"
|
|
18
|
+
:srcset="props.post.post_images['post_' + imageType + '_srcset']"
|
|
19
|
+
sizes="(max-width: 414px) 100px, (max-width: 768px) 150px, (max-width: 1024px) 200px, (max-width: 1440px) 275px, (max-width: 1800px) 300px"
|
|
20
|
+
:alt="props.post.post_images['post_' + imageType + '_alt_text']"
|
|
21
|
+
:style="`--post-image-width: ${element.post_image_width}%;`" />
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/person-email-widget.vue
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element", "ctaIcons"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
|
|
7
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
8
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
9
|
+
|
|
10
|
+
</script>
|
|
11
|
+
<template>
|
|
12
|
+
<a :href="`mailto:${post.post_data.person_email}`"
|
|
13
|
+
:class="`${blockClassname}__person-email ${blockClassname}__info-item ${element.text_style?.typography_style.slice(2)}`"
|
|
14
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
15
|
+
<img v-if="element.enable_icon" :class="`${blockClassname}__person-email-icon style-svg`"
|
|
16
|
+
:src="props.ctaIcons.cta_email_icon">
|
|
17
|
+
{{ element.display_email_as_person_name ? post.post_data.person_name : post.post_data.person_email.toLowerCase()
|
|
18
|
+
}}
|
|
19
|
+
</a>
|
|
20
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/person-name-widget.vue
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
|
|
7
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
8
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
9
|
+
</script>
|
|
10
|
+
<template>
|
|
11
|
+
<p :class="`${blockClassname}__person-name ${blockClassname}__info-item ${element.text_style?.typography_style.slice(2)}`"
|
|
12
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
13
|
+
{{ post.post_data.person_name }}
|
|
14
|
+
</p>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element", "ctaIcons"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
7
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
8
|
+
|
|
9
|
+
</script>
|
|
10
|
+
<template>
|
|
11
|
+
<div v-for="questions in props.post_data.person_questionaire"
|
|
12
|
+
:class="`${blockClassname}__person-email ${blockClassname}__info-item ${element.text_style?.typography_style.slice(2)}`"
|
|
13
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
14
|
+
<img :class="`${blockClassname}__person-email-icon`" :src="props.ctaIcons.cta_email_icon">
|
|
15
|
+
{{ post.post_data.person_email }}
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/person-rating-widget.vue
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
7
|
+
|
|
8
|
+
</script>
|
|
9
|
+
<template>
|
|
10
|
+
<div :class="`${blockClassname}__person-rating ${blockClassname}__info-item`" :style="`${gridLayoutString}`">
|
|
11
|
+
<div :class="`${blockClassname}__person-rating-star-container`" :key="index">
|
|
12
|
+
<svg :class="`${blockClassname}__person-rating-star`" v-for="index in Number(post.post_data.star_rating)"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 19.02">
|
|
14
|
+
<defs></defs>
|
|
15
|
+
<g id="a" />
|
|
16
|
+
<g id="b">
|
|
17
|
+
<g id="c">
|
|
18
|
+
<polygon class="d"
|
|
19
|
+
points="10 15.77 3.82 19.02 5 12.14 0 7.27 6.91 6.26 10 0 13.09 6.26 20 7.27 15 12.14 16.18 19.02 10 15.77" />
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-author-widget.vue
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
7
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
8
|
+
|
|
9
|
+
</script>
|
|
10
|
+
<template>
|
|
11
|
+
<p :class="`${blockClassname}__post-author ${blockClassname}__info-item ${element.text_style?.typography_style.slice(2)}`"
|
|
12
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
13
|
+
{{ post.author_display_name }}
|
|
14
|
+
</p>
|
|
15
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-category-widget.vue
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
|
|
7
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
8
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
9
|
+
|
|
10
|
+
</script>
|
|
11
|
+
<template>
|
|
12
|
+
<div :class="`${blockClassname}__post-category ${blockClassname}__info-item`"
|
|
13
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
14
|
+
<template v-for="(category, index) in props.post.categories" :key="index">
|
|
15
|
+
<p v-if="category.taxonomy != 'translation_priority'" v-html="category.name"
|
|
16
|
+
:class="`${blockClassname}__post-category--item ${element.text_style?.typography_style.slice(2)}`">
|
|
17
|
+
</p>
|
|
18
|
+
</template>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import PostAuthor from "./post-author-widget.vue";
|
|
3
|
+
import PostImage from "./post-image-widget.vue";
|
|
4
|
+
import GlobalImage from "./global-image-widget.vue";
|
|
5
|
+
import PostCategories from "./post-category-widget.vue";
|
|
6
|
+
import PostTags from "./post-tags-widget.vue";
|
|
7
|
+
import Divider from "./divider-widget.vue";
|
|
8
|
+
import PostHeadline from "./post-headline-widget.vue";
|
|
9
|
+
import PostLink from "./post-link-widget.vue";
|
|
10
|
+
import PostPublishDate from "./post-publish-widget.vue";
|
|
11
|
+
import PostTitle from "./post-title-widget.vue";
|
|
12
|
+
import SpacerV2 from "./spacer-widget.vue";
|
|
13
|
+
import PostInfoDescription from "./post-info-description.vue";
|
|
14
|
+
import PostInfoSubtitle from "./post-info-subtitle.vue";
|
|
15
|
+
import PostTextAlternativeStyle from "./post-text-alternative-style.vue";
|
|
16
|
+
import MediaImage from "./media-widget.vue";
|
|
17
|
+
import BetterReviews from "./better-reviews-widget.vue";
|
|
18
|
+
import ProductDetailsDescription from "./product-description.vue";
|
|
19
|
+
import ProductDetailsName from "./product-details-name.vue";
|
|
20
|
+
import ProductDetailsBrand from "./product-brand.vue";
|
|
21
|
+
import ProductAbv from "./product-abv.vue";
|
|
22
|
+
import ProductAgeStatement from "./product-age-statement.vue";
|
|
23
|
+
import ProductBazaarvoice from "./product-bazaarvoice.vue";
|
|
24
|
+
import ProductCaskType from "./product-cask-type.vue";
|
|
25
|
+
import ProductCountry from "./product-country.vue";
|
|
26
|
+
import ProductFinish from "./product-finish.vue";
|
|
27
|
+
import ProductHistory from "./product-history.vue";
|
|
28
|
+
import ProductLink from "./product-link.vue";
|
|
29
|
+
import ProductDetailsPrice from "./product-details-price.vue";
|
|
30
|
+
import ProductPrice from "./product-price.vue";
|
|
31
|
+
import ProductNose from "./product-nose.vue";
|
|
32
|
+
import ProductName from "./product-name.vue";
|
|
33
|
+
import ProductSlug from "./product-slug.vue";
|
|
34
|
+
import ProductTaste from "./product-taste.vue";
|
|
35
|
+
import ProductWhiskyType from "./product-whisky-type.vue";
|
|
36
|
+
import PersonName from "./person-name-widget.vue";
|
|
37
|
+
import PersonEmail from "./person-email-widget.vue";
|
|
38
|
+
import PersonRating from "./person-rating-widget.vue";
|
|
39
|
+
import SocialMediaItem from "./social-media-item.vue";
|
|
40
|
+
import BuyNow from "./buy-now-widget.vue";
|
|
41
|
+
import DrinkTastes from "./drink-tastes.vue";
|
|
42
|
+
import CocktailTastingNotes from "./cocktail-tasting-notes.vue";
|
|
43
|
+
import CocktailCategories from "./cocktail-category.vue";
|
|
44
|
+
import ShopifyAddToCart from "./shopify-add-to-cart.vue";
|
|
45
|
+
const widgetComponents = {
|
|
46
|
+
PostAuthor,
|
|
47
|
+
PostImage,
|
|
48
|
+
PostCategories,
|
|
49
|
+
PostTags,
|
|
50
|
+
Divider,
|
|
51
|
+
PostHeadline,
|
|
52
|
+
PostLink,
|
|
53
|
+
PostPublishDate,
|
|
54
|
+
PostTitle,
|
|
55
|
+
SpacerV2,
|
|
56
|
+
PostInfoDescription,
|
|
57
|
+
PostTextAlternativeStyle,
|
|
58
|
+
MediaImage,
|
|
59
|
+
GlobalImage,
|
|
60
|
+
BetterReviews,
|
|
61
|
+
ProductDetailsDescription,
|
|
62
|
+
ProductDetailsBrand,
|
|
63
|
+
ProductDetailsName,
|
|
64
|
+
ProductDetailsPrice,
|
|
65
|
+
ProductPrice,
|
|
66
|
+
ProductAbv,
|
|
67
|
+
ProductAgeStatement,
|
|
68
|
+
ProductBazaarvoice,
|
|
69
|
+
ProductCaskType,
|
|
70
|
+
ProductCountry,
|
|
71
|
+
ProductFinish,
|
|
72
|
+
ProductHistory,
|
|
73
|
+
ProductLink,
|
|
74
|
+
ProductNose,
|
|
75
|
+
ProductName,
|
|
76
|
+
ProductSlug,
|
|
77
|
+
ProductTaste,
|
|
78
|
+
ProductWhiskyType,
|
|
79
|
+
PersonEmail,
|
|
80
|
+
PersonName,
|
|
81
|
+
PersonRating,
|
|
82
|
+
SocialMediaItem,
|
|
83
|
+
BuyNow,
|
|
84
|
+
CocktailTastingNotes,
|
|
85
|
+
CocktailCategories,
|
|
86
|
+
DrinkTastes,
|
|
87
|
+
PostInfoSubtitle,
|
|
88
|
+
ShopifyAddToCart,
|
|
89
|
+
};
|
|
90
|
+
const widgetNames = [];
|
|
91
|
+
const props = defineProps([
|
|
92
|
+
"postDataConfig",
|
|
93
|
+
"post",
|
|
94
|
+
"ctaIcons",
|
|
95
|
+
"mappedIcons",
|
|
96
|
+
"ctaStyles",
|
|
97
|
+
"globalImages",
|
|
98
|
+
"gradientOverlayColour",
|
|
99
|
+
"fields",
|
|
100
|
+
"options",
|
|
101
|
+
"imageSizesAttribute"
|
|
102
|
+
]);
|
|
103
|
+
props.postDataConfig?.forEach((widget) => {
|
|
104
|
+
let nameArr = widget.acf_fc_layout.split("_");
|
|
105
|
+
let name = "";
|
|
106
|
+
nameArr.forEach((part) => {
|
|
107
|
+
const caps = part.charAt(0).toUpperCase() + part.slice(1);
|
|
108
|
+
name += caps;
|
|
109
|
+
});
|
|
110
|
+
widgetNames.push(name);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<template>
|
|
117
|
+
<div :class="`${blockClassname}__overlay ${blockClassname}__overlay--gradient-overlay-top`"
|
|
118
|
+
v-if="fields.enable_gradient_overlay"
|
|
119
|
+
:style="`--gradient-colour: ${props.gradientOverlayColour}; --gradient-origin: 180deg; --gradient-amount: ${fields.gradient_overlay_amount}%; --gradient-zindex: 5; --gradient-spread: ${fields.gradient_overlay_spread}%; --gradient-opacity: ${fields.gradient_overlay_opacity};--gradient-overlay-row-end: ${fields.gradient_overlay_row_end}; --gradient-overlay-row-start: ${fields.gradient_overlay_row_start};`">
|
|
120
|
+
</div>
|
|
121
|
+
<a v-if="fields.enable_post_cover_link" :href="post.link" target="_self"
|
|
122
|
+
:class="`${blockClassname}__post-cover-link`, fields.enable_post_cover_link_hover_effect ? 'post-cover-link-hover-effect' : ''"
|
|
123
|
+
:aria-label="post.title"></a>
|
|
124
|
+
<template v-for="(widget, index) in widgetNames" :key="index">
|
|
125
|
+
<component :is="widgetComponents[widget]" :post="props.post" :fields="fields" :options="options"
|
|
126
|
+
:element="props.postDataConfig[index]" :blockClassname="blockClassname" :ctaIcons="ctaIcons"
|
|
127
|
+
:ctaStyles="ctaStyles" :mappedIcons="mappedIcons" :globalImages="globalImages"
|
|
128
|
+
:imageSizesAttribute="props.imageSizesAttribute" />
|
|
129
|
+
</template>
|
|
130
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-headline-widget.vue
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
|
|
7
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
8
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
9
|
+
|
|
10
|
+
</script>
|
|
11
|
+
<template>
|
|
12
|
+
<h3 :class="`${blockClassname}__post-headline ${blockClassname}__info-item ${element.text_style?.typography_style.slice(2)}`"
|
|
13
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
14
|
+
{{ element.headline_text }}
|
|
15
|
+
</h3>
|
|
16
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-image-widget.vue
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element", "fields", "imageSizesAttribute"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
const imageType = props.element?.image_select?.slice(2);
|
|
7
|
+
const imageTypeSecondary = 'image_alt';
|
|
8
|
+
const setAsBackgroundImage = props.element?.set_as_background_image;
|
|
9
|
+
let positioningString = '';
|
|
10
|
+
let postImageWidthString = `--post-image-width-mobile: ${props.element.post_image_width_mobile || props.element.post_image_width}%; --post-image-width-portrait: ${props.element.post_image_width_portrait || props.element.post_image_width}%; --post-image-width-desktop: ${props.element.post_image_width}%;`;
|
|
11
|
+
if (imageType === 'image_accent') {
|
|
12
|
+
const elementPositioning = props.element?.post_image_positioning.element_positioning;
|
|
13
|
+
positioningString = `
|
|
14
|
+
--element-rotation-desktop: ${elementPositioning.desktop_positioning.element_rotation_desktop}deg;
|
|
15
|
+
--element-rotation-mobile: ${elementPositioning.desktop_positioning.element_rotation_desktop}deg;
|
|
16
|
+
--element-z-index: ${elementPositioning.element_z_index};
|
|
17
|
+
--element-horizontal-offset-mobile: ${elementPositioning.mobile_positioning.horizontal_offset}%;
|
|
18
|
+
--element-vertical-offset-mobile: ${elementPositioning.mobile_positioning.vertical_offset}%;
|
|
19
|
+
--element-horizontal-offset-desktop: ${elementPositioning.desktop_positioning.horizontal_offset}%;
|
|
20
|
+
--element-vertical-offset-desktop: ${elementPositioning.desktop_positioning.vertical_offset}%;
|
|
21
|
+
--mobile-horizontal-placement: ${elementPositioning.mobile_positioning.horizontal_snap?.slice(2)};
|
|
22
|
+
--mobile-vertical-placement: ${elementPositioning.mobile_positioning.vertical_snap?.slice(2)};
|
|
23
|
+
--desktop-horizontal-placement: ${elementPositioning.desktop_positioning.horizontal_snap?.slice(2)};
|
|
24
|
+
--desktop-vertical-placement: ${elementPositioning.desktop_positioning.vertical_snap?.slice(2)};
|
|
25
|
+
--element-position: ${elementPositioning.element_position};
|
|
26
|
+
|
|
27
|
+
`;
|
|
28
|
+
postImageWidthString = `--post-image-width-mobile: calc( ${props.element.post_image_width_mobile_px} / var(--mobile-design-reference) * var(--screen-width-mobile)); --post-image-width-desktop: calc(${props.element.post_image_width_desktop_px} / var(--desktop-design-reference) * var(--screen-width-desktop));`;
|
|
29
|
+
}
|
|
30
|
+
console.log(props.imageSizesAttribute);
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
34
|
+
|
|
35
|
+
const styleString = `--post-image-border-radius: ${props.fields.post_image_border_radius};`
|
|
36
|
+
let postType = props.post.post_data.post_type;
|
|
37
|
+
let sizes = props.imageSizesAttribute || "(min-width: 1440px) 50vw, (min-width: 1024px) 50vw, (min-width: 768px) 768px') 100vw";
|
|
38
|
+
|
|
39
|
+
</script>
|
|
40
|
+
<template>
|
|
41
|
+
<a :class="`${blockClassname}__post-image-container-link ${blockClassname}__info-item ${blockClassname}__post-image-container--${imageType} ${blockClassname}__post-image-container-link--${props.fields.show_alt_image_on_hover ? 'show-alt-image-on-hover' : 'no-hover'} ${setAsBackgroundImage ? blockClassname + '__post-image-container-link--set-as-background-image' : ''}`"
|
|
42
|
+
:href="props.post.link" :aria-label="props.post.post_title" :style="`${gridLayoutString}`">
|
|
43
|
+
<img v-if="props.post.post_images['post_' + imageType + '_src']"
|
|
44
|
+
:class="`${blockClassname}__post-image ${blockClassname}__post-${imageType} ${blockClassname}__post-image--${imageType}`"
|
|
45
|
+
loading="lazy" :src="props.post.post_images['post_' + imageType + '_src']"
|
|
46
|
+
:width="props.post.post_images['post_' + imageType + '_width']"
|
|
47
|
+
:height="props.post.post_images['post_' + imageType + '_height']"
|
|
48
|
+
:srcset="props.post.post_images['post_' + imageType + '_srcset']" :sizes=sizes
|
|
49
|
+
:alt="props.post.post_images['post_' + imageType + '_alt_text']"
|
|
50
|
+
:style="`${styleString} ${positioningString} ${postImageWidthString}`" />
|
|
51
|
+
<img v-if="props.fields.show_alt_image_on_hover"
|
|
52
|
+
:class="`${blockClassname}__post-image--secondary ${blockClassname}__post-${imageTypeSecondary}`"
|
|
53
|
+
loading="lazy" :src="props.post.post_images['post_' + imageTypeSecondary + '_src']"
|
|
54
|
+
:width="props.post.post_images['post_' + imageTypeSecondary + '_width']"
|
|
55
|
+
:height="props.post.post_images['post_' + imageTypeSecondary + '_height']"
|
|
56
|
+
:srcset="props.post.post_images['post_' + imageTypeSecondary + '_srcset']" :sizes=sizes
|
|
57
|
+
:alt="props.post.post_images['post_' + imageTypeSecondary + '_alt_text']"
|
|
58
|
+
:style="`${postImageWidthString}`" />
|
|
59
|
+
</a>
|
|
60
|
+
</template>
|
package/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-info-description.vue
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps(["post", "element"]);
|
|
5
|
+
const blockClassname = "post-type-filter-grid-v3";
|
|
6
|
+
const gridLayoutString = gridLayoutElement(props);
|
|
7
|
+
const textEditorStylesString = textEditorStyles(props);
|
|
8
|
+
</script>
|
|
9
|
+
<template>
|
|
10
|
+
<div :class="`${blockClassname}__post-info-description ${blockClassname}__info-item`"
|
|
11
|
+
:style="`${gridLayoutString} ${textEditorStylesString}`">
|
|
12
|
+
<p :class="`${element.text_style?.typography_style.slice(2)}`">{{ post.post_data.post_info_description }}</p>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|