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
4 changes: 2 additions & 2 deletions themes/custom/az_barrio/templates/layout/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
{% if page.navigation %}
<div class="row d-none d-lg-flex">
<div class="col-lg">
<nav id="navbar-top" class="navbar navbar-expand{{ az_navbar ? ' navbar-az' }}">
<nav id="navbar-top" class="navbar navbar-expand{{ az_navbar ? ' navbar-az' }}" aria-label="{{ 'Primary navigation'|t }}">
{{ page.navigation }}
</nav>
</div>
Expand Down Expand Up @@ -267,7 +267,7 @@

<footer class="site-footer">
{% if page.footer or page.footer_sub or footer_logo %}
<div class="text-bg-warm-gray py-5" role="contentinfo">
<div class="text-bg-warm-gray py-5">
{% if page.footer or footer_logo %}
<section{{ attributes.addClass(classes) }}>
<div class="container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
{% if items %}
{% if menu_level == 0 %}
<ul{{ attributes.addClass('navbar-nav flex-lg-row') }}>
{% else %}
<div class="dropdown-menu">
{% endif %}
{% else %}
<ul class="dropdown-menu">
{% endif %}
{% for item in items %}
{%
set classes = [
Expand All @@ -46,6 +46,8 @@
%}
{% if menu_level == 0 %}
<li{{ item.attributes.addClass(classes) }}>
{% else %}
<li>
{% endif %}
{%
set link_classes = [
Expand All @@ -63,14 +65,8 @@
{% else %}
{{ link(item.title, item.url, {'class': link_classes}) }}
{% endif %}
{% if menu_level == 0 %}
</li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If both if/else cases result in <li>, if-else isn't needed here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'm wondering if the conditional </ul> following this is also now not needed.

{% endif %}
{% endfor %}
{% if menu_level == 0 %}
</ul>
{% else %}
</div>
{% endif %}
{% endif %}
{% endmacro %}
Loading