@caweb/html-webpack-plugin 1.5.20 → 1.5.22

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.
Files changed (124) hide show
  1. package/README.md +1 -1
  2. package/build/delta-rtl.css +0 -1
  3. package/build/delta-rtl.min.css +1 -1
  4. package/build/delta.asset.php +1 -1
  5. package/build/delta.css +0 -1
  6. package/build/delta.css.map +1 -1
  7. package/build/delta.js +37 -9
  8. package/build/delta.js.map +1 -1
  9. package/build/delta.min.asset.php +1 -1
  10. package/build/delta.min.css +1 -1
  11. package/build/delta.min.js +1 -1
  12. package/build/eureka-rtl.css +0 -1
  13. package/build/eureka-rtl.min.css +1 -1
  14. package/build/eureka.asset.php +1 -1
  15. package/build/eureka.css +0 -1
  16. package/build/eureka.css.map +1 -1
  17. package/build/eureka.js +37 -9
  18. package/build/eureka.js.map +1 -1
  19. package/build/eureka.min.asset.php +1 -1
  20. package/build/eureka.min.css +1 -1
  21. package/build/eureka.min.js +1 -1
  22. package/build/mono-rtl.css +0 -1
  23. package/build/mono-rtl.min.css +1 -1
  24. package/build/mono.asset.php +1 -1
  25. package/build/mono.css +0 -1
  26. package/build/mono.css.map +1 -1
  27. package/build/mono.js +37 -9
  28. package/build/mono.js.map +1 -1
  29. package/build/mono.min.asset.php +1 -1
  30. package/build/mono.min.css +1 -1
  31. package/build/mono.min.js +1 -1
  32. package/build/oceanside-rtl.css +0 -1
  33. package/build/oceanside-rtl.min.css +1 -1
  34. package/build/oceanside.asset.php +1 -1
  35. package/build/oceanside.css +0 -1
  36. package/build/oceanside.css.map +1 -1
  37. package/build/oceanside.js +37 -9
  38. package/build/oceanside.js.map +1 -1
  39. package/build/oceanside.min.asset.php +1 -1
  40. package/build/oceanside.min.css +1 -1
  41. package/build/oceanside.min.js +1 -1
  42. package/build/orangecounty-rtl.css +0 -1
  43. package/build/orangecounty-rtl.min.css +1 -1
  44. package/build/orangecounty.asset.php +1 -1
  45. package/build/orangecounty.css +0 -1
  46. package/build/orangecounty.css.map +1 -1
  47. package/build/orangecounty.js +37 -9
  48. package/build/orangecounty.js.map +1 -1
  49. package/build/orangecounty.min.asset.php +1 -1
  50. package/build/orangecounty.min.css +1 -1
  51. package/build/orangecounty.min.js +1 -1
  52. package/build/pasorobles-rtl.css +0 -1
  53. package/build/pasorobles-rtl.min.css +1 -1
  54. package/build/pasorobles.asset.php +1 -1
  55. package/build/pasorobles.css +0 -1
  56. package/build/pasorobles.css.map +1 -1
  57. package/build/pasorobles.js +37 -9
  58. package/build/pasorobles.js.map +1 -1
  59. package/build/pasorobles.min.asset.php +1 -1
  60. package/build/pasorobles.min.css +1 -1
  61. package/build/pasorobles.min.js +1 -1
  62. package/build/sacramento-rtl.css +0 -1
  63. package/build/sacramento-rtl.min.css +1 -1
  64. package/build/sacramento.asset.php +1 -1
  65. package/build/sacramento.css +0 -1
  66. package/build/sacramento.css.map +1 -1
  67. package/build/sacramento.js +37 -9
  68. package/build/sacramento.js.map +1 -1
  69. package/build/sacramento.min.asset.php +1 -1
  70. package/build/sacramento.min.css +1 -1
  71. package/build/sacramento.min.js +1 -1
  72. package/build/santabarbara-rtl.css +0 -1
  73. package/build/santabarbara-rtl.min.css +1 -1
  74. package/build/santabarbara.asset.php +1 -1
  75. package/build/santabarbara.css +0 -1
  76. package/build/santabarbara.css.map +1 -1
  77. package/build/santabarbara.js +37 -9
  78. package/build/santabarbara.js.map +1 -1
  79. package/build/santabarbara.min.asset.php +1 -1
  80. package/build/santabarbara.min.css +1 -1
  81. package/build/santabarbara.min.js +1 -1
  82. package/build/santacruz-rtl.css +0 -1
  83. package/build/santacruz-rtl.min.css +1 -1
  84. package/build/santacruz.asset.php +1 -1
  85. package/build/santacruz.css +0 -1
  86. package/build/santacruz.css.map +1 -1
  87. package/build/santacruz.js +37 -9
  88. package/build/santacruz.js.map +1 -1
  89. package/build/santacruz.min.asset.php +1 -1
  90. package/build/santacruz.min.css +1 -1
  91. package/build/santacruz.min.js +1 -1
  92. package/build/shasta-rtl.css +0 -1
  93. package/build/shasta-rtl.min.css +1 -1
  94. package/build/shasta.asset.php +1 -1
  95. package/build/shasta.css +0 -1
  96. package/build/shasta.css.map +1 -1
  97. package/build/shasta.js +37 -9
  98. package/build/shasta.js.map +1 -1
  99. package/build/shasta.min.asset.php +1 -1
  100. package/build/shasta.min.css +1 -1
  101. package/build/shasta.min.js +1 -1
  102. package/build/sierra-rtl.css +0 -1
  103. package/build/sierra-rtl.min.css +1 -1
  104. package/build/sierra.asset.php +1 -1
  105. package/build/sierra.css +0 -1
  106. package/build/sierra.css.map +1 -1
  107. package/build/sierra.js +37 -9
  108. package/build/sierra.js.map +1 -1
  109. package/build/sierra.min.asset.php +1 -1
  110. package/build/sierra.min.css +1 -1
  111. package/build/sierra.min.js +1 -1
  112. package/build/trinity-rtl.css +0 -1
  113. package/build/trinity-rtl.min.css +1 -1
  114. package/build/trinity.asset.php +1 -1
  115. package/build/trinity.css +0 -1
  116. package/build/trinity.css.map +1 -1
  117. package/build/trinity.js +37 -9
  118. package/build/trinity.js.map +1 -1
  119. package/build/trinity.min.asset.php +1 -1
  120. package/build/trinity.min.css +1 -1
  121. package/build/trinity.min.js +1 -1
  122. package/helpers/logic/endsWith.js +1 -1
  123. package/index.js +4 -2
  124. package/package.json +4 -9
@@ -6365,22 +6365,50 @@ __webpack_require__.r(__webpack_exports__);
6365
6365
  //@ts-check
6366
6366
  window.addEventListener('load', () => {
6367
6367
  const header = document.querySelector('header');
6368
+ const pageContainer = document.querySelector('#page-container');
6368
6369
  const alerts = document.querySelector('.alerts');
6369
6370
  const utilityHeader = document.querySelector('.utility-header');
6370
- window.addEventListener('scroll', () => {
6371
+ const resetPosition = () => {
6371
6372
  if (!header) {
6372
6373
  return;
6373
6374
  }
6375
+ let scrollHeights = 0;
6376
+
6377
+ // lets collect the scroll height of any elements above the header.
6378
+ let current = header.previousElementSibling;
6379
+ let miscElementHeights = 0;
6380
+ while (current) {
6381
+ miscElementHeights += current.clientHeight;
6382
+ current = current.previousElementSibling;
6383
+ }
6384
+
6374
6385
  // downscroll code passed the header height
6375
6386
  if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {
6376
- var _alerts$scrollHeight, _utilityHeader$scroll;
6377
- // move the header up to the height of the alerts and utility if they exist,
6378
- // this will hide the alerts and utility header on scroll
6379
- header.style.top = `-${((_alerts$scrollHeight = alerts?.scrollHeight) !== null && _alerts$scrollHeight !== void 0 ? _alerts$scrollHeight : 0) + ((_utilityHeader$scroll = utilityHeader?.scrollHeight) !== null && _utilityHeader$scroll !== void 0 ? _utilityHeader$scroll : 0)}px`;
6387
+ // lets add the scroll heights of any alerts
6388
+ if (alerts) {
6389
+ scrollHeights += alerts.scrollHeight;
6390
+ }
6391
+
6392
+ // lets add the scroll heights of the utility header
6393
+ if (utilityHeader) {
6394
+ scrollHeights += utilityHeader.scrollHeight;
6395
+ }
6396
+
6397
+ // move the header up to the scroll height, minus any elements above the header
6398
+ header.style.top = `-${scrollHeights - miscElementHeights}px`;
6380
6399
  } else {
6381
- header.style.top = '0';
6400
+ header.style.top = `${miscElementHeights}px`; // reset header top position
6382
6401
  }
6383
- });
6402
+
6403
+ // we add the misc element heights to the page container as margin-top
6404
+ pageContainer?.setAttribute('style', `margin-top: ${miscElementHeights}px;`);
6405
+ };
6406
+
6407
+ // reset position on scroll
6408
+ window.addEventListener('scroll', resetPosition);
6409
+
6410
+ // reset position on load
6411
+ resetPosition();
6384
6412
  });
6385
6413
 
6386
6414
  /***/ }),
@@ -6657,8 +6685,8 @@ __webpack_require__.r(__webpack_exports__);
6657
6685
  /* harmony import */ var _components_mobile_controls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/mobile-controls.js */ "./src/scripts/components/mobile-controls.js");
6658
6686
  /* harmony import */ var _components_return_top_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/return-top.js */ "./src/scripts/components/return-top.js");
6659
6687
  /* harmony import */ var _components_external_link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/external-link.js */ "./src/scripts/components/external-link.js");
6660
- /* harmony import */ var _components_scroll_margin_top_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/scroll-margin-top.js */ "./src/scripts/components/scroll-margin-top.js");
6661
- /* harmony import */ var _components_header_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/header.js */ "./src/scripts/components/header.js");
6688
+ /* harmony import */ var _components_header_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/header.js */ "./src/scripts/components/header.js");
6689
+ /* harmony import */ var _components_scroll_margin_top_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/scroll-margin-top.js */ "./src/scripts/components/scroll-margin-top.js");
6662
6690
 
6663
6691
 
6664
6692