-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release(2.2.8): review offcanvas in search results page ouitoulia/dia…
- Loading branch information
Showing
2 changed files
with
53 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{# | ||
/** | ||
* @file | ||
* Template for offcanvas sidebar-mobile component. | ||
* Docs: https://italia.github.io/design-scuole-pagine-statiche/scuole-archivio.html | ||
* Latest revision: 2.4.1 | ||
* | ||
* Parameters: | ||
* - offcanvas_title (string) (default: 'Filtri') | ||
* - offcanvas_id (string) (default: 'sidebar-mobile-'~random()) | ||
* - offcanvas_icon (string) (default: 'icon-filters') | ||
* | ||
* Examples: | ||
{% embed '@skenografia_components/offcanvas/offcanvas-sidebar-mobile.html.twig' with { | ||
offcanvas_title: 'Title', | ||
} %} | ||
{% block mobileSidebarContent %} | ||
{{ my_content }} | ||
{% endblock %} | ||
{% endembed %} | ||
* | ||
*/ | ||
#} | ||
{% apply spaceless %} | ||
{# Set defaults #} | ||
{% set _offcanvas_title = offcanvas_title|default('Filtri') %} | ||
{% set _offcanvas_id = offcanvas_id|default('sidebar-mobile-'~random()) %} | ||
{% set _offcanvas_icon = offcanvas_icon|default('icon-filters') %} | ||
|
||
<div class="offcanvas offcanvas-end d-md-block" tabindex="-1" id="{{ _offcanvas_id }}" aria-labelledby="{{ _offcanvas_id }}-label"> | ||
<div class="offcanvas-header"> | ||
<h2 class="offcanvas-title" id="{{ _offcanvas_id }}-label">{{ _offcanvas_title }}</h2> | ||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> | ||
</div> | ||
<div class="offcanvas-body"> | ||
{% block mobileSidebarContent %} | ||
{{ content }} | ||
{% endblock %} | ||
</div> | ||
</div> | ||
<section class="section bg-white border-top border-bottom d-block d-lg-none"> | ||
<div class="container d-flex justify-content-between align-items-center py-3"> | ||
<h2 class="h6 text-uppercase mb-0"><strong>{{ _offcanvas_title }}</strong></h2> | ||
<button class="btn btn-link d-lg-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#{{ _offcanvas_id }}" aria-expanded="false" aria-controls="{{ _offcanvas_id }}"> | ||
{% include '@bi-bcl/icon/icon.html.twig' with {name: 'icon-filters'} %} | ||
</button> | ||
</div> | ||
</section> | ||
{% endapply %} |
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