From 662e26ca671217a8ce7f85a776d5fa8762678f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Ste=CC=A8pien=CC=81?= Date: Mon, 4 Dec 2023 23:37:25 +0100 Subject: [PATCH] Offcanvas adjustments for dynamic import, missing styling import --- _dev/css/dynamic/offcanvas/_index.scss | 2 + _dev/css/dynamic/offcanvas/_override.scss | 5 +++ .../css/theme/components/cart/_blockcart.scss | 11 ----- .../theme/utility/_dynamic-import-fix.scss | 7 ++- _dev/css/theme/vendors/_bootstrap.scss | 2 +- templates/components/offcanvas.tpl | 43 +++++++++++-------- 6 files changed, 39 insertions(+), 31 deletions(-) delete mode 100644 _dev/css/theme/components/cart/_blockcart.scss diff --git a/_dev/css/dynamic/offcanvas/_index.scss b/_dev/css/dynamic/offcanvas/_index.scss index 68b66f1b..3ac14fa9 100644 --- a/_dev/css/dynamic/offcanvas/_index.scss +++ b/_dev/css/dynamic/offcanvas/_index.scss @@ -1 +1,3 @@ +@import "../../abstracts/index"; +@import "~bootstrap/scss/offcanvas"; @import "override"; diff --git a/_dev/css/dynamic/offcanvas/_override.scss b/_dev/css/dynamic/offcanvas/_override.scss index 9c11e266..9203fad7 100644 --- a/_dev/css/dynamic/offcanvas/_override.scss +++ b/_dev/css/dynamic/offcanvas/_override.scss @@ -1 +1,6 @@ // Styles override for the offcanvas component + + +.offcanvas-footer { + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); +} diff --git a/_dev/css/theme/components/cart/_blockcart.scss b/_dev/css/theme/components/cart/_blockcart.scss deleted file mode 100644 index c65ff443..00000000 --- a/_dev/css/theme/components/cart/_blockcart.scss +++ /dev/null @@ -1,11 +0,0 @@ -.blockcart { - &__dropdown { - width: rem-calc(320px); - min-width: inherit; - padding: 0; - margin: 0; - overflow: hidden; - border: 1px solid $border-color; - border-radius: $border-radius; - } -} diff --git a/_dev/css/theme/utility/_dynamic-import-fix.scss b/_dev/css/theme/utility/_dynamic-import-fix.scss index 24c0c223..248211bf 100644 --- a/_dev/css/theme/utility/_dynamic-import-fix.scss +++ b/_dev/css/theme/utility/_dynamic-import-fix.scss @@ -3,7 +3,12 @@ display: none; } -// FIX TO MODAL, hidden by default +// FIX TO OFFCANVAS, hidden by default +.offcanvas { + display: none; +} + +// FIX TO DROPDOWN, hidden by default .dropdown-menu { display: none; } diff --git a/_dev/css/theme/vendors/_bootstrap.scss b/_dev/css/theme/vendors/_bootstrap.scss index ccf078b0..d224dcf8 100644 --- a/_dev/css/theme/vendors/_bootstrap.scss +++ b/_dev/css/theme/vendors/_bootstrap.scss @@ -22,7 +22,6 @@ @import "~bootstrap/scss/spinners"; @import "~bootstrap/scss/placeholders"; @import "~bootstrap/scss/utilities"; -@import "~bootstrap/scss/offcanvas"; // Helpers @@ -37,6 +36,7 @@ // @import "~bootstrap/scss/popover"; // @import "~bootstrap/scss/toasts"; // @import "~bootstrap/scss/tooltip"; +//@import "~bootstrap/scss/offcanvas"; //NOT USED // @import "~bootstrap/scss/carousel"; diff --git a/templates/components/offcanvas.tpl b/templates/components/offcanvas.tpl index e8079717..30f8040e 100644 --- a/templates/components/offcanvas.tpl +++ b/templates/components/offcanvas.tpl @@ -5,24 +5,31 @@ tabindex="-1" {block name='offcanvas_extra_attribues'}{/block} > - {block name='offcanvas_header'} -
- {block name='offcanvas_title' hide} -
{$smarty.block.child}
- {/block} - -
- {/block} - {block name='offcanvas_body' hide} -
- {$smarty.block.child} -
+ {block name='offcanvas_content'} + {block name='offcanvas_header'} +
+ {block name='offcanvas_title' hide} +
{$smarty.block.child}
+ {/block} + +
+ {/block} + {block name='offcanvas_body' hide} +
+ {$smarty.block.child} +
+ {/block} + {block name='offcanvas_footer' hide} + + {/block} {/block} {/block}