diff --git a/_dev/css/dynamic/modal/_override.scss b/_dev/css/dynamic/modal/_override.scss index 004e035a..51dfaafd 100644 --- a/_dev/css/dynamic/modal/_override.scss +++ b/_dev/css/dynamic/modal/_override.scss @@ -1,60 +1,3 @@ .modal-content { background-clip: border-box; } - -.modal-fullscreen { - /* stylelint-disable */ - padding: 0 !important; // override inline padding-right added from js - /* stylelint-enable */ - .modal-dialog { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; - } - - .modal-content { - height: 100%; - border: 0; - @include border-radius(0); - } - - .modal-body { - overflow-y: auto; - } -} - -.modal .modal-dialog-aside { - width: 100%; - height: 100%; - margin: 0; - transition: transform 0.2s; - transform: translate(0); - @include media-breakpoint-up(sm) { - max-width: 320px; - } -} - -.modal .modal-dialog-aside .modal-content { - height: inherit; - border: 0; - border-radius: 0; -} - -.modal .modal-dialog-aside .modal-content .modal-body { - overflow-y: auto; -} - -.modal.fixed-right .modal-dialog-aside { - margin-left: auto; - transform: translateX(100%); -} - -.modal.fixed-left .modal-dialog-aside { - margin-right: auto; - transform: translateX(-100%); -} - -.modal.show .modal-dialog-aside { - transform: translateX(0); -} diff --git a/_dev/css/dynamic/offcanvas/_index.scss b/_dev/css/dynamic/offcanvas/_index.scss new file mode 100644 index 00000000..68b66f1b --- /dev/null +++ b/_dev/css/dynamic/offcanvas/_index.scss @@ -0,0 +1 @@ +@import "override"; diff --git a/_dev/css/dynamic/offcanvas/_override.scss b/_dev/css/dynamic/offcanvas/_override.scss new file mode 100644 index 00000000..9c11e266 --- /dev/null +++ b/_dev/css/dynamic/offcanvas/_override.scss @@ -0,0 +1 @@ +// Styles override for the offcanvas component diff --git a/_dev/js/theme/components/dynamic-bootstrap-components.js b/_dev/js/theme/components/dynamic-bootstrap-components.js index f33901f2..ae25b61b 100644 --- a/_dev/js/theme/components/dynamic-bootstrap-components.js +++ b/_dev/js/theme/components/dynamic-bootstrap-components.js @@ -15,6 +15,17 @@ $(() => { ], }); + const importOffcanvas = new DynamicImportHandler({ + jqueryPluginCover: 'offcanvas', + DOMEvents: 'click', + DOMEventsSelector: '[data-bs-toggle="offcanvas"]', + DOMEventsPreventDefault: true, + files: () => [ + import('bootstrap/js/src/offcanvas'), + import('@css/dynamic/offcanvas/_index.scss'), + ], + }); + const importDropdown = new DynamicImportHandler({ jqueryPluginCover: 'dropdown', DOMEvents: 'click', diff --git a/templates/_partials/header.tpl b/templates/_partials/header.tpl index b10cb7c4..76d6c280 100644 --- a/templates/_partials/header.tpl +++ b/templates/_partials/header.tpl @@ -54,7 +54,8 @@ class="header-top__link" rel="nofollow" href="#" - data-bs-toggle="modal" + role="button" + data-bs-toggle="offcanvas" data-bs-target="#mobile_top_menu_wrapper" >