@caweb/framework 1.9.5 → 1.9.7
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/build/delta.asset.php +1 -1
- package/build/delta.js +1 -1
- package/build/eureka.asset.php +1 -1
- package/build/eureka.js +1 -1
- package/build/mono.asset.php +1 -1
- package/build/mono.js +1 -1
- package/build/oceanside.asset.php +1 -1
- package/build/oceanside.js +1 -1
- package/build/orangecounty.asset.php +1 -1
- package/build/orangecounty.js +1 -1
- package/build/pasorobles.asset.php +1 -1
- package/build/pasorobles.js +1 -1
- package/build/sacramento.asset.php +1 -1
- package/build/sacramento.js +1 -1
- package/build/santabarbara.asset.php +1 -1
- package/build/santabarbara.js +1 -1
- package/build/santacruz.asset.php +1 -1
- package/build/santacruz.js +1 -1
- package/build/shasta.asset.php +1 -1
- package/build/shasta.js +1 -1
- package/build/sierra.asset.php +1 -1
- package/build/sierra.js +1 -1
- package/build/trinity.asset.php +1 -1
- package/build/trinity.js +1 -1
- package/package.json +1 -1
- package/src/scripts/components/header.js +28 -14
package/build/delta.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '08c3b84f79cf22ad52e0');
|
package/build/delta.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
package/build/eureka.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '59577dbf33c239360ff6');
|
package/build/eureka.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
package/build/mono.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '749fb9ca88b310fc5808');
|
package/build/mono.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => 'facf1679643c43bef391');
|
package/build/oceanside.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '4966fcebe5c624012423');
|
package/build/orangecounty.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '2313f6a8a387984fec4d');
|
package/build/pasorobles.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '8a7cdd00cc8a6cb526bb');
|
package/build/sacramento.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '1eea98344491bd6397d3');
|
package/build/santabarbara.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '7e05e0670700dd32b37a');
|
package/build/santacruz.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
package/build/shasta.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '7ac303d0448cd57e2ebc');
|
package/build/shasta.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
package/build/sierra.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '024ed79f9a5840628291');
|
package/build/sierra.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
package/build/trinity.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '5408553fe1746433cc1f');
|
package/build/trinity.js
CHANGED
|
@@ -36,7 +36,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\n\n/* EXTERNAL L
|
|
|
36
36
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
37
37
|
|
|
38
38
|
"use strict";
|
|
39
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n
|
|
39
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n//@ts-check\nwindow.addEventListener('DOMContentLoaded', () => {\n let location_hash = window.location.hash.replace(/(\\|)/g, \"\\\\$1\");\n const header = document.querySelector('header');\n const pageContainer = document.querySelector('#page-container');\n\n // array of elements that are compacted\n const compactedElements = [document.querySelector('.alerts'), document.querySelector('.utility-header')].filter(Boolean);\n const getCompactedElementsHeight = () => {\n return compactedElements.reduce((total, element) => {\n if (element instanceof HTMLElement) {\n return total + element.clientHeight;\n }\n return total;\n }, 0);\n };\n let compactedElementsHeight = getCompactedElementsHeight();\n\n // lets collect the height of any fixed elements above the header.\n let topOffset = 0;\n let current = header?.previousElementSibling;\n while (current) {\n // if current element has a fixed position, add its height to the topOffset.\n if (current instanceof HTMLElement && window.getComputedStyle(current).position === 'fixed') {\n topOffset += current.clientHeight;\n }\n current = current.previousElementSibling;\n }\n\n // scroll to target\n if (location_hash) {\n // location hash has leading #, so we remove it\n let target = document.getElementById(location_hash.substring(1));\n\n // if the location hash is not empty, we scroll to the target element\n requestAnimationFrame(() => {\n target?.scrollIntoView({\n behavior: 'smooth'\n });\n });\n }\n if (!header) {\n return;\n }\n const compactHeader = () => {\n // downscroll code passed the header height\n if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {\n // move the header up to hide the compacted elements height, minus the top offset.\n header.style.top = `-${compactedElementsHeight - topOffset}px`;\n } else {\n // reset header to initial position\n // we need to set the header's top to the offset.\n if (header) {\n header.style.top = `${topOffset}px`;\n }\n\n // if we have a page container, we need to set its top padding to the offset\n if (pageContainer && pageContainer instanceof HTMLElement) {\n pageContainer.style.paddingTop = `${topOffset}px`;\n }\n }\n };\n\n // we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.\n document.querySelectorAll('header .alerts [data-bs-dismiss=\"alert\"]').forEach(closeButton => {\n closeButton.addEventListener('click', () => {\n compactedElementsHeight = getCompactedElementsHeight();\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n });\n });\n\n // for each element with an id we add the scroll-margin-top\n const updateScrollMarginTop = (/** @type Element */element) => {\n if (element instanceof HTMLElement) {\n let scrollMarginHeight = header.clientHeight + topOffset;\n\n // if the elements offsetTop is greater than twice the header size, \n // we can assume the header is compacted\n // so we need to subtract the compacted elements height from the scroll margin.\n if (element.offsetTop > scrollMarginHeight + scrollMarginHeight / 2) {\n scrollMarginHeight -= compactedElementsHeight;\n }\n element.style.scrollMarginTop = `${scrollMarginHeight}px`;\n }\n };\n\n // add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.\n document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);\n\n // reset position on scroll\n window.addEventListener('scroll', compactHeader);\n compactHeader();\n});\n\n//# sourceURL=webpack://@caweb/framework/./src/scripts/components/header.js?\n}");
|
|
40
40
|
|
|
41
41
|
/***/ },
|
|
42
42
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,8 @@ window.addEventListener('DOMContentLoaded', () => {
|
|
|
11
11
|
document.querySelector('.utility-header'),
|
|
12
12
|
].filter(Boolean);
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const getCompactedElementsHeight = () => {
|
|
15
|
+
return compactedElements.reduce((total, element) => {
|
|
15
16
|
if( element instanceof HTMLElement ){
|
|
16
17
|
return total + element.clientHeight;
|
|
17
18
|
}
|
|
@@ -19,6 +20,9 @@ window.addEventListener('DOMContentLoaded', () => {
|
|
|
19
20
|
return total;
|
|
20
21
|
|
|
21
22
|
}, 0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let compactedElementsHeight = getCompactedElementsHeight();
|
|
22
26
|
|
|
23
27
|
// lets collect the height of any fixed elements above the header.
|
|
24
28
|
let topOffset = 0;
|
|
@@ -52,7 +56,6 @@ window.addEventListener('DOMContentLoaded', () => {
|
|
|
52
56
|
|
|
53
57
|
|
|
54
58
|
const compactHeader = () => {
|
|
55
|
-
|
|
56
59
|
// downscroll code passed the header height
|
|
57
60
|
if (document.body.scrollTop >= header.offsetHeight ||
|
|
58
61
|
document.documentElement.scrollTop >= header.offsetHeight
|
|
@@ -76,21 +79,32 @@ window.addEventListener('DOMContentLoaded', () => {
|
|
|
76
79
|
|
|
77
80
|
};
|
|
78
81
|
|
|
82
|
+
// we need to update the compacted elements height if an alert is closed, so we listen for the alert close event and update the compacted elements height.
|
|
83
|
+
document.querySelectorAll('header .alerts [data-bs-dismiss="alert"]').forEach((closeButton) => {
|
|
84
|
+
closeButton.addEventListener('click', () => {
|
|
85
|
+
compactedElementsHeight = getCompactedElementsHeight();
|
|
86
|
+
document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
79
90
|
// for each element with an id we add the scroll-margin-top
|
|
80
|
-
|
|
91
|
+
const updateScrollMarginTop = (/** @type Element */ element) => {
|
|
81
92
|
if( element instanceof HTMLElement ){
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
let scrollMarginHeight = header.clientHeight + topOffset;
|
|
94
|
+
|
|
95
|
+
// if the elements offsetTop is greater than twice the header size,
|
|
96
|
+
// we can assume the header is compacted
|
|
97
|
+
// so we need to subtract the compacted elements height from the scroll margin.
|
|
98
|
+
if( element.offsetTop > scrollMarginHeight + (scrollMarginHeight / 2) ){
|
|
99
|
+
scrollMarginHeight -= compactedElementsHeight;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
element.style.scrollMarginTop = `${scrollMarginHeight}px`;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
90
105
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
});
|
|
106
|
+
// add scroll margin top to all elements with an id, so that when we scroll to them, they are not hidden behind the header.
|
|
107
|
+
document.querySelectorAll('#page-container [id]').forEach(updateScrollMarginTop);
|
|
94
108
|
|
|
95
109
|
// reset position on scroll
|
|
96
110
|
window.addEventListener(
|