Version Description
Download this release
Release Info
Developer | creativethemeshq |
Plugin | Blocksy Companion |
Version | 1.8.8.6 |
Comparing to | |
See all releases |
Code changes from version 1.8.8.5 to 1.8.8.6
- blocksy-companion.php +1 -1
- framework/extensions/cookies-consent/static/bundle/main.min.css +1 -1
- framework/extensions/newsletter-subscribe/static/bundle/main.min.css +1 -1
- framework/extensions/product-reviews/extension.php +18 -2
- framework/extensions/product-reviews/metabox.php +43 -2
- framework/extensions/product-reviews/static/bundle/main-admin.min.css +1 -1
- framework/extensions/product-reviews/static/bundle/main.min.css +2 -2
- framework/extensions/product-reviews/static/sass/scores.scss +2 -1
- framework/extensions/product-reviews/static/sass/title.scss +1 -1
- framework/extensions/trending/static/bundle/main.min.css +1 -1
- framework/extensions/widgets/static/bundle/main.min.css +1 -1
- framework/extensions/widgets/widgets/ct-socials/view.php +1 -1
- readme.txt +4 -1
- static/bundle/dashboard.min.css +1 -1
- static/bundle/options.min.css +1 -1
- static/bundle/sticky.js +1 -1
- static/js/frontend/sticky.js +2 -4
blocksy-companion.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Blocksy Companion
|
5 |
Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
|
6 |
-
Version: 1.8.8.
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blc
|
3 |
/*
|
4 |
Plugin Name: Blocksy Companion
|
5 |
Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
|
6 |
+
Version: 1.8.8.6
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blc
|
framework/extensions/cookies-consent/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/newsletter-subscribe/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/extension.php
CHANGED
@@ -11,7 +11,23 @@ class BlocksyExtensionProductReviews {
|
|
11 |
return;
|
12 |
}
|
13 |
|
14 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
if (! $maybe_schema) {
|
17 |
return;
|
@@ -419,7 +435,7 @@ class BlocksyExtensionProductReviews {
|
|
419 |
sprintf(
|
420 |
// Translators: %s is the theme name.
|
421 |
__( '%s Settings', 'blc' ),
|
422 |
-
__( '
|
423 |
),
|
424 |
function ($post) {
|
425 |
$values = get_post_meta($post->ID, 'blocksy_product_review_options');
|
11 |
return;
|
12 |
}
|
13 |
|
14 |
+
$atts = apply_filters(
|
15 |
+
'blocksy:ext:product-reviews:frontend:atts',
|
16 |
+
blocksy_get_post_options(null, [
|
17 |
+
'meta_id' => 'blocksy_product_review_options'
|
18 |
+
]),
|
19 |
+
get_the_ID()
|
20 |
+
);
|
21 |
+
|
22 |
+
$maybe_schema = blocksy_schema_org_definitions('itemReviewed', [
|
23 |
+
'to_merge' => [
|
24 |
+
'itemtype' => "https://schema.org/" . blocksy_akg(
|
25 |
+
'product_review_entity',
|
26 |
+
$atts,
|
27 |
+
'Thing'
|
28 |
+
)
|
29 |
+
]
|
30 |
+
]);
|
31 |
|
32 |
if (! $maybe_schema) {
|
33 |
return;
|
435 |
sprintf(
|
436 |
// Translators: %s is the theme name.
|
437 |
__( '%s Settings', 'blc' ),
|
438 |
+
__( 'Blocksy', 'blc' )
|
439 |
),
|
440 |
function ($post) {
|
441 |
$values = get_post_meta($post->ID, 'blocksy_product_review_options');
|
framework/extensions/product-reviews/metabox.php
CHANGED
@@ -6,6 +6,47 @@ $options = [
|
|
6 |
'title' => __( 'General', 'blc' ),
|
7 |
'type' => 'tab',
|
8 |
'options' => [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
'gallery' => [
|
11 |
'type' => 'ct-multi-image-uploader',
|
@@ -77,10 +118,10 @@ $options = [
|
|
77 |
|
78 |
'product_description' => [
|
79 |
'type' => 'wp-editor',
|
80 |
-
'label' => __('
|
81 |
'value' => '',
|
82 |
'design' => 'inline',
|
83 |
-
]
|
84 |
|
85 |
],
|
86 |
],
|
6 |
'title' => __( 'General', 'blc' ),
|
7 |
'type' => 'tab',
|
8 |
'options' => [
|
9 |
+
'product_review_entity' => [
|
10 |
+
'label' => __( 'Review Entity', 'blc' ),
|
11 |
+
'type' => 'ct-select',
|
12 |
+
'value' => 'Thing',
|
13 |
+
'view' => 'text',
|
14 |
+
'design' => 'inline',
|
15 |
+
'choices' => blocksy_ordered_keys(
|
16 |
+
[
|
17 |
+
'Thing' => __( 'Default', 'blc' ),
|
18 |
+
'Book' => __( 'Book', 'blc' ),
|
19 |
+
// 'Course' => __( 'Course', 'blc' ),
|
20 |
+
'CreativeWorkSeason' => __( 'Creative Work Season', 'blc' ),
|
21 |
+
'CreativeWorkSeries' => __( 'Creative Work Series', 'blc' ),
|
22 |
+
'Episode' => __( 'Episode', 'blc' ),
|
23 |
+
// 'Event' => __( 'Event', 'blc' ),
|
24 |
+
'Game' => __( 'Game', 'blc' ),
|
25 |
+
// 'HowTo' => __( 'How To', 'blc' ),
|
26 |
+
'LocalBusiness' => __( 'Local Business', 'blc' ),
|
27 |
+
'MediaObject' => __( 'Media Object', 'blc' ),
|
28 |
+
'Movie' => __( 'Movie', 'blc' ),
|
29 |
+
'MusicPlaylist' => __( 'Music Playlist', 'blc' ),
|
30 |
+
'MusicRecording' => __( 'Music Recording', 'blc' ),
|
31 |
+
'Organization' => __( 'Organization', 'blc' ),
|
32 |
+
// 'Product' => __( 'Product', 'blc' ),
|
33 |
+
// 'Recipe' => __( 'Recipe', 'blc' ),
|
34 |
+
// 'SoftwareApplication' => __( 'Software Application', 'blc' ),
|
35 |
+
]
|
36 |
+
),
|
37 |
+
'desc' => sprintf(
|
38 |
+
__(
|
39 |
+
'More info about review entity and how to choose the right one can be found %shere%s.',
|
40 |
+
'blc'
|
41 |
+
),
|
42 |
+
'<a href="https://developers.google.com/search/blog/2019/09/making-review-rich-results-more-helpful" target="_blank">',
|
43 |
+
'</a>'
|
44 |
+
),
|
45 |
+
],
|
46 |
+
|
47 |
+
blocksy_rand_md5() => [
|
48 |
+
'type' => 'ct-divider',
|
49 |
+
],
|
50 |
|
51 |
'gallery' => [
|
52 |
'type' => 'ct-multi-image-uploader',
|
118 |
|
119 |
'product_description' => [
|
120 |
'type' => 'wp-editor',
|
121 |
+
'label' => __('Short Description', 'blc'),
|
122 |
'value' => '',
|
123 |
'design' => 'inline',
|
124 |
+
],
|
125 |
|
126 |
],
|
127 |
],
|
framework/extensions/product-reviews/static/bundle/main-admin.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/static/bundle/main.min.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
-
.ct-product-hero .flexy-container{overflow:hidden}@media (max-width: 999.98px){.ct-product-hero .flexy-pills{--thumbs-spacing: 10px}}@media (min-width: 1000px){.ct-product-hero .flexy-pills{max-width:70%;margin:-8% auto 0 auto;--thumbs-spacing: 20px}}.ct-product-hero .flexy-pills ol{margin:0 calc(var(--thumbs-spacing) * -1)}.ct-product-hero .flexy-pills li{padding-top:var(--thumbs-spacing);padding-left:var(--thumbs-spacing);padding-right:var(--thumbs-spacing)}.ct-product-hero .flexy-pills li img{width:100%;border-radius:3px;border-radius:2px;border:3px solid #fff}.ct-product-hero .hero-section{margin-top:var(--margin-bottom, 40px)}.ct-product-scores{display:grid;grid-column-gap:25px;grid-row-gap:25px;margin:0 auto;max-width:var(--product-scores-width, 800px)}@media (min-width: 690px){.ct-product-scores{grid-template-columns:2fr 1fr}}.ct-product-scores:not(:last-child){margin-bottom:60px}.ct-product-scores li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:10px 20px;background:rgba(243,243,243,0.5);border-radius:2px}.ct-product-scores li:hover{background:#f3f3f3}.ct-product-scores li>span{font-size:15px;font-weight:500}.ct-overall-score{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;color:var(--overall-score-text-color, #fff);border-radius:2px;background:var(--overall-score-box-background, #1A202C)}.ct-overall-score .ct-average-score{font-size:55px;font-weight:800;line-height:normal;margin-bottom:10px}.ct-overall-score .ct-score-label{font-size:15px;font-weight:700;text-transform:uppercase;letter-spacing:0.02em;margin:15px 0 0 0}.ct-overall-score-layer{display:flex;flex-wrap:wrap;align-items:center}.ct-overall-score-layer .ct-score-label,.ct-overall-score-layer .ct-average-score{font-size:14px;font-weight:600}.ct-overall-score-layer .ct-average-score{margin:0 5px}.ct-overall-score-layer .star-rating{margin
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
+
.ct-product-hero .flexy-container{overflow:hidden}@media (max-width: 999.98px){.ct-product-hero .flexy-pills{--thumbs-spacing: 10px}}@media (min-width: 1000px){.ct-product-hero .flexy-pills{max-width:70%;margin:-8% auto 0 auto;--thumbs-spacing: 20px}}.ct-product-hero .flexy-pills ol{margin:0 calc(var(--thumbs-spacing) * -1)}.ct-product-hero .flexy-pills li{padding-top:var(--thumbs-spacing);padding-left:var(--thumbs-spacing);padding-right:var(--thumbs-spacing)}.ct-product-hero .flexy-pills li img{width:100%;border-radius:3px;border-radius:2px;border:3px solid #fff}.ct-product-hero .flexy-container+.hero-section{margin-top:var(--margin-bottom, 40px)}.ct-product-scores{display:grid;grid-column-gap:25px;grid-row-gap:25px;margin:0 auto;max-width:var(--product-scores-width, 800px)}@media (min-width: 690px){.ct-product-scores{grid-template-columns:2fr 1fr}}.ct-product-scores:not(:last-child){margin-bottom:60px}.ct-product-scores li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:10px 20px;background:rgba(243,243,243,0.5);border-radius:2px}.ct-product-scores li:hover{background:#f3f3f3}.ct-product-scores li>span{font-size:15px;font-weight:500}.ct-overall-score{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;color:var(--overall-score-text-color, #fff);border-radius:2px;background:var(--overall-score-box-background, #1A202C)}.ct-overall-score .ct-average-score{font-size:55px;font-weight:800;line-height:normal;margin-bottom:10px}.ct-overall-score .ct-score-label{font-size:15px;font-weight:700;text-transform:uppercase;letter-spacing:0.02em;margin:15px 0 0 0}.ct-overall-score-layer{display:flex;flex-wrap:wrap;align-items:center}.ct-overall-score-layer .ct-score-label,.ct-overall-score-layer .ct-average-score{font-size:14px;font-weight:600}.ct-overall-score-layer .ct-average-score{margin:0 5px;-webkit-margin-end:auto;margin-inline-end:auto}.ct-overall-score-layer .star-rating{margin:3px 0}.ct-product-actions-group{display:flex;align-items:center;justify-content:center}.ct-product-actions-group:not(:last-child){margin-bottom:60px}.ct-product-actions-group .ct-button:not(:last-child){-webkit-margin-end:25px;margin-inline-end:25px}.ct-product-actions-group .ct-icon-container{color:inherit;-webkit-margin-start:10px;margin-inline-start:10px}.ct-product-description:not(:last-child){margin-bottom:60px}.ct-product-info{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:40px;grid-row-gap:40px;border-top:1px solid #ececec;padding-top:var(--content-vertical-spacing, 60px)}@media (min-width: 1000px){.ct-product-info{--grid-template-columns: 1.5fr 1fr 1fr}}@media (min-width: 690px) and (max-width: 999.98px){.ct-product-info{--grid-template-columns: 1fr 1fr}}.ct-product-info li{position:relative;-webkit-padding-start:22px;padding-inline-start:22px}.ct-product-info .ct-icon-container{position:absolute;left:0;top:0.4em;opacity:0.8;--icon-size: 13px}@media (min-width: 690px) and (max-width: 999.98px){.ct-specs{grid-column:1/-1}}.ct-specs ul{display:grid;grid-column-gap:40px}@media (min-width: 690px){.ct-specs ul{grid-template-columns:repeat(2, 1fr)}}.ct-product-hero{padding-top:var(--content-vertical-spacing, 60px)}.ct-product-hero .ct-container{padding-bottom:var(--content-vertical-spacing, 60px);border-bottom:1px solid #ececec}.ct-product-hero ul{--listIndent: 0;--listStyleType: none;--contentSpacing: 0}
|
framework/extensions/product-reviews/static/sass/scores.scss
CHANGED
@@ -75,9 +75,10 @@
|
|
75 |
|
76 |
.ct-average-score {
|
77 |
margin: 0 5px;
|
|
|
78 |
}
|
79 |
|
80 |
.star-rating {
|
81 |
-
margin
|
82 |
}
|
83 |
}
|
75 |
|
76 |
.ct-average-score {
|
77 |
margin: 0 5px;
|
78 |
+
margin-inline-end: auto;
|
79 |
}
|
80 |
|
81 |
.star-rating {
|
82 |
+
margin: 3px 0;
|
83 |
}
|
84 |
}
|
framework/extensions/product-reviews/static/sass/title.scss
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
.ct-product-hero {
|
2 |
|
3 |
-
.hero-section {
|
4 |
margin-top: var(--margin-bottom, 40px);
|
5 |
}
|
6 |
}
|
1 |
.ct-product-hero {
|
2 |
|
3 |
+
.flexy-container + .hero-section {
|
4 |
margin-top: var(--margin-bottom, 40px);
|
5 |
}
|
6 |
}
|
framework/extensions/trending/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/widgets/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/widgets/widgets/ct-socials/view.php
CHANGED
@@ -30,7 +30,7 @@ $link_rel = blocksy_default_akg('link_nofollow', $atts, 'no');
|
|
30 |
if ($link_rel === 'yes') {
|
31 |
$link_rel = 'noopener noreferrer nofollow';
|
32 |
} else {
|
33 |
-
$link_rel =
|
34 |
}
|
35 |
|
36 |
/**
|
30 |
if ($link_rel === 'yes') {
|
31 |
$link_rel = 'noopener noreferrer nofollow';
|
32 |
} else {
|
33 |
+
$link_rel = 'noopener';
|
34 |
}
|
35 |
|
36 |
/**
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
|
|
5 |
Tested up to: 5.8
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
Stable tag: 1.8.8.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -23,6 +23,9 @@ It runs and adds its enhancements only if the Blocksy theme is installed and act
|
|
23 |
2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
|
24 |
|
25 |
== Changelog ==
|
|
|
|
|
|
|
26 |
1.8.8.5: 2021-09-07
|
27 |
- Improvement: Product reviews extension schema org markup
|
28 |
|
5 |
Tested up to: 5.8
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
+
Stable tag: 1.8.8.6
|
9 |
|
10 |
== Description ==
|
11 |
|
23 |
2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
|
24 |
|
25 |
== Changelog ==
|
26 |
+
1.8.8.6: 2021-09-09
|
27 |
+
- New: Product reviews extension add Review Entity option
|
28 |
+
|
29 |
1.8.8.5: 2021-09-07
|
30 |
- Improvement: Product reviews extension schema org markup
|
31 |
|
static/bundle/dashboard.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
static/bundle/options.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.8.6
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
static/bundle/sticky.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){t.exports=window.ctFrontend},function(t,e){t.exports=window.ctEvents},function(t,e,r){"use strict";r.r(e);r(1);var n=r(0),o=function(t,e,r){return Math.max(t,Math.min(e,r))},i=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},a=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=getComputedStyle(t),r=getComputedStyle(t.firstElementChild),n=0;n+=parseFloat(e.borderTopWidth),n+=parseFloat(e.borderBottomWidth),n+=parseFloat(r.borderTopWidth),n+=parseFloat(r.borderBottomWidth);var o=parseFloat(e.getPropertyValue("--height"))+n;return t.blcInitialHeight=o,o},c=function(t){var e=getComputedStyle(t).getPropertyValue("--stickyShrink");return e?parseFloat(e)/100*a(t):a(t)};function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var l=function(t){var e=t.stickyContainer,r=t.isSticky,n=t.startPosition,u=t.stickyComponents,d=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0);if(0===n&&0===window.scrollY&&(e.dataset.sticky=["fixed"].concat(y(u)).join(":"),e.parentNode.style.setProperty("--minHeight","".concat(d,"px"))),r){if(u.indexOf("yes")>-1)return;k(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(d,"px")),e.dataset.sticky=["yes"].concat(y(u)).join(":"),function(t){var e=t.stickyContainer,r=t.startPosition;s(e.querySelectorAll('[data-row*="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=parseFloat(getComputedStyle(e).getPropertyValue("--maxHeight")||50),s=parseFloat(getComputedStyle(e).getPropertyValue("--logoStickyShrink").toString().replace(",",".")||1),u=n*s;if(1!==s){var y=a(t),d=c(t);e.style.setProperty("--logo-shrink-height",i([r,r+Math.abs(y===d?n-u:y-d)],[1,s],o(r,r+Math.abs(y===d?n-u:y-d),scrollY)))}}}))}({stickyContainer:e,startPosition:n}),function(t){var e=t.stickyContainer,r=t.containerInitialHeight,n=t.startPosition;Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e,r){return t+c(e)}),0)!==r&&e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=a(t),r=c(t);e!==r&&t.style.setProperty("--shrinkHeight","".concat(i([n,n+Math.abs(e-r)],[e,r],o(n,n+Math.abs(e-r),scrollY)),"px"))}))}({stickyContainer:e,containerInitialHeight:d,startPosition:n}),document.body.style.setProperty("--headerStickyHeightAnimated","".concat(parseInt(e.getBoundingClientRect().height),"px"))}else{var l=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+a(e)}),0);document.body.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(e.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),k(e,"yes"),e.parentNode.style.setProperty("--minHeight","".concat(l,"px")),0===n&&0===window.scrollY?e.dataset.sticky=["fixed"].concat(y(u)).join(":"):(e.parentNode.removeAttribute("style"),e.dataset.sticky=u.join(":"))}};function f(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p=window.scrollY;function h(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function g(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},S=null,v=function t(){if(S!==scrollY){S=scrollY;var e=document.querySelector('[data-device="'.concat(Object(n.getCurrentScreen)(),'"] [data-sticky]'));if(e){var r=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.parentNode;return 1===e.parentNode.children.length||e.parentNode.children[0].classList.contains("ct-sticky-container")?0:Array.from(e.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(g(t),[0]):[].concat(g(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),0)}(e),o=r>0&&Math.abs(window.scrollY-r)<5||window.scrollY>r;o&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!o&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""));var i=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t}));i.indexOf("shrink")>-1&&l({stickyContainer:e,isSticky:o,startPosition:r,stickyComponents:i}),i.indexOf("auto-hide")>-1&&function(t){var e=t.startPosition,r=t.stickyContainer,n=t.isSticky,o=t.stickyComponents,i=Array.from(r.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0);if(window.scrollY<e&&(p=window.scrollY),n&&window.scrollY-p==0&&document.body.style.setProperty("--headerStickyHeightAnimated","0px"),n&&window.scrollY-p<-5)-1===r.dataset.sticky.indexOf("yes")&&(r.dataset.sticky=["yes-start"].concat(f(o)).join(":"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-end","yes")}),200)}))),k(r,"no"),document.body.removeAttribute("style"),r.parentNode.style.setProperty("--minHeight","".concat(i,"px"));else{if(!n)return r.dataset.sticky=o.filter((function(t){return"yes-end"!==t})).join(":"),r.parentNode.removeAttribute("style"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),k(r,"yes"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),void(p=window.scrollY);-1===r.dataset.sticky.indexOf("yes-hide")&&r.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-p>5&&(r.dataset.sticky=["yes-hide-start"].concat(f(o)).join(":"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){r.dataset.sticky=o.join(":"),r.parentNode.removeAttribute("style"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),k(r,"yes")}),200)})))}p=window.scrollY}({stickyContainer:e,isSticky:o,startPosition:r,stickyComponents:i}),(i.indexOf("slide")>-1||i.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,r=t.isSticky,n=t.startPosition,o=t.stickyComponents,i=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0);r?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(h(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),k(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(i,"px"))):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=o.join(":"),setTimeout((function(){e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),k(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(h(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=o.join(":"),setTimeout((function(){e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),k(e,"yes")}),200)}))))}({stickyContainer:e,isSticky:o,startPosition:r,stickyComponents:i}),requestAnimationFrame((function(){t()}))}}else requestAnimationFrame((function(){t()}))};document.querySelector("header [data-sticky]")&&v(),Object(n.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}]);
|
1 |
+
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){t.exports=window.ctFrontend},function(t,e){t.exports=window.ctEvents},function(t,e,r){"use strict";r.r(e);r(1);var n=r(0),o=function(t,e,r){return Math.max(t,Math.min(e,r))},i=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},a=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=getComputedStyle(t),r=getComputedStyle(t.firstElementChild),n=0;n+=parseFloat(e.borderTopWidth),n+=parseFloat(e.borderBottomWidth),n+=parseFloat(r.borderTopWidth),n+=parseFloat(r.borderBottomWidth);var o=parseFloat(e.getPropertyValue("--height"))+n;return t.blcInitialHeight=o,o},c=function(t){var e=getComputedStyle(t).getPropertyValue("--stickyShrink");return e?parseFloat(e)/100*a(t):a(t)};function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var d=function(t){var e=t.stickyContainer,r=t.isSticky,n=t.startPosition,u=t.stickyComponents,y=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0);if(0===n&&0===window.scrollY&&(e.dataset.sticky=["fixed"].concat(l(u)).join(":"),e.parentNode.style.setProperty("--minHeight","".concat(y,"px"))),r){if(u.indexOf("yes")>-1)return;k(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(y,"px")),e.dataset.sticky=["yes"].concat(l(u)).join(":"),function(t){var e=t.stickyContainer,r=t.startPosition;s(e.querySelectorAll('[data-row*="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=parseFloat(getComputedStyle(e).getPropertyValue("--maxHeight")||50),s=parseFloat(getComputedStyle(e).getPropertyValue("--logoStickyShrink").toString().replace(",",".")||1),u=n*s;if(1!==s){var l=a(t),y=c(t);e.style.setProperty("--logo-shrink-height",i([r,r+Math.abs(l===y?n-u:l-y)],[1,s],o(r,r+Math.abs(l===y?n-u:l-y),scrollY)))}}}))}({stickyContainer:e,startPosition:n}),function(t){var e=t.stickyContainer,r=t.containerInitialHeight,n=t.startPosition;Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e,r){return t+c(e)}),0)!==r&&e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=a(t),r=c(t);e!==r&&t.style.setProperty("--shrinkHeight","".concat(i([n,n+Math.abs(e-r)],[e,r],o(n,n+Math.abs(e-r),scrollY)),"px"))}))}({stickyContainer:e,containerInitialHeight:y,startPosition:n}),document.body.style.setProperty("--headerStickyHeightAnimated","".concat(parseInt(e.getBoundingClientRect().height),"px"))}else{var d=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+a(e)}),0);document.body.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(e.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),k(e,"yes"),e.parentNode.style.setProperty("--minHeight","".concat(d,"px")),0===n&&0===window.scrollY?e.dataset.sticky=["fixed"].concat(l(u)).join(":"):(e.parentNode.removeAttribute("style"),e.dataset.sticky=u.join(":"))}};function f(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p=window.scrollY;function h(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function g(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},S=null,v=function t(){if(S!==scrollY){S=scrollY;var e=document.querySelector('[data-device="'.concat(Object(n.getCurrentScreen)(),'"] [data-sticky]'));if(e){var r=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.closest("header").getBoundingClientRect().top+scrollY,r=t.parentNode;return 1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container")?e:Array.from(r.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(g(t),[0]):[].concat(g(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e)}(e),o=r>0&&Math.abs(window.scrollY-r)<5||window.scrollY>r;o&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!o&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""));var i=e.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t}));i.indexOf("shrink")>-1&&d({stickyContainer:e,isSticky:o,startPosition:r,stickyComponents:i}),i.indexOf("auto-hide")>-1&&function(t){var e=t.startPosition,r=t.stickyContainer,n=t.isSticky,o=t.stickyComponents,i=Array.from(r.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0);if(window.scrollY<e&&(p=window.scrollY),n&&window.scrollY-p==0&&document.body.style.setProperty("--headerStickyHeightAnimated","0px"),n&&window.scrollY-p<-5)-1===r.dataset.sticky.indexOf("yes")&&(r.dataset.sticky=["yes-start"].concat(f(o)).join(":"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-end","yes")}),200)}))),k(r,"no"),document.body.removeAttribute("style"),r.parentNode.style.setProperty("--minHeight","".concat(i,"px"));else{if(!n)return r.dataset.sticky=o.filter((function(t){return"yes-end"!==t})).join(":"),r.parentNode.removeAttribute("style"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),k(r,"yes"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),void(p=window.scrollY);-1===r.dataset.sticky.indexOf("yes-hide")&&r.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-p>5&&(r.dataset.sticky=["yes-hide-start"].concat(f(o)).join(":"),document.body.style.setProperty("--headerStickyHeightAnimated","0px"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){r.dataset.sticky=o.join(":"),r.parentNode.removeAttribute("style"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),k(r,"yes")}),200)})))}p=window.scrollY}({stickyContainer:e,isSticky:o,startPosition:r,stickyComponents:i}),(i.indexOf("slide")>-1||i.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,r=t.isSticky,n=t.startPosition,o=t.stickyComponents,i=Array.from(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0);r?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(h(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}))),k(e,"no"),e.parentNode.style.setProperty("--minHeight","".concat(i,"px"))):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=o.join(":"),setTimeout((function(){e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),k(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(h(o)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=o.join(":"),setTimeout((function(){e.parentNode.removeAttribute("style"),Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),k(e,"yes")}),200)}))))}({stickyContainer:e,isSticky:o,startPosition:r,stickyComponents:i}),requestAnimationFrame((function(){t()}))}}else requestAnimationFrame((function(){t()}))};document.querySelector("header [data-sticky]")&&v(),Object(n.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}]);
|
static/js/frontend/sticky.js
CHANGED
@@ -21,10 +21,8 @@ const getStartPositionFor = (stickyContainer) => {
|
|
21 |
return stickyContainer.parentNode.getBoundingClientRect().height + 200
|
22 |
}
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
// scrollY
|
27 |
-
const stickyOffset = 0
|
28 |
|
29 |
const row = stickyContainer.parentNode
|
30 |
|
21 |
return stickyContainer.parentNode.getBoundingClientRect().height + 200
|
22 |
}
|
23 |
|
24 |
+
const stickyOffset =
|
25 |
+
stickyContainer.closest('header').getBoundingClientRect().top + scrollY
|
|
|
|
|
26 |
|
27 |
const row = stickyContainer.parentNode
|
28 |
|