diff options
author | Alan Pearce | 2024-05-10 12:11:03 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-10 12:11:03 +0200 |
commit | 00eb7541d54e76f8b55fe499d6955786927b207b (patch) | |
tree | 2dde1a8593289b296194c423fdc4bf3872d94954 | |
parent | 42dd2f64f288a7474f356a8ae90e7409b7e38fb6 (diff) | |
download | searchix-00eb7541d54e76f8b55fe499d6955786927b207b.tar.lz searchix-00eb7541d54e76f8b55fe499d6955786927b207b.tar.zst searchix-00eb7541d54e76f8b55fe499d6955786927b207b.zip |
style: highlight current search menu item
-rw-r--r-- | frontend/templates/index.gotmpl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/templates/index.gotmpl b/frontend/templates/index.gotmpl index b46428a..c5981b3 100644 --- a/frontend/templates/index.gotmpl +++ b/frontend/templates/index.gotmpl @@ -12,7 +12,11 @@ <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> |