-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from Oksydan/modal-to-offcanvas
Modal aside to offcanvas migration
- Loading branch information
Showing
11 changed files
with
79 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "override"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// Styles override for the offcanvas component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
{extends file='components/modal.tpl'} | ||
{extends file='components/offcanvas.tpl'} | ||
|
||
{block name='modal_extra_attribues'}id="mobile_filters" data-modal-hide-mobile{/block} | ||
{block name='modal_extra_class'}fixed-right{/block} | ||
{block name='modal_dialog_extra_class'}modal-dialog-aside{/block} | ||
{block name='modal_title'}{l s='Filters' d='Shop.Theme.Catalog'}{/block} | ||
{block name='modal_body_extra_class'}p-0{/block} | ||
{block name='modal_body'} | ||
{block name='offcanvas_extra_attribues'}id="mobile_filters"{/block} | ||
{block name='offcanvas_extra_class'}offcanvas-end{/block} | ||
{block name='offcanvas_title'}{l s='Filters' d='Shop.Theme.Catalog'}{/block} | ||
{block name='offcanvas_body'} | ||
<div id="_mobile_filters"></div> | ||
{/block} | ||
|
||
{block name='modal_footer'} | ||
<button type="button" class="btn d-block text-center w-100 btn-primary" data-dismiss="modal" aria-label="Close"> | ||
{l s='Show results' d='Shop.Istheme'} | ||
<button | ||
type="button" | ||
class="btn d-block text-center w-100 btn-primary" | ||
data-bs-dismiss="offcanvas" | ||
aria-label="Close" | ||
> | ||
{l s='Show results' d='Shop.Istheme'} | ||
</button> | ||
{/block} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
{extends file='components/modal.tpl'} | ||
{extends file='components/offcanvas.tpl'} | ||
|
||
{block name='modal_extra_attribues'}id="mobile_top_menu_wrapper" data-modal-hide-mobile{/block} | ||
{block name='modal_extra_class'}fixed-left{/block} | ||
{block name='modal_dialog_extra_class'}modal-dialog-aside{/block} | ||
{block name='modal_title'}{l s='Menu' d='Shop.Theme.Catalog'}{/block} | ||
{block name='modal_body'} | ||
{block name='offcanvas_extra_attribues'}id="mobile_top_menu_wrapper"{/block} | ||
{block name='offcanvas_title'}{l s='Menu' d='Shop.Theme.Catalog'}{/block} | ||
{block name='offcanvas_body'} | ||
<div class="js-top-menu mobile" id="_mobile_top_menu"></div> | ||
<div class="js-top-menu-bottom"> | ||
<div id="_mobile_currency_selector" class="mb-2"></div> | ||
<div id="_mobile_language_selector" class="mb-2"></div> | ||
<div id="_mobile_contact_link" class="mb-2"></div> | ||
</div> | ||
</div> | ||
{/block} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
{block name='offcanvas'} | ||
<div | ||
class="offcanvas {block name='offcanvas_extra_class'}offcanvas-start{/block}" | ||
tabindex="-1" | ||
{block name='offcanvas_extra_attribues'}{/block} | ||
> | ||
{block name='offcanvas_header'} | ||
<div class="offcanvas-header {block name='offcanvas_header_extra_class'}{/block}" > | ||
{block name='offcanvas_title' hide} | ||
<h5 class="offcanvas-title">{$smarty.block.child}</h5> | ||
{/block} | ||
<button | ||
type="button" | ||
class="btn-close" | ||
data-bs-dismiss="offcanvas" | ||
aria-label="Close" | ||
> | ||
</button> | ||
</div> | ||
{/block} | ||
{block name='offcanvas_body' hide} | ||
<div class="offcanvas-body {block name='offcanvas_body_extra_class'}{/block}"> | ||
{$smarty.block.child} | ||
</div> | ||
{/block} | ||
</div> | ||
{/block} |