hr-design-system-handlebars 0.44.4 → 0.46.0

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 (68) hide show
  1. package/.storybook/preview.js +1 -1
  2. package/CHANGELOG.md +36 -0
  3. package/dist/assets/index.css +40 -49
  4. package/dist/views/components/base/load_dynamic.hbs +2 -2
  5. package/dist/views/components/page/page.hbs +1 -1
  6. package/dist/views/components/{Header/AnchorNavigation/AnchorNavigation.hbs → site_header/anchor_navigation/anchor_navigation.hbs} +0 -0
  7. package/dist/views/components/{Header/AnchorNavigation/FeatureBoxAnchor.hbs → site_header/anchor_navigation/featurebox_anchor.hbs} +0 -0
  8. package/{src/stories/views/components/Header/BrandNavigation/BrandNavigation.hbs → dist/views/components/site_header/brand_navigation/brand_navigation.hbs} +1 -1
  9. package/dist/views/components/{Header/BrandNavigation/BrandNavigationItem.hbs → site_header/brand_navigation/brand_navigation_item.hbs} +0 -0
  10. package/dist/views/components/{Header/Burger.hbs → site_header/burger.hbs} +2 -1
  11. package/dist/views/components/site_header/header.hbs +85 -0
  12. package/dist/views/components/site_header/header_alpine.js +255 -0
  13. package/dist/views/components/{Header/NavigationFlyout/NavigationFlyout.hbs → site_header/navigation_flyout/navigation_flyout.hbs} +2 -2
  14. package/dist/views/components/{Header/NavigationFlyout/NavigationFlyoutColumn.hbs → site_header/navigation_flyout/navigation_flyout_column.hbs} +1 -1
  15. package/dist/views/components/{Header/NavigationFlyout/NavigationFlyoutItem.hbs → site_header/navigation_flyout/navigation_flyout_item.hbs} +0 -0
  16. package/dist/views/components/{Header/Search/QuickSearchButton.hbs → site_header/navigation_search/quick_search_button.hbs} +0 -0
  17. package/dist/views/components/{Header/Search/QuickSearchForm.hbs → site_header/navigation_search/quick_search_form.hbs} +0 -0
  18. package/dist/views/components/{Header/SectionNavigation/SectionNavigation.hbs → site_header/section_navigation/section_navigation.hbs} +2 -2
  19. package/{src/stories/views/components/Header/SectionNavigation/SectionNavigationItem.hbs → dist/views/components/site_header/section_navigation/section_navigation_item.hbs} +2 -2
  20. package/dist/views/components/{Header/ServiceLogo.hbs → site_header/service_logo.hbs} +0 -0
  21. package/dist/views/components/{Header/ServiceNavigation/ServiceList.hbs → site_header/service_navigation/service_list.hbs} +1 -1
  22. package/dist/views/components/{Header/ServiceNavigation/ServiceNavigationItem.hbs → site_header/service_navigation/service_navigation_item.hbs} +1 -1
  23. package/dist/views/components/teaser/components/teaser_byline.hbs +28 -63
  24. package/package.json +1 -1
  25. package/src/assets/fixtures/teaser/{teaser_comment.json → teaser_comment.inc.json} +0 -0
  26. package/src/assets/fixtures/teaser/teaser_comments_without_teaserinfo.json +14 -0
  27. package/src/stories/views/components/base/load_dynamic.hbs +2 -2
  28. package/src/stories/views/components/page/page.hbs +1 -1
  29. package/src/stories/views/components/page/page.stories.mdx +4 -4
  30. package/src/stories/views/components/{Header/AnchorNavigation/AnchorNavigation.hbs → site_header/anchor_navigation/anchor_navigation.hbs} +0 -0
  31. package/src/stories/views/components/{Header/AnchorNavigation/FeatureBoxAnchor.hbs → site_header/anchor_navigation/featurebox_anchor.hbs} +0 -0
  32. package/src/stories/views/components/{Header → site_header}/brandNavigationData.json +0 -0
  33. package/{dist/views/components/Header/BrandNavigation/BrandNavigation.hbs → src/stories/views/components/site_header/brand_navigation/brand_navigation.hbs} +1 -1
  34. package/src/stories/views/components/{Header/BrandNavigation/BrandNavigation.stories.mdx → site_header/brand_navigation/brand_navigation.stories.mdx} +1 -1
  35. package/src/stories/views/components/{Header/BrandNavigation/BrandNavigationItem.hbs → site_header/brand_navigation/brand_navigation_item.hbs} +0 -0
  36. package/src/stories/views/components/{Header/BrandNavigation/BrandNavigationItem.stories.mdx → site_header/brand_navigation/brand_navigation_item.stories.mdx} +1 -1
  37. package/src/stories/views/components/{Header/Burger.hbs → site_header/burger.hbs} +2 -1
  38. package/src/stories/views/components/site_header/header.hbs +85 -0
  39. package/src/stories/views/components/{Header/Header.stories.mdx → site_header/header_.stories.mdx} +1 -1
  40. package/src/stories/views/components/site_header/header_alpine.js +255 -0
  41. package/src/stories/views/components/{Header → site_header}/navigation.json +0 -0
  42. package/src/stories/views/components/{Header → site_header}/navigation2.json +0 -0
  43. package/src/stories/views/components/{Header → site_header}/navigation3.json +0 -0
  44. package/src/stories/views/components/{Header → site_header}/navigation4.json +0 -0
  45. package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyout.hbs → site_header/navigation_flyout/navigation_flyout.hbs} +2 -2
  46. package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyout.stories.mdx → site_header/navigation_flyout/navigation_flyout.stories.mdx} +1 -1
  47. package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyoutColumn.hbs → site_header/navigation_flyout/navigation_flyout_column.hbs} +1 -1
  48. package/src/stories/views/components/{Header/NavigationFlyout/NavigationFlyoutItem.hbs → site_header/navigation_flyout/navigation_flyout_item.hbs} +0 -0
  49. package/src/stories/views/components/{Header/Search/QuickSearchButton.hbs → site_header/navigation_search/quick_search_button.hbs} +0 -0
  50. package/src/stories/views/components/{Header/Search/QuickSearchButton.stories.mdx → site_header/navigation_search/quick_search_button.stories.mdx} +1 -1
  51. package/src/stories/views/components/{Header/Search/QuickSearchForm.hbs → site_header/navigation_search/quick_search_form.hbs} +0 -0
  52. package/src/stories/views/components/{Header/Search/QuickSearchForm.stories.mdx → site_header/navigation_search/quick_search_form.stories.mdx} +1 -1
  53. package/src/stories/views/components/{Header → site_header}/sectionNavigationData.json +0 -0
  54. package/src/stories/views/components/{Header/SectionNavigation/SectionNavigation.hbs → site_header/section_navigation/section_navigation.hbs} +2 -2
  55. package/src/stories/views/components/{Header/SectionNavigation/SectionNavigation.stories.mdx → site_header/section_navigation/section_navigation.stories.mdx} +1 -1
  56. package/{dist/views/components/Header/SectionNavigation/SectionNavigationItem.hbs → src/stories/views/components/site_header/section_navigation/section_navigation_item.hbs} +2 -2
  57. package/src/stories/views/components/{Header/SectionNavigation/SectionNavigationItem.stories.mdx → site_header/section_navigation/section_navigation_item.stories.mdx} +1 -1
  58. package/src/stories/views/components/{Header → site_header}/serviceNavigationData.json +0 -0
  59. package/src/stories/views/components/{Header/ServiceLogo.hbs → site_header/service_logo.hbs} +0 -0
  60. package/src/stories/views/components/{Header/ServiceNavigation/ServiceList.hbs → site_header/service_navigation/service_list.hbs} +1 -1
  61. package/src/stories/views/components/{Header/ServiceNavigation/ServiceList.stories.mdx → site_header/service_navigation/service_list.stories.mdx} +1 -1
  62. package/src/stories/views/components/{Header/ServiceNavigation/ServiceNavigationItem.hbs → site_header/service_navigation/service_navigation_item.hbs} +1 -1
  63. package/src/stories/views/components/{Header/ServiceNavigation/ServiceNavigationItem.stories.mdx → site_header/service_navigation/service_navigation_item.stories.mdx} +1 -1
  64. package/src/stories/views/components/teaser/components/teaser_byline.hbs +28 -63
  65. package/src/stories/views/components/teaser/components/teaser_byline.stories.mdx +6 -9
  66. package/src/stories/views/components/teaser/fixtures/teaser_comments_without_teaserinfo.json +1 -0
  67. package/dist/views/components/Header/Header.hbs +0 -343
  68. package/src/stories/views/components/Header/Header.hbs +0 -343
@@ -8,7 +8,7 @@ import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
8
8
 
9
9
  import Initializer from '../build/webpack/feature-loader/initializer/initializer'
10
10
  import loadFeature from '../build/webpack/feature-loader/initializer/loader'
11
-
11
+ import 'components/site_header/header_alpine'
12
12
 
13
13
  function loadDelayedImages(){setTimeout((function(){var t,e=document.images,s=[],a=function(t){void 0!==window.picturefill&&window.picturefill({reevaluate:!0,elements:t})};for(var i=0;i<e.length;++i)(t=e[i].dataset?e[i].dataset.srcset:e[i].getAttribute("data-srcset"))&&(0===e[i].getBoundingClientRect().top?s.push(e[i]):e[i].setAttribute("srcset",t));a(e),setTimeout((function(){var t;for(var i=0;i<s.length;++i)t=s[i].dataset?s[i].dataset.srcset:s[i].getAttribute("data-srcset"),s[i].setAttribute("srcset",t);a(s)}),900)}),0)}
14
14
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ # v0.46.0 (Fri May 13 2022)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - renamed folders header and search to site_header and navigation_search [#233](https://github.com/mumprod/hr-design-system-handlebars/pull/233) ([@StefanVesper](https://github.com/StefanVesper))
6
+
7
+ #### Authors: 1
8
+
9
+ - SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
10
+
11
+ ---
12
+
13
+ # v0.45.1 (Fri May 13 2022)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - some refactoring [#232](https://github.com/mumprod/hr-design-system-handlebars/pull/232) ([@hanswurstsalat](https://github.com/hanswurstsalat))
18
+
19
+ #### Authors: 1
20
+
21
+ - Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
22
+
23
+ ---
24
+
25
+ # v0.45.0 (Thu May 12 2022)
26
+
27
+ #### 🚀 Enhancement
28
+
29
+ - Externalise script from header.hbs & renaming of header components [#231](https://github.com/mumprod/hr-design-system-handlebars/pull/231) ([@StefanVesper](https://github.com/StefanVesper))
30
+
31
+ #### Authors: 1
32
+
33
+ - SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
34
+
35
+ ---
36
+
1
37
  # v0.44.4 (Mon May 09 2022)
2
38
 
3
39
  #### 🐛 Bug Fix
@@ -1472,9 +1472,6 @@ Ensure the default browser behavior of the `hidden` attribute.
1472
1472
  white-space: nowrap;
1473
1473
  border-width: 0;
1474
1474
  }
1475
- .visible {
1476
- visibility: visible;
1477
- }
1478
1475
  .fixed {
1479
1476
  position: fixed;
1480
1477
  }
@@ -1557,6 +1554,9 @@ Ensure the default browser behavior of the `hidden` attribute.
1557
1554
  .\!mt-4 {
1558
1555
  margin-top: 1rem !important;
1559
1556
  }
1557
+ .ml-2 {
1558
+ margin-left: 0.5rem;
1559
+ }
1560
1560
  .-mt-2 {
1561
1561
  margin-top: -0.5rem;
1562
1562
  }
@@ -1569,9 +1569,6 @@ Ensure the default browser behavior of the `hidden` attribute.
1569
1569
  .-mt-10 {
1570
1570
  margin-top: -2.5rem;
1571
1571
  }
1572
- .ml-2 {
1573
- margin-left: 0.5rem;
1574
- }
1575
1572
  .mr-4 {
1576
1573
  margin-right: 1rem;
1577
1574
  }
@@ -1593,12 +1590,6 @@ Ensure the default browser behavior of the `hidden` attribute.
1593
1590
  .mt-2\.5 {
1594
1591
  margin-top: 0.625rem;
1595
1592
  }
1596
- .mr-2\.5 {
1597
- margin-right: 0.625rem;
1598
- }
1599
- .mr-2 {
1600
- margin-right: 0.5rem;
1601
- }
1602
1593
  .mr-0\.5 {
1603
1594
  margin-right: 0.125rem;
1604
1595
  }
@@ -1806,9 +1797,6 @@ Ensure the default browser behavior of the `hidden` attribute.
1806
1797
  .cursor-pointer {
1807
1798
  cursor: pointer;
1808
1799
  }
1809
- .resize {
1810
- resize: both;
1811
- }
1812
1800
  .list-none {
1813
1801
  list-style-type: none;
1814
1802
  }
@@ -2008,21 +1996,6 @@ Ensure the default browser behavior of the `hidden` attribute.
2008
1996
  --tw-bg-opacity: 1;
2009
1997
  background-color: rgba(187, 247, 208, var(--tw-bg-opacity));
2010
1998
  }
2011
- .bg-current {
2012
- background-color: currentColor;
2013
- }
2014
- .bg-white {
2015
- --tw-bg-opacity: 1;
2016
- background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
2017
- }
2018
- .bg-blue-congress {
2019
- --tw-bg-opacity: 1;
2020
- background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
2021
- }
2022
- .bg-gray-800 {
2023
- --tw-bg-opacity: 1;
2024
- background-color: rgba(31, 41, 55, var(--tw-bg-opacity));
2025
- }
2026
1999
  .bg-gray-100 {
2027
2000
  --tw-bg-opacity: 1;
2028
2001
  background-color: rgba(243, 244, 246, var(--tw-bg-opacity));
@@ -2035,6 +2008,10 @@ Ensure the default browser behavior of the `hidden` attribute.
2035
2008
  --tw-bg-opacity: 1;
2036
2009
  background-color: rgba(107, 114, 128, var(--tw-bg-opacity));
2037
2010
  }
2011
+ .bg-white {
2012
+ --tw-bg-opacity: 1;
2013
+ background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
2014
+ }
2038
2015
  .bg-blue-200 {
2039
2016
  --tw-bg-opacity: 1;
2040
2017
  background-color: rgba(191, 219, 254, var(--tw-bg-opacity));
@@ -2083,6 +2060,17 @@ Ensure the default browser behavior of the `hidden` attribute.
2083
2060
  background-color: #d34600;
2084
2061
  background-color: var(--color-label-live);
2085
2062
  }
2063
+ .bg-current {
2064
+ background-color: currentColor;
2065
+ }
2066
+ .bg-blue-congress {
2067
+ --tw-bg-opacity: 1;
2068
+ background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
2069
+ }
2070
+ .bg-gray-800 {
2071
+ --tw-bg-opacity: 1;
2072
+ background-color: rgba(31, 41, 55, var(--tw-bg-opacity));
2073
+ }
2086
2074
  .bg-gradient-to-r {
2087
2075
  background-image: -webkit-gradient(linear, left top, right top, from(var(--tw-gradient-stops)));
2088
2076
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
@@ -2112,18 +2100,6 @@ Ensure the default browser behavior of the `hidden` attribute.
2112
2100
  .p-2 {
2113
2101
  padding: 0.5rem;
2114
2102
  }
2115
- .px-5 {
2116
- padding-left: 1.25rem;
2117
- padding-right: 1.25rem;
2118
- }
2119
- .py-3\.5 {
2120
- padding-top: 0.875rem;
2121
- padding-bottom: 0.875rem;
2122
- }
2123
- .py-3 {
2124
- padding-top: 0.75rem;
2125
- padding-bottom: 0.75rem;
2126
- }
2127
2103
  .py-6 {
2128
2104
  padding-top: 1.5rem;
2129
2105
  padding-bottom: 1.5rem;
@@ -2144,6 +2120,18 @@ Ensure the default browser behavior of the `hidden` attribute.
2144
2120
  padding-left: 0.25rem;
2145
2121
  padding-right: 0.25rem;
2146
2122
  }
2123
+ .px-5 {
2124
+ padding-left: 1.25rem;
2125
+ padding-right: 1.25rem;
2126
+ }
2127
+ .py-3\.5 {
2128
+ padding-top: 0.875rem;
2129
+ padding-bottom: 0.875rem;
2130
+ }
2131
+ .py-3 {
2132
+ padding-top: 0.75rem;
2133
+ padding-bottom: 0.75rem;
2134
+ }
2147
2135
  .px-3\.5 {
2148
2136
  padding-left: 0.875rem;
2149
2137
  padding-right: 0.875rem;
@@ -2176,15 +2164,15 @@ Ensure the default browser behavior of the `hidden` attribute.
2176
2164
  padding-left: 1rem;
2177
2165
  padding-right: 1rem;
2178
2166
  }
2167
+ .pt-px {
2168
+ padding-top: 1px;
2169
+ }
2179
2170
  .pl-4 {
2180
2171
  padding-left: 1rem;
2181
2172
  }
2182
2173
  .pr-2 {
2183
2174
  padding-right: 0.5rem;
2184
2175
  }
2185
- .pt-px {
2186
- padding-top: 1px;
2187
- }
2188
2176
  .pt-1 {
2189
2177
  padding-top: 0.25rem;
2190
2178
  }
@@ -2317,10 +2305,6 @@ Ensure the default browser behavior of the `hidden` attribute.
2317
2305
  --tw-text-opacity: 1 !important;
2318
2306
  color: rgba(20, 83, 45, var(--tw-text-opacity)) !important;
2319
2307
  }
2320
- .text-blue-congress {
2321
- --tw-text-opacity: 1;
2322
- color: rgba(0, 82, 147, var(--tw-text-opacity));
2323
- }
2324
2308
  .text-white {
2325
2309
  --tw-text-opacity: 1;
2326
2310
  color: rgba(255, 255, 255, var(--tw-text-opacity));
@@ -2329,6 +2313,10 @@ Ensure the default browser behavior of the `hidden` attribute.
2329
2313
  --tw-text-opacity: 1;
2330
2314
  color: rgba(96, 96, 96, var(--tw-text-opacity));
2331
2315
  }
2316
+ .text-blue-congress {
2317
+ --tw-text-opacity: 1;
2318
+ color: rgba(0, 82, 147, var(--tw-text-opacity));
2319
+ }
2332
2320
  .text-toplineColor {
2333
2321
  color: #006dc1;
2334
2322
  color: var(--color-topline);
@@ -2548,6 +2536,9 @@ Ensure the default browser behavior of the `hidden` attribute.
2548
2536
  .first-of-type\:border-none:first-of-type {
2549
2537
  border-style: none;
2550
2538
  }
2539
+ .last-of-type\:hidden:last-of-type {
2540
+ display: none;
2541
+ }
2551
2542
  .hover\:bg-blue-congress:hover {
2552
2543
  --tw-bg-opacity: 1;
2553
2544
  background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
@@ -1,6 +1,6 @@
1
1
  {{#switch templatePath}}
2
- {{#case "components/Header/ServiceNavigation/ServiceNavigationItem"}}
3
- {{> components/Header/ServiceNavigation/ServiceNavigationItem}}
2
+ {{#case "components/site_header/service_navigation/service_navigation_item"}}
3
+ {{> components/site_header/service_navigation/service_navigation_item}}
4
4
  {{/case}}
5
5
  {{#case "components/teaser/group_teaser/group_teaser"}}
6
6
  {{> components/teaser/group_teaser/group_teaser}}
@@ -20,7 +20,7 @@
20
20
  <body itemscope itemtype="http://schema.org/WebPage">
21
21
  <div class="js-pageSwap">
22
22
 
23
- {{> components/Header/Header }}
23
+ {{> components/site_header/header }}
24
24
 
25
25
  <main
26
26
  onclick="void(0)"
@@ -21,7 +21,7 @@
21
21
  {{#with this.brandNavigationItems}}
22
22
  <ul class="flex pl-0.5 pr-3 md:px-0 flex-nowrap lg:mr-0">
23
23
  {{#each this}}
24
- {{> components/Header/BrandNavigation/BrandNavigationItem }}
24
+ {{> components/site_header/brand_navigation/brand_navigation_item }}
25
25
  {{/each}}
26
26
  </ul>
27
27
  {{/with}}
@@ -1,4 +1,4 @@
1
- <div x-data="burger()" class="sb-burger flex items-center justify-center h-full fill-current">
1
+ <div x-data="burger()" class="flex items-center justify-center h-full fill-current sb-burger">
2
2
  <nav>
3
3
  <button {{!-- :class="$store.burgeropen ? 'text-blue-congress' : 'text-white'" --}}
4
4
  class="relative w-10 h-10 text-white tablet:w-18 tablet:h-12 focus:outline-none bg-brand"
@@ -18,6 +18,7 @@
18
18
  </button>
19
19
  </nav>
20
20
  </div>
21
+
21
22
  <script>
22
23
  var burger = () => {
23
24
  return {
@@ -0,0 +1,85 @@
1
+ <div class="sb-main-navigation" x-data="mainNavigationHandler()" x-init="init()">
2
+
3
+ <header class="relative z-101 {{#if this.hasOpenSubNavigation}}lg:h-header-lg-big{{else}}lg:h-header-lg-small{{/if}} md:h-header-md h-header-sm">
4
+ <div x-data
5
+ id="headerWrapper"
6
+ @resize.window="resetNav()"
7
+ :class="shouldBrandNavBeHidden() ? '-mt-10 lg:-mt-8' : '' "
8
+ class="fixed top-0 left-0 flex flex-wrap max-w-full transition-all duration-500 transform font-copy lg:justify-center lg:w-full ">
9
+
10
+ <div id="anchorNavWrapper"
11
+ class="hidden">
12
+ {{> components/site_header/anchor_navigation/anchor_navigation }}
13
+ </div>
14
+
15
+ <div id="brandNavWrapper"
16
+ class="relative flex items-center justify-center order-1 w-full bg-white z-101 print:hidden">
17
+ {{> components/site_header/brand_navigation/brand_navigation }}
18
+ </div>
19
+
20
+ <div id="serviceNavWrapper"
21
+ :class="shouldServiceNavBeHidden() ? '-mt-40' : ''"
22
+
23
+ class="relative flex justify-center order-2 w-full transition-all duration-500 ease-in-out md:border-white lg:border-b bg-blue-congress z-102">
24
+ <div id="serviceNavMainContainer"
25
+ class="flex w-full h-10 lg:container md:h-12 lg:px-10 lg:h-16 z-101">
26
+
27
+ <span id="serviceNavHeadline" class="hidden print:hidden">Service Navigation</span>
28
+
29
+ <div id="serviceLogoWrapper"
30
+ class="flex items-center order-1 w-full pl-4 pr-2 tablet:pl-5 lg:items-end lg:pb-3 bg-blue-congress md:px-0 md:h-12 lg:h-16 md:w-1/2 md:max-w-1/2 lg:w-1/4 lg:max-w-1/4">
31
+ {{> components/site_header/service_logo }}
32
+ </div>
33
+
34
+ <div id="serviceItemsWrapper"
35
+ class="flex items-center justify-end flex-initial order-2 inline-block w-full max-w-full align-top bg-blue-congress md:h-12 lg:h-16 lg:order-2 lg:w-3/4 lg:max-w-3/4 md:mt-0 md:w-1/2 md:max-w-1/2 md:order-2 md:border-0 print:hidden ">
36
+ {{> components/site_header/service_navigation/service_list }}
37
+
38
+ {{> components/site_header/navigation_search/quick_search_button }}
39
+
40
+ <div class="hidden lg:flex">
41
+ {{> components/site_header/navigation_search/quick_search_form }}
42
+ </div>
43
+
44
+ <div id="burgerWrapper"
45
+ class="flex justify-end flex-none order-2 lg:order-4 md:order-4 lg:hidden ">
46
+ {{> components/site_header/burger }}
47
+ </div>
48
+
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <div id="sectionNavWrapper"
54
+ x-ref="sectionnavigation"
55
+ @toggle-sectionnav.window="toggleSectionNav"
56
+ :class="shouldSectionNavBeHidden() ? '-mt-40 md:-mt-40 lg:-mt-40' : ''"
57
+ class="flex justify-center order-3 w-full overflow-hidden duration-500 transition-max-height lg:transition-margin-top lg:duration-500 tablet:absolute tablet:top-22 tablet:w-half-screen tablet:ml-half-screen max-h-0 lg:overflow-visible md:mt-0 lg:flex lg:max-h-full lg:h-auto bg-blue-congress z-100 print:hidden"
58
+ >
59
+ {{> components/site_header/section_navigation/section_navigation }}
60
+ </div>
61
+
62
+ <div x-cloak :class="shouldServiceNavBeHidden() ? 'hidden -mt-40' : ''"
63
+ x-effect="$el.setAttribute('id', 'flyout-' + $store.searchID.current + '-2');$el.setAttribute('aria-expanded', $store.searchFieldOpen);$el.setAttribute('aria-hidden', !$store.searchFieldOpen);$el.setAttribute('aria-labelledby', 'flyout-' + $store.searchID.current + '-1')"
64
+ x-show="$store.searchFieldOpen"
65
+ class="sb-quick-search-flyout flex tablet:w-half-screen tablet:ml-half-screen justify-end order-4 w-full max-w-full p-2 px-5 py-3.5 bg-white drop-shadow-md md:mt-0 z-102 lg:hidden print:hidden"
66
+ @search-close.window="$store.searchFieldOpen = false"
67
+ @click.outside="$store.searchFieldOpen = false; $dispatch('search-mobile-click-outside'); dropped = false; toggleScrolling(!$store.serviceNavIsOpensearchFieldOpen && !$store.burgeropen)"
68
+ x-transition:enter="transition ease-out duration-200"
69
+ x-transition:enter-start="opacity-0 transform scale-y-90"
70
+ x-transition:enter-end="opacity-100 transform scale-y-100"
71
+ x-transition:leave="transition ease-in duration-100"
72
+ x-transition:leave-start="opacity-100 transform scale-y-100"
73
+ x-transition:leave-end="opacity-0 transform scale-y-90">
74
+
75
+ {{> components/site_header/navigation_search/quick_search_form }}
76
+
77
+ </div>
78
+
79
+ </div>
80
+
81
+ </header>
82
+ <div x-ref="myOverlay">
83
+ <div x-cloak x-data="overlayHandler()" @click.debounce="overlayWasClicked()" x-show="shouldOverlayBeShown()" class="fixed top-0 left-0 w-screen h-screen bg-gray-800 z-100 lg:hidden opacity-70"></div>
84
+ </div>
85
+ </div>
@@ -0,0 +1,255 @@
1
+ //Main Alpine Init Listener
2
+ document.addEventListener('alpine:init', () => {
3
+ // Alpine.stores for global variables
4
+ Alpine.store('clientHeight', document.documentElement.clientHeight || document.body.clientHeight)
5
+ Alpine.store('clientWidth', document.documentElement.clientWidth || document.body.clientWidth)
6
+ Alpine.store('burgeropen', false);
7
+ Alpine.store('searchFieldOpen', false);
8
+ Alpine.store('serviceNavIsOpen', false);
9
+ Alpine.store('searchID', {
10
+ current: '{{nextRandom}}'
11
+ });
12
+ Alpine.store('serviceID', {
13
+ open: false,
14
+ current: '0'
15
+ });
16
+ Alpine.store('navIsVisible', true);
17
+
18
+ // context for the main header element
19
+ Alpine.data('mainNavigationHandler', () =>({
20
+
21
+ debounce (callback, wait) {
22
+ let timeoutId = null;
23
+ return (...args) => {
24
+ window.clearTimeout(timeoutId);
25
+ timeoutId = window.setTimeout(() => {
26
+ callback.apply(null, args);
27
+ }, wait);
28
+ };
29
+
30
+ },
31
+ init(){
32
+ let lastScrollTop = 0
33
+ let height = top.innerHeight
34
+
35
+ window.addEventListener('scroll', this.debounce( () => {
36
+ let winScroll = document.body.scrollTop || document.documentElement.scrollTop
37
+ winScroll > lastScrollTop ? this.scrollingDown = true : this.scrollingDown = false
38
+ //let height = document.documentElement.scrollHeight - document.documentElement.clientHeight
39
+ this.percent = Math.round((winScroll / height) * 100)
40
+ lastScrollTop = winScroll
41
+ //console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
42
+ this.$store.navIsVisible = !this.isNavHidden()
43
+ //console.log(this.$store.navIsVisible);
44
+ },50))
45
+ },
46
+ percent: 0,
47
+ scrollingDown: true,
48
+ isNavHidden() {
49
+ if(this.$screen('lg')) {
50
+ return this.shouldSectionNavBeHidden()
51
+ } else {
52
+ return this.shouldServiceNavBeHidden()
53
+ }
54
+ },
55
+ shouldBrandNavBeHidden() {
56
+ return this.percent > 0
57
+ },
58
+ shouldSectionNavBeHidden() {
59
+ return this.percent > 50 && this.scrollingDown && this.$store.burgeropen == false && this.$screen('lg')
60
+ },
61
+ shouldServiceNavBeHidden() {
62
+ return (this.percent > 90 && !this.$screen('lg') && this.scrollingDown && this.$store.burgeropen == false)
63
+ },
64
+ shouldServiceIconsBeHidden() {
65
+ return (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == true) || (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == false)
66
+ },
67
+ shouldFlyoutBeHidden() {
68
+ return (this.percent > 50 && this.scrollingDown && this.$screen('lg') )
69
+ },
70
+ resetNav() {
71
+ if(window.innerWidth > 1023) {
72
+ this.$refs.sectionnavigation.setAttribute("style","")
73
+ } else {
74
+ // hidden needs to be set here to avoid flickering of the sectionNav on viewport change, gets removed in timeout
75
+ // this.$refs.sectionnavigation.classList.add('hidden')
76
+ // this.$refs.sectionnavigation.style.maxHeight="0px"
77
+ }
78
+
79
+ let nowClientHeight = document.documentElement.clientHeight || document.body.clientHeight;
80
+ let nowClientWidth = document.documentElement.clientWidth || document.body.clientWidth;
81
+ let nextNowClientHeight = this.$store.clientHeight;
82
+ if (nextNowClientHeight >= nowClientHeight && this.$store.clientWidth == nowClientWidth) {
83
+ // Event handling of keyboard pop-up
84
+ nextNowClientHeight = nowClientHeight
85
+ this.$store.clientWidth = nowClientWidth
86
+ }
87
+ else{
88
+ // timeout is used to dispatch events after the resize is done
89
+ let timeout
90
+ clearTimeout(timeout)
91
+ timeout = setTimeout(() => {
92
+ this.$refs.sectionnavigation.classList.remove('hidden')
93
+ this.$store.burgeropen == true ? this.$dispatch('burger-close') :null
94
+ this.$store.searchFieldOpen === true ? this.$dispatch('search-mobile-click-outside') :null
95
+ this.$store.searchFieldOpen === true ? this.$dispatch('search-close') :null
96
+ this.$store.serviceNavIsOpen === true ? this.$dispatch('close-servicemenu') :null
97
+ this.toggleScrolling(true)
98
+ }, 250)
99
+ // Event handling of keyboard pop-up
100
+ nextNowClientHeight = nowClientHeight
101
+ this.$store.clientWidth = nowClientWidth
102
+ }
103
+ },
104
+ toggleSectionNav() {
105
+ //false = sectionNav schließt ( mobile/tablet? --> maxHeight = 0 /// desktop? just clear maxHeight attribute )
106
+ //true = sectionNav öffnet (maxheight = scrollheight)
107
+ console.log('toggleSectionNav, Event: ' + this.$event.detail )
108
+ if(this.$event.detail === false) {
109
+ if (window.innerWidth < 1024) {
110
+ this.$refs.sectionnavigation.style.maxHeight='0px'
111
+ } else {
112
+ this.$refs.sectionnavigation.style.maxHeight = ''
113
+ }
114
+ } else {
115
+ let winheightcorr = parseInt(window.innerHeight) - this.$refs.sectionnavigation.offsetTop
116
+ let navheight = parseInt(this.$refs.sectionnavigation.scrollHeight)
117
+ let brandNavHeight = this.percent > 0 ? 40 : 0
118
+
119
+ if(navheight > winheightcorr){
120
+ this.$refs.sectionnavigation.style.overflowY = 'scroll'
121
+ this.$refs.sectionnavigation.style.maxHeight = winheightcorr + brandNavHeight +'px'
122
+
123
+ } else {
124
+ this.$refs.sectionnavigation.style.overflowY = 'hidden'
125
+ this.$refs.sectionnavigation.style.maxHeight = this.$el.scrollHeight + 'px'
126
+ }
127
+ }
128
+ },
129
+ disableScrolling() {
130
+ document.body.classList.add('overflow-hidden','h-full','w-full')
131
+ this.$refs.myOverlay.ontouchmove = (e) => e.preventDefault();
132
+ console.log("disableScrolling")
133
+ },
134
+ enableScrolling() {
135
+ document.body.classList.remove('overflow-hidden','h-full','w-full')
136
+ this.$refs.myOverlay.ontouchmove = (e) => true;
137
+ console.log("enableScrolling")
138
+ },
139
+ toggleScrolling(mode){
140
+ if(this.$screen(0) && !this.$screen('lg')){
141
+ mode == false ? this.disableScrolling() : this.enableScrolling()
142
+ }
143
+ if(this.$screen('lg') && mode == true){
144
+ this.enableScrolling()
145
+ }
146
+ }
147
+
148
+ }))
149
+
150
+ // context for the overlay
151
+ Alpine.data('overlayHandler', () => ({
152
+ shouldOverlayBeShown() {
153
+ return (!this.$screen('lg') && ( this.$store.burgeropen == true || this.$store.serviceNavIsOpen == true || this.$store.searchFieldOpen == true ))
154
+ },
155
+ overlayWasClicked() {
156
+ this.$store.serviceNavIsOpen ? this.$store.serviceNavIsOpen = false : null
157
+ this.$dispatch('burger-close')
158
+ this.$dispatch('close-servicemenu')
159
+ // this.$dispatch('toggleScrolling', true )
160
+ this.toggleScrolling(true)
161
+ }
162
+ }))
163
+
164
+ // context for all dropdowns
165
+ Alpine.data('dropdown', () => ({
166
+ dropped: false,
167
+ toggle() {
168
+ this.dropped = ! this.dropped;
169
+ },
170
+ toggleServiceNav(){
171
+ this.dropped = ! this.dropped;
172
+ this.$store.searchFieldOpen = false;
173
+
174
+ this.$el.id != this.$store.serviceID.current ? this.$store.serviceNavIsOpen = true : this.$el.id == this.$store.serviceID.current ? this.$store.serviceNavIsOpen = !this.$store.serviceNavIsOpen : null;
175
+
176
+ this.$store.burgeropen == true ? this.$dispatch('burger-close') : null
177
+
178
+ console.log('currentID: '+ this.$store.serviceID.current)
179
+ console.log('target-id: '+this.$event.target.id)
180
+ console.log('element-id: '+this.$el.id)
181
+ console.log('serviceNav is open:'+ this.$store.serviceNavIsOpen)
182
+
183
+ this.$store.serviceID.current = this.$el.id
184
+
185
+ this.toggleScrolling(!this.$store.serviceNavIsOpen)
186
+
187
+ let myFlyout = document.querySelector('#flyout-'+this.$el.id)
188
+ let brandNavHeight = this.percent > 0 ? 40 : 0
189
+
190
+ if (this.$store.serviceNavIsOpen == true && this.dropped == true) {
191
+ window.setTimeout(function(){
192
+ if (myFlyout.scrollHeight > window.innerHeight-myFlyout.offsetTop) {
193
+ myFlyout.style.height = 'auto'
194
+ window.innerWidth < 768 ? myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 80 + brandNavHeight +'px' : myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 40 + brandNavHeight +'px'
195
+ myFlyout.style.overflowY = 'scroll'
196
+ } else {
197
+ myFlyout.style.maxHeight = ''
198
+ //myFlyout.style.overflowY = 'hidden'
199
+ }
200
+ },150)
201
+ }
202
+ }
203
+ }))
204
+
205
+ // There are several Flyouts sharing the same functionality and context, so put the data in an Alpine.data to make it reusable
206
+ Alpine.data('flyoutHandler', () => ({
207
+ init() {
208
+ //Initial: x-collapse only on mobile/tablet
209
+ if(window.innerWidth < 1024) {
210
+ this.$el.setAttribute("x-collapse","")
211
+ }
212
+ },
213
+ sectionNavFlyoutWatcher() {
214
+ //Adds scrollheight of the flyout to sectionNav container to make sure all following items stay visible
215
+ this.$watch('dropped', value => {
216
+ let a = this.$refs.sectionnavigation.scrollHeight + this.$el.scrollHeight;
217
+ let brandNavHeight = this.percent > 0 ? 40 : 0
218
+ if(window.innerWidth < 1024) {
219
+ if(value == true ) {
220
+
221
+ if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
222
+ this.$refs.sectionnavigation.style.maxHeight = a +'px'
223
+ this.$refs.sectionnavigation.style.overflowY = 'hidden'
224
+ } else {
225
+ this.$refs.sectionnavigation.style.maxHeight = window.innerHeight - this.$refs.sectionnavigation.offsetTop + brandNavHeight +'px'
226
+ this.$refs.sectionnavigation.style.overflowY = 'scroll'
227
+ }
228
+ } else {
229
+ if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
230
+ this.$refs.sectionnavigation.style.overflowY = 'hidden'
231
+ } else {
232
+ this.$refs.sectionnavigation.style.overflowY = 'scroll'
233
+ }
234
+ }
235
+ }
236
+ })
237
+ },
238
+ setFlyoutAnimationStyle() {
239
+ //sets/cleansup the x-collapse attributes depending on window.innerWidth, gets fired @resize.window in NavigationFlyout.hbs
240
+ if(window.innerWidth > 1023) {
241
+ if(this.$el.hasAttribute("x-collapse.duration.500ms")) {
242
+ this.$el.removeAttribute("x-collapse.duration.500ms")
243
+ delete this.$el._x_transition;
244
+ this.$el.style.removeProperty('overflow');
245
+ this.$el.style.removeProperty('height');
246
+ if (! this.$el._x_isShown) this.$el.style.display = 'none'
247
+ if(this.$el.hasAttribute("hidden")) this.$el.removeAttribute("hidden")
248
+ }
249
+
250
+ } else {
251
+ if(!this.$el.hasAttribute("x-collapse.duration.500ms")) this.$el.setAttribute("x-collapse.duration.500ms","")
252
+ }
253
+ }
254
+ }))
255
+ })
@@ -44,11 +44,11 @@
44
44
  <div class="{{#if this.showAsFlyout}}lg:flex lg:flex-row -columnCount--{{this.columnCount}} lg:divide-x lg:divide-gray-200 {{else}} {{#if ../this.selected}} w-full lg:px-10 lg:container {{/if}}{{/if}}">
45
45
  {{#if this.showAsFlyout}}
46
46
  {{#each this.columns}}
47
- {{> components/Header/NavigationFlyout/NavigationFlyoutColumn count=../this.columnCount navtype=../../_navigationType _parent=../../_parent _flyout=true~}}
47
+ {{> components/site_header/navigation_flyout/navigation_flyout_column count=../this.columnCount navtype=../../_navigationType _parent=../../_parent _flyout=true~}}
48
48
  {{/each}}
49
49
  {{else}}
50
50
  {{#with this.items}}
51
- {{> components/Header/NavigationFlyout/NavigationFlyoutColumn selected=../../this.selected navtype=../../_navigationType _parent=../../_parent _flyout=false ~}}
51
+ {{> components/site_header/navigation_flyout/navigation_flyout_column selected=../../this.selected navtype=../../_navigationType _parent=../../_parent _flyout=false ~}}
52
52
  {{/with}}
53
53
  {{/if}}
54
54
  </div>
@@ -2,7 +2,7 @@
2
2
 
3
3
  {{~#each this ~}}
4
4
  {{~#if this.title~}}
5
- {{> components/Header/NavigationFlyout/NavigationFlyoutItem _parentselected=../selected _fromNav=../navtype _flyout=../_flyout _parent=../_parent ~}}
5
+ {{> components/site_header/navigation_flyout/navigation_flyout_item _parentselected=../selected _fromNav=../navtype _flyout=../_flyout _parent=../_parent ~}}
6
6
  {{~/if~}}
7
7
  {{~/each~}}
8
8