@total_onion/onion-library 1.0.6 → 1.0.8
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/package.json +1 -1
- package/update-component.js +2 -1
- package/components/block-post-type-filter-grid-v2/group_64690c62487bc.json +0 -4380
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/better-reviews-widget.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/buy-now-widget.vue +0 -72
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/cocktail-category.vue +0 -54
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/cocktail-tasting-notes.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/divider-widget.vue +0 -11
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/drink-tastes.vue +0 -26
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/featured-post-component.vue +0 -61
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/global-image-widget.vue +0 -23
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/media-widget.vue +0 -23
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/person-email-widget.vue +0 -20
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/person-name-widget.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/person-questionaire-widget.vue +0 -17
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/person-rating-widget.vue +0 -25
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-author-widget.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-category-widget.vue +0 -20
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-component.vue +0 -130
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-headline-widget.vue +0 -16
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-image-widget.vue +0 -60
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-info-description.vue +0 -14
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-info-subtitle.vue +0 -14
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-link-widget.vue +0 -44
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-publish-widget.vue +0 -44
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-tags-widget.vue +0 -20
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-text-alternative-style.vue +0 -18
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-title-widget.vue +0 -20
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/pre-render-posts-html.twig +0 -17
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-abv.vue +0 -18
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-age-statement.vue +0 -17
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-bazaarvoice.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-brand.vue +0 -16
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-cask-type.vue +0 -16
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-country.vue +0 -14
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-description.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-details-name.vue +0 -18
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-details-price.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-finish.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-history.vue +0 -16
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-link.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-logo-widget.vue +0 -22
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-name.vue +0 -17
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-nose.vue +0 -16
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-price.vue +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-slug.vue +0 -14
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-taste.vue +0 -16
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/product-whisky-type.vue +0 -25
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/ptfg-posts.twig +0 -449
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/ptfg-utils.vue +0 -38
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/shopify-add-to-cart.vue +0 -31
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/social-media-item.vue +0 -58
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/spacer-widget.vue +0 -13
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/text-search.vue +0 -10
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2-extra.scss +0 -6
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2.js +0 -15
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2.php +0 -48
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2.scss +0 -989
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2.twig +0 -150
- package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2.vue +0 -893
package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/better-reviews-widget.vue
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { gridLayoutElement, textEditorStyles } from "./ptfg-utils.vue";
|
|
3
|
-
const blockClassname = "post-type-filter-grid-v2";
|
|
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>
|
package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/buy-now-widget.vue
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
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-v2/post-type-filter-grid-v2/cocktail-category.vue
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const props = defineProps(["post", "element"]);
|
|
3
|
-
const blockClassname = "post-type-filter-grid-v2";
|
|
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
|
|
16
|
-
:class="`${blockClassname}__cocktail-category ${blockClassname}__info-item`"
|
|
17
|
-
:style="`--grid-column-start-mobile: ${
|
|
18
|
-
element.grid_layout_element?.grid_column_start_mobile
|
|
19
|
-
}; --grid-column-span-mobile: ${
|
|
20
|
-
element.grid_layout_element?.grid_column_span_mobile
|
|
21
|
-
}; --grid-row-start-mobile: ${
|
|
22
|
-
element.grid_layout_element?.grid_row_start_mobile
|
|
23
|
-
}; --grid-row-span-mobile: ${
|
|
24
|
-
element.grid_layout_element?.grid_row_span_mobile
|
|
25
|
-
}; --grid-column-start: ${
|
|
26
|
-
element.grid_layout_element?.grid_column_start
|
|
27
|
-
}; --grid-column-span: ${
|
|
28
|
-
element.grid_layout_element?.grid_column_span
|
|
29
|
-
}; --grid-row-start: ${
|
|
30
|
-
element.grid_layout_element?.grid_row_start
|
|
31
|
-
}; --grid-row-span: ${
|
|
32
|
-
element.grid_layout_element?.grid_row_span
|
|
33
|
-
}; --grid-horizontal-placement: ${element.grid_layout_element?.grid_horizontal_placement.slice(
|
|
34
|
-
2
|
|
35
|
-
)}; --grid-vertical-placement: ${element.grid_layout_element?.grid_vertical_placement.slice(
|
|
36
|
-
2
|
|
37
|
-
)}; --text-align: ${element.text_style?.text_align.slice(
|
|
38
|
-
2
|
|
39
|
-
)}; --text-transform: ${element.text_style?.text_transform.slice(
|
|
40
|
-
2
|
|
41
|
-
)}; --font-weight: ${element.text_style.text_font_weight.slice(
|
|
42
|
-
2
|
|
43
|
-
)}; --font-style: ${element.text_style.font_style.slice(
|
|
44
|
-
2
|
|
45
|
-
)}; --text-colour: ${textColour}`"
|
|
46
|
-
>
|
|
47
|
-
<p
|
|
48
|
-
v-html="post.cocktail_category"
|
|
49
|
-
:class="`${blockClassname}__cocktail-category--item ${element.text_style?.typography_style.slice(
|
|
50
|
-
2
|
|
51
|
-
)}`"
|
|
52
|
-
></p>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
@@ -1,15 +0,0 @@
|
|
|
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-v2";
|
|
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>
|
package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/divider-widget.vue
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
-
const props = defineProps(["post", "element"]);
|
|
4
|
-
const blockClassname = "post-type-filter-grid-v2";
|
|
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>
|
|
@@ -1,26 +0,0 @@
|
|
|
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-v2";
|
|
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>
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const props = defineProps(["featuredpost", "fields", "mappedIcons", "ctaStyles"]);
|
|
3
|
-
|
|
4
|
-
const blockClassname = "post-type-filter-grid-v2";
|
|
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" :aria-label="post.post_title">
|
|
28
|
-
<div :class="`${blockClassname}__featured-post-image-container`">
|
|
29
|
-
<picture>
|
|
30
|
-
<source media="(min-width: 1024px)" :srcset="props.featuredpost.post_image_src" width="1" height="1" />
|
|
31
|
-
<source :srcset="props.featuredpost.post_image_src_mobile" width="16" height="9"/>
|
|
32
|
-
<img v-if="props.featuredpost.post_image_src" :class="`${blockClassname}__featured-post-image`"
|
|
33
|
-
loading="lazy" :src="props.featuredpost.post_image_src" :width="props.featuredpost.post_image_width"
|
|
34
|
-
:height="props.featuredpost.post_image_height" :srcset="props.post_image_srcset" :sizes="sizes"
|
|
35
|
-
:alt="props.post_image_alt" />
|
|
36
|
-
</picture>
|
|
37
|
-
<div v-if="featuredpost.post_category" :class="`${blockClassname}__featured-post-category`">
|
|
38
|
-
<template v-for="(category, index) in featuredpost.post_category" :key="index">
|
|
39
|
-
<p v-if="featuredpost.post_category != 'translation_priority'" v-html="category.name"
|
|
40
|
-
:class="`${blockClassname}__featured-post-category--item`">
|
|
41
|
-
</p>
|
|
42
|
-
</template>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div :class="`${blockClassname}__featured-post-content-container`">
|
|
46
|
-
<h2 v-if="post.post_title" :class="`${blockClassname}__featured-post-title`">{{ post.post_title }}</h2>
|
|
47
|
-
<p v-if="featuredpost.post_info_subtitle" :class="`${blockClassname}__featured-post-subtitle`">{{
|
|
48
|
-
featuredpost.post_info_subtitle }}</p>
|
|
49
|
-
<p v-if="featuredpost.post_info_description" :class="`${blockClassname}__featured-post-description`">{{
|
|
50
|
-
featuredpost.post_info_description }}</p>
|
|
51
|
-
<a v-if="featuredpost.post_link"
|
|
52
|
-
:class="`${blockClassname}__featured-post-link ${blockClassname}__cta cmpl-cta-style-${fields.featured_post_button_style} cmpl-cta-animation-style-${ctaAnimationStyle}`"
|
|
53
|
-
:href="featuredpost.post_link">
|
|
54
|
-
<span :class="`${blockClassname}__cta-span`">Read more</span>
|
|
55
|
-
<span :class="`${blockClassname}__cta-icon cmpl-cta-icon ${blockClassname}__icon-image`"
|
|
56
|
-
v-html="iconImage">
|
|
57
|
-
</span>
|
|
58
|
-
</a>
|
|
59
|
-
</div>
|
|
60
|
-
</a>
|
|
61
|
-
</template>
|
package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/global-image-widget.vue
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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-v2";
|
|
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>
|
|
@@ -1,23 +0,0 @@
|
|
|
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-v2";
|
|
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-v2/post-type-filter-grid-v2/person-email-widget.vue
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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-v2";
|
|
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-v2/post-type-filter-grid-v2/person-name-widget.vue
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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-v2";
|
|
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>
|
|
@@ -1,17 +0,0 @@
|
|
|
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-v2";
|
|
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-v2/post-type-filter-grid-v2/person-rating-widget.vue
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
-
|
|
4
|
-
const props = defineProps(["post", "element"]);
|
|
5
|
-
const blockClassname = "post-type-filter-grid-v2";
|
|
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-v2/post-type-filter-grid-v2/post-author-widget.vue
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { gridLayoutElement } from "./ptfg-utils.vue";
|
|
3
|
-
|
|
4
|
-
const props = defineProps(["post", "element"]);
|
|
5
|
-
const blockClassname = "post-type-filter-grid-v2";
|
|
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-v2/post-type-filter-grid-v2/post-category-widget.vue
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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-v2";
|
|
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>
|
package/components/block-post-type-filter-grid-v2/post-type-filter-grid-v2/post-component.vue
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
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-v2";
|
|
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-v2/post-type-filter-grid-v2/post-headline-widget.vue
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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-v2";
|
|
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-v2/post-type-filter-grid-v2/post-image-widget.vue
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
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-v2";
|
|
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>
|