@total_onion/onion-library 2.0.252 → 2.0.255
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-single-responsive-image-v3/single-responsive-image-v3.twig +1 -4
- package/components/component-buy-now-button-v3/buy-now-buttons-v3.twig +69 -0
- package/components/component-responsive-image-v3/responsive-image-v3.twig +26 -93
- package/components/component-responsive-picture-element-v3/responsive-picture-element-v3.twig +35 -0
- package/components/fields-cocktail-info-v3/group_64c29b7f188ca.json +109 -19
- package/components/webc-counter-display/counter-display.css +2 -0
- package/components/webc-counter-display/counter-display.html +5 -0
- package/components/webc-counter-display/counter-display.js +30 -0
- package/components/webc-counter-display/index.html +30 -0
- package/package.json +2 -2
|
@@ -11,12 +11,9 @@
|
|
|
11
11
|
{{sectionStyles}}
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<section
|
|
15
|
-
{{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{fields.section_class}} {{classNameEntryPoint}} lazy-fade {{block.id}}" data-jsload="false" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
|
|
14
|
+
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{fields.section_class}} {{classNameEntryPoint}} lazy-fade {{block.id}}" data-jsload="false" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
|
|
16
15
|
|
|
17
|
-
<!--pattern-replace-start:component/responsive-image -->
|
|
18
16
|
{{ include('components/responsive-image-v3.twig', { fields, block, blockClassName }, with_context = false) }}
|
|
19
|
-
<!--pattern-replace-end:component/responsive-image -->
|
|
20
17
|
|
|
21
18
|
{% if fields.animations.enable_animations %}
|
|
22
19
|
{{ include('components/animations-style-v3.twig', { fields, block, blockClassName }, with_context = false) }}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{% set product = post %}
|
|
2
|
+
{% set buyNowOptionSelect = product.meta('buy_now_option_select') %}
|
|
3
|
+
{% if buyNowOptionSelect|ru == 'link' %}
|
|
4
|
+
{% set productDirectLink = product.meta('direct_link') %}
|
|
5
|
+
{% set directLinkTarget = '_blank' %}
|
|
6
|
+
<a href="{{productDirectLink.url}}" class="{{blockClassName|default('default-class')}}__cta cmpl-cta-style-{{cta.cta_style|ru}}" target="{{directLinkTarget}}" title="{{productDirectLink.title}}">{{productDirectLink.title}}</a>
|
|
7
|
+
{% endif %}
|
|
8
|
+
{% if buyNowOptionSelect|ru == 'ctb' %}
|
|
9
|
+
{% if cta.cta_buy_now_text is not empty %}
|
|
10
|
+
{% set productCtbPimid = product.meta('click_to_buy_pim_id') %}
|
|
11
|
+
<a href="#" class="{{blockClassName|default('default-class')}}__cta cmpl-cta-style-{{cta.cta_style|ru}}" data-ctbuy data-ctbuy-variant="{{productCtbPimid}}" data-ctbuy-country="" data-ctbuy-lang="" data-ctbuy-default-view="" data-ctbuy-customquerystring="" data-ctbuy-direct-link="" title="{{cta.cta_buy_now_text}}">{{cta.cta_buy_now_text}}</a>
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% if buyNowOptionSelect|ru == "ctb-pricespider" %}
|
|
15
|
+
{% set enablePricespider = attribute(market_settings['e-shop_settings'], 'enable_pricespider') %}
|
|
16
|
+
{% set productCtbPriceSpicerSku = product.meta('pricespider_sku_id') %}
|
|
17
|
+
{% if enablePricespider and productCtbPriceSpicerSku is not empty %}
|
|
18
|
+
<a class="ps-widget {{blockClassName|default('default-class')}}__cta cmpl-cta-style-{{cta.cta_style|ru}}" ps-sku="{{productCtbPriceSpicerSku}}"></a>
|
|
19
|
+
{% endif %}
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% if buyNowOptionSelect|ru == 'wtb' %}
|
|
22
|
+
{% if cta.cta_buy_now_text is not empty %}
|
|
23
|
+
{% set productPimDebrainId = product.meta('debrain_pim_id') %}
|
|
24
|
+
<a href="#" class="dloc-link {{blockClassName|default('default-class')}}__cta cmpl-cta-style-{{cta.cta_style|ru}}" data-action="where-to-buy" data-filter="{{productPimDebrainId}}">{{cta.cta_buy_now_text}}</a>
|
|
25
|
+
{% endif %}
|
|
26
|
+
{% endif %}
|
|
27
|
+
{% if buyNowOptionSelect|ru == 'wtb-v2' %}
|
|
28
|
+
{% set productDebrainSkuId = product.meta('debrain_sku_id') %}
|
|
29
|
+
{% if productDebrainSkuId is not empty %}
|
|
30
|
+
<wtb-button sku={{productDebrainSkuId}} class="{{blockClassName|default('default-class')}}__cta cmpl-cta-style-{{cta.cta_style|ru}}">{{cta.cta_buy_now_text}}</wtb-button>
|
|
31
|
+
{% endif %}
|
|
32
|
+
{% endif %}
|
|
33
|
+
{% if buyNowOptionSelect|ru == 'mikmak' %}
|
|
34
|
+
{% set productEANs = product.meta('mikmak_ean_ids') %}
|
|
35
|
+
{% set relatedProducts = product.meta('related_products') %}
|
|
36
|
+
{% set drawer_widget_id = attribute(market_settings['e-shop_settings'], 'mikmak_ctb_drawer_widget_id') %}
|
|
37
|
+
|
|
38
|
+
{% set relatedProductEANs = '' %}
|
|
39
|
+
{% for post in relatedProducts %}
|
|
40
|
+
{% set relatedProduct = get_post(post) %}
|
|
41
|
+
{% set relatedProductEANs = relatedProductEANs ~ ',' ~ relatedProduct.meta('mikmak_ean_ids')|trim(',') %}
|
|
42
|
+
{% endfor %}
|
|
43
|
+
{% set relatedProductEANs = relatedProductEANs|trim(',') %}
|
|
44
|
+
|
|
45
|
+
{% if productEANs is not empty and drawer_widget_id is not empty %}
|
|
46
|
+
{% set totalProductEANs = productEANs ~ (relatedProductEANs is not empty ? ',' ~ relatedProductEANs : '') %}
|
|
47
|
+
<a href="#" data-mm-wtbid="{{drawer_widget_id}}" data-mm-ids="{{totalProductEANs}}" class="{{blockClassName|default('default-class')}}__cta cmpl-cta-style-{{cta.cta_style|ru}} mikmak-buy-now">{{cta.cta_buy_now_text}}</a>
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% endif %}
|
|
50
|
+
{% if buyNowOptionSelect|ru == 'reservebar' %}
|
|
51
|
+
{% if cta.cta_buy_now_text is not empty %}
|
|
52
|
+
{% set reserveBarLiquidId = product.meta('reserve_bar_liquid_grouping_id') %}
|
|
53
|
+
<a href="#" class="{{blockClassName|default('default-class')}}__cta cmpl-cta-style-{{cta.cta_style|ru}} reservebar-popup-trigger" reservebar-liquid-id="{{reserveBarLiquidId}}">{{cta.cta_buy_now_text}}</a>
|
|
54
|
+
{% endif %}
|
|
55
|
+
{% endif %}
|
|
56
|
+
{% if buyNowOptionSelect|ru == 'shopify' %}
|
|
57
|
+
{% if product.shopify_id is not empty %}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<div class="shopify-wrapper shopify-integration has-shop shop-shopify" data-extraclasses="{{style_classes}}" data-pim="{{product.shopify_id}}" data-label="{{product.meta.buy_now_button_text|default("Add to cart")}}" data-cask-name="{{product.cask_name}}" data-vol="{{product.volume}}"></div>
|
|
61
|
+
{% endif %}
|
|
62
|
+
{% if product.shopify_id_engraved is not empty %}
|
|
63
|
+
|
|
64
|
+
<div class="shopify-wrapper shopify-integration has-shop shop-shopify engraved" data-extraclasses="{{style_classes}}" data-pim="{{product.shopify_id_engraved}}" data-label="{{product.buy_now_button_text_alt|default(" buy engraved")}}" data-cask-name="{{product.cask_name}}" data-vol="{{product.volume}}"></div>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
{% endif %}
|
|
68
|
+
|
|
69
|
+
{% endif %}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{% if fields.enable_image|default(fields.image_enabled) %}
|
|
2
|
-
{% set renderDynamic = fields.child_patterns.render_dynamic|default(0) %}
|
|
3
|
-
{% set suffix = fields.child_patterns.suffix %}
|
|
4
|
-
|
|
5
|
-
{% set desktopType = fields.desktop_image_aspect_ratio|ru|default('original') %}
|
|
6
|
-
{% set tabletType = fields.tablet_image_aspect_ratio|ru|default('original') %}
|
|
7
|
-
{% set mobileType = fields.mobile_image_aspect_ratio|ru|default('original') %}
|
|
8
2
|
|
|
9
3
|
{% set desktopImage = get_image(fields.desktop_image) %}
|
|
10
4
|
{% set tabletImage = get_image(fields.tablet_image)|default(desktopImage) %}
|
|
11
5
|
{% set mobileImage = get_image(fields.mobile_image) %}
|
|
12
6
|
|
|
7
|
+
{% set renderDynamic = fields.child_patterns.render_dynamic|default(0) %}
|
|
8
|
+
{% set suffix = fields.child_patterns.suffix %}
|
|
9
|
+
|
|
10
|
+
{% set selectedAspectRatioDesktop = fields.desktop_custom_aspect_ratio|default(desktopImage.width ~ '/' ~ desktopImage.height)|replace({'/' : 'x', ':' : 'x'}) %}
|
|
11
|
+
{% set selectedAspectRatioTablet = fields.tablet_custom_aspect_ratio|default(desktopImage.width ~ '/' ~ desktopImage.height)|replace({'/' : 'x', ':' : 'x'}) %}
|
|
12
|
+
{% set selectedAspectRatioMobile = fields.mobile_custom_aspect_ratio|default(desktopImage.width ~ '/' ~ desktopImage.height)|replace({'/' : 'x', ':' : 'x'}) %}
|
|
13
|
+
|
|
13
14
|
{% set imageSizes = fields.custom_image_sizes %}
|
|
14
|
-
{% set sizes = imageSizes|default('(min-width: 1440px) 100vw, (min-width: 1024px) 1024px, (min-width: 768px) 768px, (min-width: 500px) 100vw, 250px') %}
|
|
15
|
+
{% set sizes = imageSizes|default('auto, (min-width: 1440px) 100vw, (min-width: 1024px) 1024px, (min-width: 768px) 768px, (min-width: 500px) 100vw, 250px') %}
|
|
15
16
|
|
|
16
17
|
{% set imageFitStyle = '--image-fit-style:' ~ (fields.image_fit_style|ru|default('cover')) ~ ';' %}
|
|
17
18
|
{% set imageObjectPositionAlign = '--image-object-position-align:' ~ (fields.image_object_position_align|ru) ~ ';' %}
|
|
@@ -23,9 +24,6 @@
|
|
|
23
24
|
{% set imagePosition = '--image-position:' ~ fields.image_position|ru ~ ';' %}
|
|
24
25
|
{% set imageGridArea = '--image-grid-area:' ~ fields.image_grid_area|ru|default('main') ~ ';' %}
|
|
25
26
|
{% set imageBorderRadius = '--image-border-radius:' ~ fields.image_border_radius ~ ';' %}
|
|
26
|
-
{% set imageAspectRatioDesktop = '--image-aspect-ratio-desktop:' ~ fields.image_aspect_ratio_desktop ~ ';' %}
|
|
27
|
-
{% set imageAspectRatioPortrait = '--image-aspect-ratio-portrait:' ~ fields.image_aspect_ratio_portrait ~ ';' %}
|
|
28
|
-
{% set imageAspectRatioMobile = '--image-aspect-ratio-mobile:' ~ fields.image_aspect_ratio_mobile ~ ';' %}
|
|
29
27
|
{% set imageOffsetVert = '--image-offset-vert:' ~ fields.image_offset_vertical ~ '%;' %}
|
|
30
28
|
{% set imageOffsetHoriz = '--image-offset-horiz:' ~ fields.image_offset_horizontal ~ '%;' %}
|
|
31
29
|
{% set enableImageBorder = fields.enable_image_border %}
|
|
@@ -41,98 +39,33 @@
|
|
|
41
39
|
{% set pictureStylesString = imageFitStyle ~ imageObjectPositionAlign ~ imageWidth ~ imageWidthMobile ~ imageWidthPortrait ~ imageOpacity ~ imageAspectRatioDesktop ~ imageAspectRatioPortrait ~ imageAspectRatioMobile ~ imageOffsetVert ~ imageOffsetHoriz ~ imageBorderRadius ~ imagePosition ~ imageGridArea ~ imageMinHeightMobile ~ imageMinHeightDesktop ~ subtractHeaderHeight ~ imageZIndex %}
|
|
42
40
|
{% set enableEagerLoading = fields.enable_eager_image_loading ? 'loading="eager" fetchpriority="high"' : 'loading="lazy"' %}
|
|
43
41
|
|
|
44
|
-
{% set selectedAspectRatioDesktop = fields.desktop_image_aspect_ratio|ru %}
|
|
45
|
-
{% set selectedAspectRatioTablet = fields.tablet_image_aspect_ratio|ru %}
|
|
46
|
-
{% set selectedAspectRatioMobile = fields.mobile_image_aspect_ratio|ru %}
|
|
47
|
-
|
|
48
|
-
{% if selectedAspectRatioDesktop == 'original' %}
|
|
49
|
-
{% set isSVG = desktopImage.post_mime_type == 'image/svg+xml' %}
|
|
50
|
-
{% set selectedAspectRatioDesktop = null %}
|
|
51
|
-
{% set mainImageSrc = isSVG ? desktopImage.src : gt_image_mainsrc(desktopImage) %}
|
|
52
|
-
{% set desktopSrcset = isSVG ? desktopImage.src : gt_image_srcset(desktopImage) %}
|
|
53
|
-
{% elseif selectedAspectRatioDesktop == 'custom_aspect_ratio' %}
|
|
54
|
-
{% set isSVG = desktopImage.post_mime_type == 'image/svg+xml' %}
|
|
55
|
-
{% set customAspectRatio = fields.desktop_custom_aspect_ratio %}
|
|
56
|
-
{% set mainImageSrc = isSVG ? desktopImage.src : gt_image_mainsrc(desktopImage, {"aspect_ratio": customAspectRatio|replace({'/' : 'x', ':' : 'x'})}) %}
|
|
57
|
-
{% set desktopSrcset = isSVG ? desktopImage.src : gt_image_srcset(desktopImage, {"aspect_ratio": customAspectRatio|replace({'/' : 'x', ':' : 'x'})}) %}
|
|
58
|
-
{% else %}
|
|
59
|
-
{% set isSVG = desktopImage.post_mime_type == 'image/svg+xml' %}
|
|
60
|
-
{% set mainImageSrc = isSVG ? desktopImage.src : gt_image_mainsrc(desktopImage, {"aspect_ratio" : selectedAspectRatioDesktop}) %}
|
|
61
|
-
{% set desktopSrcset = isSVG ? desktopImage.src : gt_image_srcset(desktopImage, {"aspect_ratio" : selectedAspectRatioDesktop}) %}
|
|
62
|
-
{% endif %}
|
|
63
|
-
|
|
64
|
-
{% if selectedAspectRatioTablet == 'original' %}
|
|
65
|
-
{% set isSVG = tabletImage.post_mime_type == 'image/svg+xml' %}
|
|
66
|
-
{% set selectedAspectRatioTablet = null %}
|
|
67
|
-
{% set tabletSrcset = isSVG ? tabletImage.src : gt_image_srcset(tabletImage)%}
|
|
68
|
-
{% elseif selectedAspectRatioTablet == 'custom_aspect_ratio' %}
|
|
69
|
-
{% set isSVG = tabletImage.post_mime_type == 'image/svg+xml' %}
|
|
70
|
-
{% set customAspectRatio = fields.tablet_custom_aspect_ratio %}
|
|
71
|
-
{% set mainImageSrc = isSVG ? tabletImage.src : gt_image_mainsrc(tabletImage, {"aspect_ratio": customAspectRatio|replace({'/' : 'x', ':' : 'x'})}) %}
|
|
72
|
-
{% set tabletSrcset = isSVG ? tabletImage.src : gt_image_srcset(tabletImage, {"aspect_ratio": customAspectRatio|replace({'/' : 'x', ':' : 'x'})}) %}
|
|
73
|
-
{% else %}
|
|
74
|
-
{% set isSVG = tabletImage.post_mime_type == 'image/svg+xml' %}
|
|
75
|
-
{% set tabletSrcset = isSVG ? tabletImage.src : gt_image_srcset(tabletImage, {"aspect_ratio" : selectedAspectRatioTablet})%}
|
|
76
|
-
{% endif %}
|
|
77
|
-
|
|
78
|
-
{% if selectedAspectRatioMobile == 'original' %}
|
|
79
|
-
{% set isSVG = mobileImage.post_mime_type == 'image/svg+xml' %}
|
|
80
|
-
{% set selectedAspectRatioMobile = null %}
|
|
81
|
-
{% set mobileSrcset = isSVG ? mobileImage.src : gt_image_srcset(mobileImage) %}
|
|
82
|
-
{% elseif selectedAspectRatioMobile == 'custom_aspect_ratio' %}
|
|
83
|
-
{% set isSVG = mobileImage.post_mime_type == 'image/svg+xml' %}
|
|
84
|
-
{% set customAspectRatio = fields.mobile_custom_aspect_ratio %}
|
|
85
|
-
{% set mainImageSrc = isSVG ? mobileImage.src : gt_image_mainsrc(mobileImage, {"aspect_ratio": customAspectRatio|replace({'/' : 'x', ':' : 'x'})}) %}
|
|
86
|
-
{% set mobileSrcset = isSVG ? mobileImage.src : gt_image_srcset(mobileImage, {"aspect_ratio": customAspectRatio|replace({'/' : 'x', ':' : 'x'})}) %}
|
|
87
|
-
{% else %}
|
|
88
|
-
{% set isSVG = mobileImage.post_mime_type == 'image/svg+xml' %}
|
|
89
|
-
{% set mobileSrcset = isSVG ? mobileImage.src : gt_image_srcset(mobileImage, {"aspect_ratio" : selectedAspectRatioMobile})%}
|
|
90
|
-
{% endif %}
|
|
91
42
|
{% set parallaxEnabled = fields.parallax_enabled %}
|
|
92
43
|
{% if parallaxEnabled %}
|
|
93
44
|
{% set parallaxDepth = 'data-depth=' ~ fields.parallax_depth ~ " " %}
|
|
94
45
|
{% set parallaxOffsetY = 'data-y-offset=' ~ fields.parallax_offset_y ~ " " %}
|
|
95
46
|
{% endif %}
|
|
47
|
+
{% set picture_id = block.id %}
|
|
96
48
|
|
|
97
49
|
<style>
|
|
98
|
-
.{{
|
|
50
|
+
.single-responsive-image-v3__picture.{{picture_id|default(block.id)}}{
|
|
99
51
|
{{pictureStylesString}}
|
|
100
52
|
{{imageBorderString}}
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{% endif %}
|
|
108
|
-
|
|
109
|
-
{% if selectedAspectRatioTablet == 'custom_aspect_ratio' %}
|
|
110
|
-
--image-aspect-ratio-portrait: {{fields.tablet_custom_aspect_ratio}}
|
|
111
|
-
;
|
|
112
|
-
{% elseif selectedAspectRatioTablet %}
|
|
113
|
-
--image-aspect-ratio-portrait: {{selectedAspectRatioTablet|replace({'x': '/'})}}
|
|
114
|
-
;
|
|
115
|
-
{% endif %}
|
|
116
|
-
|
|
117
|
-
{% if selectedAspectRatioMobile == 'custom_aspect_ratio' %}
|
|
118
|
-
--image-aspect-ratio-mobile: {{fields.mobile_custom_aspect_ratio}}
|
|
119
|
-
;
|
|
120
|
-
{% elseif selectedAspectRatioMobile %}
|
|
121
|
-
--image-aspect-ratio-mobile: {{selectedAspectRatioMobile|replace({'x': '/'})}}
|
|
122
|
-
;
|
|
123
|
-
{% endif %}
|
|
53
|
+
--image-aspect-ratio-desktop: {{selectedAspectRatioDesktop|replace({'x': '/'})}}
|
|
54
|
+
;
|
|
55
|
+
--image-aspect-ratio-portrait: {{selectedAspectRatioTablet|replace({'x': '/'})}}
|
|
56
|
+
;
|
|
57
|
+
--image-aspect-ratio-mobile: {{selectedAspectRatioMobile|replace({'x': '/'})}}
|
|
58
|
+
;
|
|
124
59
|
}
|
|
125
60
|
</style>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<img data-type="srcGeneral" data-elementname="main-image" data-pattern-suffix="{{suffix}}" data-pattern-dynamic="{{renderDynamic}}" {{ enableEagerLoading }} class="{{ blockClassName|default('cbl-image') }}__image" src="{{mainImageSrc}}" alt="{{ desktopImage.alt }}" {{ parallaxDepth }} {{ parallaxOffsetY }}/>
|
|
137
|
-
</picture>
|
|
61
|
+
|
|
62
|
+
<!--pattern-replace-var:selectedAspectRatioDesktop={{selectedAspectRatioDesktop}}-->
|
|
63
|
+
<!--pattern-replace-var:selectedAspectRatioTablet={{selectedAspectRatioTablet}}-->
|
|
64
|
+
<!--pattern-replace-var:selectedAspectRatioMobile={{selectedAspectRatioMobile}}-->
|
|
65
|
+
<!--pattern-replace-var:sizes={{sizes}}-->
|
|
66
|
+
<!--pattern-replace-var:picture_id={{picture_id}}-->
|
|
67
|
+
|
|
68
|
+
<!--pattern-include-start:components/responsive-picture-element-v3-->
|
|
69
|
+
{{ include('components/responsive-picture-element-v3.twig') }}
|
|
70
|
+
<!--pattern-include-end:components/responsive-picture-element-v3-->
|
|
138
71
|
{% endif %}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{% set desktopImage = get_image(fields.image_desktop|default(fields.desktop_image)) %}
|
|
2
|
+
{% set tabletImage = get_image(fields.image_portrait|default(fields.tablet_image))|default(desktopImage) %}
|
|
3
|
+
|
|
4
|
+
{% set mobileImage = get_image(fields.image_mobile|default(fields.mobile_image)) %}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
{% set isSVG = desktopImage.post_mime_type == 'image/svg+xml' %}
|
|
8
|
+
{% set customAspectRatioDesktop = selectedAspectRatioDesktop %}
|
|
9
|
+
{% set aspectRatioParamDesktop = {"aspect_ratio": customAspectRatioDesktop} %}
|
|
10
|
+
{% set mainImageSrc = isSVG ? desktopImage.src : gt_image_mainsrc(desktopImage, aspectRatioParamDesktop) %}
|
|
11
|
+
{% set desktopSrcset = isSVG ? desktopImage.src : gt_image_srcset(desktopImage, aspectRatioParamDesktop) %}
|
|
12
|
+
|
|
13
|
+
{% set isSVG = tabletImage.post_mime_type == 'image/svg+xml' %}
|
|
14
|
+
{% set customAspectRatioTablet = selectedAspectRatioTablet|default(tabletImage.width ~ '/' ~ tabletImage.height)|replace({'/' : 'x', ':' : 'x'}) %}
|
|
15
|
+
|
|
16
|
+
{% set aspectRatioParamTablet = {"aspect_ratio": customAspectRatioTablet} %}
|
|
17
|
+
{% set tabletSrcset = isSVG ? tabletImage.src : gt_image_srcset(tabletImage, aspectRatioParamTablet) %}
|
|
18
|
+
|
|
19
|
+
{% set isSVG = mobileImage.post_mime_type == 'image/svg+xml' %}
|
|
20
|
+
{% set customAspectRatioMobile = selectedAspectRatioMobile|default(mobileImage.width ~ '/' ~ mobileImage.height)|replace({'/' : 'x', ':' : 'x'}) %}
|
|
21
|
+
{% set aspectRatioParamMobile = {"aspect_ratio": customAspectRatioMobile} %}
|
|
22
|
+
{% set mobileSrcset = isSVG ? mobileImage.src : gt_image_srcset(mobileImage, aspectRatioParamMobile) %}
|
|
23
|
+
|
|
24
|
+
<picture class="single-responsive-image-v3__picture {{picture_id|default(block.id)}}" data-pattern-suffix="{{suffix}}" data-pattern-dynamic="{{renderDynamic}}" data-assetkey="responsive-image" data-enableparallax="{{ parallaxEnabled }}">
|
|
25
|
+
{% if desktopImage %}
|
|
26
|
+
<source data-type="srcSetDesktop" data-pattern-suffix="{{suffix}}" media="(min-width: 1024px)" class="single-responsive-image-v3__source single-responsive-image-v3--desktop" width="{{ desktopImage.width }}" height="{{ desktopImage.height }}" srcset="{{desktopSrcset}}"/>
|
|
27
|
+
{% endif %}
|
|
28
|
+
{% if tabletImage %}
|
|
29
|
+
<source data-type="srcSetTablet" data-pattern-suffix="{{suffix}}" media="(min-width: 768px)" width="{{ tabletImage.width }}" height="{{ tabletImage.height }}" class="single-responsive-image-v3__source single-responsive-image-v3--tablet" srcset="{{ tabletSrcset }}"/>
|
|
30
|
+
{% endif %}
|
|
31
|
+
{% if mobileImage %}
|
|
32
|
+
<source data-type="srcSetMobile" data-pattern-suffix="{{suffix}}" class="single-responsive-image-v3__source single-responsive-image-v3__source--mobile" width="{{ mobileImage.width }}" height="{{ mobileImage.height }}" srcset="{{ mobileSrcset }}"/>
|
|
33
|
+
{% endif %}
|
|
34
|
+
<img data-type="srcGeneral" data-elementname="main-image" data-pattern-suffix="{{suffix}}" data-pattern-dynamic="{{renderDynamic}}" {{ enableEagerLoading }} sizes="{{ sizes }}" class="single-responsive-image-v3__image" src="{{mainImageSrc}}" alt="{{ desktopImage.alt }}" {{ parallaxDepth }} {{ parallaxOffsetY }}/>
|
|
35
|
+
</picture>
|
|
@@ -83,9 +83,10 @@
|
|
|
83
83
|
},
|
|
84
84
|
"wpml_cf_preferences": 3,
|
|
85
85
|
"choices": [
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
86
|
+
"Chivas Regal 18",
|
|
87
|
+
"Lillet Blanc",
|
|
88
|
+
"Yuzu Dry Curacao",
|
|
89
|
+
"Verjus"
|
|
89
90
|
],
|
|
90
91
|
"default_value": "placeholder1",
|
|
91
92
|
"return_format": "value",
|
|
@@ -290,10 +291,7 @@
|
|
|
290
291
|
"id": ""
|
|
291
292
|
},
|
|
292
293
|
"wpml_cf_preferences": 3,
|
|
293
|
-
"choices": [
|
|
294
|
-
"glass",
|
|
295
|
-
"shaker"
|
|
296
|
-
],
|
|
294
|
+
"choices": [],
|
|
297
295
|
"default_value": "placeholder1",
|
|
298
296
|
"return_format": "value",
|
|
299
297
|
"multiple": 0,
|
|
@@ -415,7 +413,7 @@
|
|
|
415
413
|
"class": "",
|
|
416
414
|
"id": ""
|
|
417
415
|
},
|
|
418
|
-
"wpml_cf_preferences":
|
|
416
|
+
"wpml_cf_preferences": 2,
|
|
419
417
|
"default_value": "",
|
|
420
418
|
"maxlength": "",
|
|
421
419
|
"allow_in_bindings": 0,
|
|
@@ -479,7 +477,7 @@
|
|
|
479
477
|
"required": 0,
|
|
480
478
|
"conditional_logic": 0,
|
|
481
479
|
"wrapper": {
|
|
482
|
-
"width": "
|
|
480
|
+
"width": "50",
|
|
483
481
|
"class": "",
|
|
484
482
|
"id": ""
|
|
485
483
|
},
|
|
@@ -500,7 +498,6 @@
|
|
|
500
498
|
"acfe_bidirectional_enabled": "0"
|
|
501
499
|
},
|
|
502
500
|
"allow_null": 0,
|
|
503
|
-
"allow_in_bindings": 0,
|
|
504
501
|
"bidirectional": 0,
|
|
505
502
|
"ui": 1,
|
|
506
503
|
"bidirectional_target": [],
|
|
@@ -517,7 +514,7 @@
|
|
|
517
514
|
"required": 0,
|
|
518
515
|
"conditional_logic": 0,
|
|
519
516
|
"wrapper": {
|
|
520
|
-
"width": "
|
|
517
|
+
"width": "50",
|
|
521
518
|
"class": "",
|
|
522
519
|
"id": ""
|
|
523
520
|
},
|
|
@@ -534,19 +531,16 @@
|
|
|
534
531
|
"prepend": "",
|
|
535
532
|
"append": "",
|
|
536
533
|
"allow_null": 0,
|
|
537
|
-
"allow_in_bindings": 0,
|
|
538
534
|
"ui": 0,
|
|
539
535
|
"ajax": 0,
|
|
540
536
|
"placeholder": "",
|
|
541
|
-
"create_options": 0,
|
|
542
|
-
"save_options": 0,
|
|
543
537
|
"allow_custom": 0,
|
|
544
538
|
"search_placeholder": "",
|
|
545
539
|
"min": ""
|
|
546
540
|
},
|
|
547
541
|
{
|
|
548
542
|
"key": "field_6952b66d4a602",
|
|
549
|
-
"label": "Time to make (
|
|
543
|
+
"label": "Time to make (Minutes)",
|
|
550
544
|
"name": "time_to_make",
|
|
551
545
|
"aria-label": "",
|
|
552
546
|
"type": "range",
|
|
@@ -554,7 +548,7 @@
|
|
|
554
548
|
"required": 0,
|
|
555
549
|
"conditional_logic": 0,
|
|
556
550
|
"wrapper": {
|
|
557
|
-
"width": "
|
|
551
|
+
"width": "50",
|
|
558
552
|
"class": "",
|
|
559
553
|
"id": ""
|
|
560
554
|
},
|
|
@@ -562,10 +556,107 @@
|
|
|
562
556
|
"default_value": "",
|
|
563
557
|
"min": 0,
|
|
564
558
|
"max": 30,
|
|
565
|
-
"allow_in_bindings": 0,
|
|
566
559
|
"step": "",
|
|
567
560
|
"prepend": "",
|
|
568
561
|
"append": ""
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"key": "field_695e8f508dfba",
|
|
565
|
+
"label": "Time to make (Units)",
|
|
566
|
+
"name": "time_to_make_units",
|
|
567
|
+
"aria-label": "",
|
|
568
|
+
"type": "text",
|
|
569
|
+
"instructions": "",
|
|
570
|
+
"required": 0,
|
|
571
|
+
"conditional_logic": 0,
|
|
572
|
+
"wrapper": {
|
|
573
|
+
"width": "50",
|
|
574
|
+
"class": "",
|
|
575
|
+
"id": ""
|
|
576
|
+
},
|
|
577
|
+
"wpml_cf_preferences": 2,
|
|
578
|
+
"default_value": "",
|
|
579
|
+
"maxlength": "",
|
|
580
|
+
"placeholder": "",
|
|
581
|
+
"prepend": "",
|
|
582
|
+
"append": ""
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"key": "field_698dc876365a3",
|
|
586
|
+
"label": "Recomendation",
|
|
587
|
+
"name": "",
|
|
588
|
+
"aria-label": "",
|
|
589
|
+
"type": "tab",
|
|
590
|
+
"instructions": "",
|
|
591
|
+
"required": 0,
|
|
592
|
+
"conditional_logic": 0,
|
|
593
|
+
"wrapper": {
|
|
594
|
+
"width": "",
|
|
595
|
+
"class": "",
|
|
596
|
+
"id": ""
|
|
597
|
+
},
|
|
598
|
+
"wpml_cf_preferences": 3,
|
|
599
|
+
"placement": "top",
|
|
600
|
+
"endpoint": 0,
|
|
601
|
+
"no_preference": 0,
|
|
602
|
+
"selected": 0
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"key": "field_698dc88c365a4",
|
|
606
|
+
"label": "Bartender’s recommentation Title",
|
|
607
|
+
"name": "bartender_recommentation_title",
|
|
608
|
+
"aria-label": "",
|
|
609
|
+
"type": "text",
|
|
610
|
+
"instructions": "",
|
|
611
|
+
"required": 0,
|
|
612
|
+
"conditional_logic": 0,
|
|
613
|
+
"wrapper": {
|
|
614
|
+
"width": "",
|
|
615
|
+
"class": "",
|
|
616
|
+
"id": ""
|
|
617
|
+
},
|
|
618
|
+
"wpml_cf_preferences": 2,
|
|
619
|
+
"default_value": "",
|
|
620
|
+
"maxlength": "",
|
|
621
|
+
"placeholder": "",
|
|
622
|
+
"prepend": "",
|
|
623
|
+
"append": ""
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"key": "field_698dc8ad365a5",
|
|
627
|
+
"label": "Bartender’s recommentation",
|
|
628
|
+
"name": "bartender_recommentation",
|
|
629
|
+
"aria-label": "",
|
|
630
|
+
"type": "wysiwyg",
|
|
631
|
+
"instructions": "",
|
|
632
|
+
"required": 0,
|
|
633
|
+
"conditional_logic": 0,
|
|
634
|
+
"wrapper": {
|
|
635
|
+
"width": "",
|
|
636
|
+
"class": "",
|
|
637
|
+
"id": ""
|
|
638
|
+
},
|
|
639
|
+
"wpml_cf_preferences": 2,
|
|
640
|
+
"default_value": "",
|
|
641
|
+
"acfe_wysiwyg_auto_init": 0,
|
|
642
|
+
"acfe_wysiwyg_height": 300,
|
|
643
|
+
"acfe_wysiwyg_max_height": "",
|
|
644
|
+
"acfe_wysiwyg_valid_elements": "",
|
|
645
|
+
"acfe_wysiwyg_custom_style": "",
|
|
646
|
+
"acfe_wysiwyg_disable_wp_style": 0,
|
|
647
|
+
"acfe_wysiwyg_autoresize": 0,
|
|
648
|
+
"acfe_wysiwyg_disable_resize": 0,
|
|
649
|
+
"acfe_wysiwyg_remove_path": 0,
|
|
650
|
+
"acfe_wysiwyg_menubar": 0,
|
|
651
|
+
"acfe_wysiwyg_transparent": 0,
|
|
652
|
+
"acfe_wysiwyg_merge_toolbar": 0,
|
|
653
|
+
"acfe_wysiwyg_custom_toolbar": 0,
|
|
654
|
+
"tabs": "visual",
|
|
655
|
+
"toolbar": "basic",
|
|
656
|
+
"media_upload": 0,
|
|
657
|
+
"delay": 0,
|
|
658
|
+
"acfe_wysiwyg_min_height": 300,
|
|
659
|
+
"acfe_wysiwyg_toolbar_buttons": []
|
|
569
660
|
}
|
|
570
661
|
],
|
|
571
662
|
"location": [
|
|
@@ -586,7 +677,6 @@
|
|
|
586
677
|
"active": true,
|
|
587
678
|
"description": "Library version - Do not modify in this project as any changes will be overwritten by future updates.",
|
|
588
679
|
"show_in_rest": 0,
|
|
589
|
-
"display_title": "",
|
|
590
680
|
"acfe_autosync": [
|
|
591
681
|
"json"
|
|
592
682
|
],
|
|
@@ -595,5 +685,5 @@
|
|
|
595
685
|
"acfe_display_title": "",
|
|
596
686
|
"acfe_meta": "",
|
|
597
687
|
"acfe_note": "",
|
|
598
|
-
"modified":
|
|
688
|
+
"modified": 1771865819
|
|
599
689
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default function counterDisplayJs(options = {}) {
|
|
2
|
+
try {
|
|
3
|
+
if (!customElements.get('counter-display')) {
|
|
4
|
+
customElements.define(
|
|
5
|
+
'counter-display',
|
|
6
|
+
class extends HTMLElement {
|
|
7
|
+
static observedAttributes = ['data-count'];
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
console.log('Display module added to page.');
|
|
13
|
+
this.classList.add('loaded');
|
|
14
|
+
}
|
|
15
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
16
|
+
console.log(
|
|
17
|
+
'🚀 ~ attributeChangedCallback ~ name:',
|
|
18
|
+
name
|
|
19
|
+
);
|
|
20
|
+
console.log('count', this.dataset.count);
|
|
21
|
+
|
|
22
|
+
this.innerText = `${this.dataset.countertext} ${this.dataset.count}`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error(error);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="stylesheet" href="../../public/publicBundleBase.css" />
|
|
7
|
+
<link rel="stylesheet" href="./counter-display.css" />
|
|
8
|
+
<title>PTFG</title>
|
|
9
|
+
<style>
|
|
10
|
+
body {
|
|
11
|
+
background-color: #e7b8b8;
|
|
12
|
+
}
|
|
13
|
+
main {
|
|
14
|
+
max-width: 600px;
|
|
15
|
+
margin-inline: auto;
|
|
16
|
+
padding: 50px;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<main class="main-container"></main>
|
|
22
|
+
<script async type="module">
|
|
23
|
+
const template = await fetch("./counter-display.html");
|
|
24
|
+
const html = await template.text();
|
|
25
|
+
document.querySelector(".main-container").innerHTML = html;
|
|
26
|
+
import blockjs from "./counter-display.js";
|
|
27
|
+
blockjs();
|
|
28
|
+
</script>
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@total_onion/onion-library",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.255",
|
|
4
4
|
"description": "Component library",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@total_onion/onion-modalcontroller": "^1.0.5",
|
|
22
22
|
"@total_onion/onion-utils": "^1.0.10",
|
|
23
|
-
"@total_onion/onion-videocontroller": "^1.1.
|
|
23
|
+
"@total_onion/onion-videocontroller": "^1.1.8",
|
|
24
24
|
"autoprefixer": "^10.4.21",
|
|
25
25
|
"compressing": "^2.0.0",
|
|
26
26
|
"cpy": "^9.0.1",
|