diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/SearchbarController.php b/public/typo3conf/ext/ep_products/Classes/Controller/SearchbarController.php index 70bb3f34..10773999 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/SearchbarController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/SearchbarController.php @@ -83,7 +83,7 @@ class SearchbarController extends ActionController $this->view->assignMultiple([ 'filterOptions' => $filterOptions, 'searchParams' => $searchParams, - 'fixed' => (bool)$this->settings['fixed'], + 'collapsed' => (bool)$this->settings['collapsed'], ]); } } diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/SearchBar.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/SearchBar.typoscript index 3565c58c..186217f6 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/SearchBar.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/SearchBar.typoscript @@ -17,5 +17,5 @@ lib.searchBar { view =< plugin.tx_epproducts.view } -lib.searchBarFixed < lib.searchBar -lib.searchBarFixed.settings.fixed = 1 +lib.searchBarCollapsed < lib.searchBar +lib.searchBarCollapsed.settings.collapsed = 1 diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/searchbar_toggle_controller.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/searchbar_toggle_controller.js new file mode 100644 index 00000000..52d4e742 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/searchbar_toggle_controller.js @@ -0,0 +1,14 @@ +import { Controller } from 'stimulus' +import { useDispatch } from 'stimulus-use' + +export default class extends Controller { + + initialize() { + useDispatch(this) + } + + toggle(e) { + e.preventDefault() + this.dispatch('toggle') + } +} diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/sticky_controller.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/sticky_controller.js index 6f49cd7f..3d1faf10 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/sticky_controller.js +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/sticky_controller.js @@ -5,10 +5,9 @@ export default class extends Controller { static debounces = [ 'toggle' ] - static classes = [ 'sticky' ] - static values = { sticky: Boolean, + classes: String, offset: Number, disabled: Boolean, } @@ -37,7 +36,11 @@ export default class extends Controller { } stickyValueChanged() { - let stickyClass = this.hasStickyClass ? this.stickyClass : 'sticky' - this.element.classList.toggle(stickyClass, this.stickyValue) + if (!this.hasClassesValue) { + return + } + this.classesValue.split(' ').forEach(className => { + this.element.classList.toggle(className, this.stickyValue) + }) } } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_searchbar.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_searchbar.scss index cbac0052..b202764a 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_searchbar.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_searchbar.scss @@ -2,6 +2,10 @@ @apply hidden relative lg:block lg:container -mt-20 mb-8; &.sticky { - @apply fixed z-50 top-0 left-0 mt-8 mb-0 inset-x-0 max-w-full px-0 shadow-lg; + @apply fixed z-50 top-0 left-0 mt-8 mb-0 inset-x-0 shadow-lg; + } + + &.reduced { + @apply max-w-full px-0 mt-8 mb-0; } } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_slider.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_slider.scss index ff3ed3db..87107ae5 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_slider.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/components/_slider.scss @@ -1,7 +1,7 @@ @import "~@splidejs/splide/dist/css/splide-core.min.css"; .slider-pagination { - @apply absolute bottom-0 left-1/2 transform -translate-x-1/2 md:mb-4; + @apply absolute bottom-0 left-1/2 transform -translate-x-1/2 md:mb-8; @apply list-none p-0; @apply flex items-center space-x-2; } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html index c924a129..b16fc0b3 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html @@ -4,13 +4,11 @@ -
- - - - - - +
+ + + + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Subpage.html b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Subpage.html index 4de0c4a7..402f4535 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Subpage.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Subpage.html @@ -4,14 +4,14 @@ -
- - - - - +
+ + + + + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeft.html b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeft.html index 815c3cf7..ee8cbcbe 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeft.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarLeft.html @@ -5,13 +5,13 @@
- - - - - + + + + +
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarRight.html b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarRight.html index 9a99802f..e2bba45d 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarRight.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/SubpageSidebarRight.html @@ -4,14 +4,14 @@ -
- - - - - +
+ + + + +
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html index 737e4940..d00f878d 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html @@ -3,7 +3,7 @@ xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"> -
+
@@ -41,7 +41,7 @@ + class="absolute top-0 right-8 lg:right-28 w-20 lg:w-auto" /> diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Mainnav.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Mainnav.html index 54223d8a..88d50d1c 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Mainnav.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Mainnav.html @@ -49,7 +49,7 @@ {topitem.title} @@ -68,6 +68,25 @@ +
  • + + + + + + + + + + + + +
  • diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Topnav.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Topnav.html index 0430b771..73878c94 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Topnav.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Topnav.html @@ -6,7 +6,7 @@ -