-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
persistent offcanvas if third-party integration only (#846)
- Loading branch information
1 parent
6a2b7eb
commit d367035
Showing
4 changed files
with
84 additions
and
76 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,58 +1,62 @@ | ||
{# TODO: Possibly refactor later as a "drawer" component since diverging from offcanvas intent ... https://getbootstrap.com/docs/5.0/components/offcanvas/ #} | ||
|
||
<div class="jcc-offcanvas" id="{{ offcanvas.id }}" data-offcanvas="container" visible="visible"> | ||
<dialog class="jcc-offcanvas__dialog" role="dialog" data-offcanvas="dialog" tabindex="-1"> | ||
<div class="jcc-offcanvas__dialog-header"> | ||
<div class="jcc-offcanvas__dialog-close"> | ||
{% if offcanvas.dialog %} | ||
<dialog class="jcc-offcanvas__dialog" role="dialog" data-offcanvas="dialog" tabindex="-1"> | ||
<div class="jcc-offcanvas__dialog-header"> | ||
<div class="jcc-offcanvas__dialog-close"> | ||
{% include '@atoms/button/button.twig' with { | ||
button: { | ||
id: offcanvas.dialog.button_close.id|default('offcanvas_close'), | ||
style: 'unstyled', | ||
aria_label: offcanvas.dialog.button_close.aria_label|default('Close this dialog window'), | ||
other_attributes: 'tabindex=-1 data-offcanvas=trigger-close', | ||
icon: { | ||
name: 'close', | ||
set: 'fa', | ||
}, | ||
url: '#', | ||
} | ||
} %} | ||
</div> | ||
|
||
{% include '@molecules/hero/hero.twig' with { | ||
hero: { | ||
layout: offcanvas.dialog.hero.layout|default('full-main'), | ||
background: offcanvas.dialog.hero.background|default('alt'), | ||
main: { | ||
icon: offcanvas.dialog.hero.main.icon, | ||
title: offcanvas.dialog.hero.main.title, | ||
title_tag: 'h2', | ||
lead: offcanvas.dialog.hero.main.lead, | ||
actions: offcanvas.dialog.hero.main.actions, | ||
} | ||
} | ||
} %} | ||
</div> | ||
|
||
{% if offcanvas.dialog.embed %} | ||
<div class="jcc-offcanvas__dialog-body"> | ||
{{ offcanvas.dialog.embed }} | ||
</div> | ||
{% endif %} | ||
</dialog> | ||
{% endif %} | ||
|
||
<div class="jcc-offcanvas__trigger-container"> | ||
{% if offcanvas.button %} | ||
<div class="block{{ offcanvas.button.id ? ' ' ~ offcanvas.button.id ~ '__trigger' }}"> | ||
{% include '@atoms/button/button.twig' with { | ||
button: { | ||
id: offcanvas.button_close.id|default('offcanvas_close'), | ||
style: 'unstyled', | ||
aria_label: offcanvas.button_close.aria_label|default('Close this dialog window'), | ||
other_attributes: 'tabindex=-1 data-offcanvas=trigger-close', | ||
icon: { | ||
name: 'close', | ||
set: 'fa', | ||
}, | ||
id: offcanvas.button.id|default('offcanvas_open'), | ||
text: offcanvas.button.text, | ||
other_attributes: 'data-offcanvas=trigger', | ||
icon: offcanvas.button.icon, | ||
icon_layout: offcanvas.button.icon_layout|default('top'), | ||
url: '#', | ||
} | ||
} %} | ||
</div> | ||
|
||
{% include '@molecules/hero/hero.twig' with { | ||
hero: { | ||
layout: offcanvas.hero.layout|default('full-main'), | ||
background: offcanvas.hero.background|default('alt'), | ||
main: { | ||
icon: offcanvas.hero.main.icon, | ||
title: offcanvas.hero.main.title, | ||
title_tag: 'h2', | ||
lead: offcanvas.hero.main.lead, | ||
actions: offcanvas.hero.main.actions, | ||
} | ||
} | ||
} %} | ||
</div> | ||
|
||
{% if offcanvas.embed %} | ||
<div class="jcc-offcanvas__dialog-body"> | ||
{{ offcanvas.embed }} | ||
</div> | ||
{% endif %} | ||
</dialog> | ||
|
||
<div class="jcc-offcanvas__trigger-container"> | ||
<div class="block{{ offcanvas.button.id ? ' ' ~ offcanvas.button.id ~ '__trigger' }}"> | ||
{% include '@atoms/button/button.twig' with { | ||
button: { | ||
id: offcanvas.button.id|default('offcanvas_open'), | ||
text: offcanvas.button.text, | ||
other_attributes: 'data-offcanvas=trigger', | ||
icon: offcanvas.button.icon, | ||
icon_layout: offcanvas.button.icon_layout|default('top'), | ||
url: '#', | ||
} | ||
} %} | ||
</div> | ||
</div> | ||
</div> |
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