style: highlight current search menu item
Alan Pearce alan@alanpearce.eu
Fri, 10 May 2024 12:11:03 +0200
1 files changed, 5 insertions(+), 1 deletions(-)
M frontend/templates/index.gotmpl → frontend/templates/index.gotmpl
@@ -12,7 +12,11 @@ <header> <nav> <h1><a href="/">Searchix</a></h1> {{- range $key, $value := .Sources }} - <a href="/options/{{ $key }}/search">{{ $value.Name }}</a> + <a + {{ if eq $.Source.Name $value.Name }}class="current"{{ end }} + href="/options/{{ $key }}/search" + >{{ $value.Name }}</a + > {{- end }} </nav> </header>