Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
681 changes: 519 additions & 162 deletions src/compositions/bcl-contact-form/__snapshots__/contact-form.test.js.snap

Large diffs are not rendered by default.

454 changes: 346 additions & 108 deletions src/compositions/bcl-event/__snapshots__/event.test.js.snap

Large diffs are not rendered by default.

454 changes: 346 additions & 108 deletions src/compositions/bcl-glossary/__snapshots__/glossary.test.js.snap

Large diffs are not rendered by default.

908 changes: 692 additions & 216 deletions src/compositions/bcl-group/__snapshots__/group.test.js.snap

Large diffs are not rendered by default.

711 changes: 511 additions & 200 deletions src/compositions/bcl-header/__snapshots__/header.test.js.snap

Large diffs are not rendered by default.

93 changes: 43 additions & 50 deletions src/compositions/bcl-header/header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
- language_modal (object) (default: {})
- light (boolean) (default: false)
- modals (modal[]) (default: [])
- toggler_attributes (drupal attrs)
- icon_path (string) (default: '')
- attributes (drupal attrs)
#}

Expand All @@ -30,6 +32,8 @@
{% set _breadcrumbs = breadcrumbs|default({}) %}
{% set _language_modal = language_modal|default({}) %}
{% set _light = light ?? false %}
{% set _toggler_attributes = toggler_attributes ?: create_attribute() %}
{% set _icon_path = icon_path|default('') %}
{% set _modals = modals|default([]) %}

{% set _site_name_classes = 'bcl-header__site-name' %}
Expand All @@ -38,7 +42,7 @@
{% set attributes = create_attribute() %}
{% endif %}

{% set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant]) %}
{% set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant, 'shadow-sm']) %}

{% if site_name_classes is not empty %}
{% set _site_name_classes = _site_name_classes ~ ' ' ~ site_name_classes %}
Expand All @@ -49,6 +53,33 @@
{% set _project_classes = _project_classes ~ ' light' %}
{% endif %}

{% set toggler_attributes = _toggler_attributes.addClass(['bcl-navbar-toggler', 'd-lg-none'])
.setAttribute('type', 'button')
.setAttribute('data-bs-toggle', 'collapse')
.setAttribute('data-bs-target', '#' ~ navbar_id)
.setAttribute('aria-controls', navbar_id)
.setAttribute('aria-expanded', 'false')
%}

{% set navbar_toggle_button %}
<button
{{ toggler_attributes }}
>
{% include '@oe-bcl/bcl-icon/icon.html.twig' with {
name: 'list',
size: 'fluid',
path: _icon_path,
attributes: create_attribute().addClass(['default-icon']),
} only %}
{% include '@oe-bcl/bcl-icon/icon.html.twig' with {
name: 'x',
size: 'fluid',
path: _icon_path,
attributes: create_attribute().addClass(['active-icon']),
} only %}
</button>
{% endset %}

<header
{{ attributes }}
>
Expand All @@ -70,54 +101,16 @@
{% endfor %}
</a>
{% endif %}
<button
class="navbar-toggler bcl-navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target='#{{ _navbar_id }}'
aria-controls='{{ _navbar_id }}'
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
{{ navbar_toggle_button }}
</div>
</nav>


<!-- project name -->
{% if _project_logo is not empty or _site_name is not empty %}
<div class="{{ _project_classes }}">
<!-- site name -->
<div class="bcl-header__site-name" id="site-name-heading">
<div class="container">
{% if _project_link is not empty %}
<a
href="{{ _project_link }}"
>
{% endif %}
{% if _project_logo is not empty %}
<img
{% if _project_logo.path is not empty %}
src="{{ _project_logo.path }}"
{% endif %}
{% if _project_logo.alt is not empty %}
alt="{{ _project_logo.alt }}"
{% endif %}
{% if _project_logo.classes is not empty %}
class="{{ _project_logo.classes }}"
{% endif %}
/>
{% endif %}
{% if _site_name is not empty %}
<span class="{{ _site_name_classes }}">
{{- _site_name -}}
</span>
{% endif %}
{% if _project_link is not empty %}
</a>
{% endif %}
<span class="h5 py-3-5 border-top-subtle mb-0 d-block">{{ _site_name }}</span>
</div>
</div>
{% endif %}

<!-- navbar -->
{% if _navbar is not empty %}
Expand All @@ -126,15 +119,15 @@
attributes: create_attribute().addClass('bcl-header__navbar collapse navbar-collapse').setAttribute('id', _navbar_id).setAttribute('aria-label', 'Main Navigation'),
}) only %}
{% endif %}

<!-- breadcrumbs -->
{% if _breadcrumbs is not empty %}
<div class="container">
{% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
</div>
{% endif %}
</header>

<!-- breadcrumbs -->
{% if _breadcrumbs is not empty %}
<div class="container">
{% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
</div>
{% endif %}

{% for modal in _modals %}
{% include '@oe-bcl/bcl-modal/modal.html.twig' with modal only %}
{% endfor %}
Expand Down
Loading
Loading