Skip to content

Commit

Permalink
fix: bold font on active menu item (#88)
Browse files Browse the repository at this point in the history
The menu links are supposed to be bold when we are on the respective link's page. For example, "Posts" is supposed to be bold when we are at domain.tld/posts, but it currently is not. A couple of typos (extra space) is the cause.
  • Loading branch information
conradkun committed Jul 28, 2023
1 parent 0b52b29 commit 88cfd5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li>
<a class="menu-link {{ if or ($currentPage.IsMenuCurrent " main" .)
<a class="menu-link {{ if or ($currentPage.IsMenuCurrent "main" .)
($currentPage.HasMenuCurrent "main" .) }}active{{ end }}" href="{{ .URL }}">
{{ .Name }}
</a>
{{ if .HasChildren }}
<ul>
{{ range .Children }}
<li>
<a class="menu-link {{ if $currentPage.IsMenuCurrent " main" . }}active{{ end }}"
<a class="menu-link {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"
href="{{ .URL }}">
{{ .Name }}
</a>
Expand Down

0 comments on commit 88cfd5d

Please sign in to comment.