Skip to content

Commit

Permalink
Move to <a>
Browse files Browse the repository at this point in the history
  • Loading branch information
cart committed Dec 10, 2024
1 parent e87962d commit 1b5b129
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/macros/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{% set lower_current_path = current_path | lower %}
{% set home = "/" %}
{% if path == "" %}
{% set route = "/"~name~"/" %}
{% set route = "/"~name %}
{% else %}
{% set route = path~"/" %}
{% set route = path %}
{% endif %}
{% set currently_home = path == home and lower_current_path == home %}
{% set is_active = lower_current_path is starting_with("/"~name | lower) or currently_home %}
Expand All @@ -13,7 +13,7 @@
{% set class = class~" main-menu__link--active" %}
{% endif %}
<li class="main-menu__entry {{ extra_class }}">
<a href="{{ route | lower }}" class="{{ class }}">
<a href="{{ route | lower }}/" class="{{ class }}">
<span>{{ name }}</span>
</a>
</li>
Expand Down

0 comments on commit 1b5b129

Please sign in to comment.