about summary refs log tree commit diff stats
path: root/frontend/templates
diff options
context:
space:
mode:
authorAlan Pearce2024-05-12 14:55:02 +0200
committerAlan Pearce2024-05-12 15:16:34 +0200
commit42bcd10f010f884bddb0142c31b526faace24186 (patch)
treedc78a09af2e34f84ded4cfbfbd1b0f1ba5b15266 /frontend/templates
parentf769decb676f26210bd6884d33e84ada5898b17c (diff)
downloadsearchix-42bcd10f010f884bddb0142c31b526faace24186.tar.lz
searchix-42bcd10f010f884bddb0142c31b526faace24186.tar.zst
searchix-42bcd10f010f884bddb0142c31b526faace24186.zip
feat: clicking another source re-uses query
Diffstat (limited to 'frontend/templates')
-rw-r--r--frontend/templates/index.gotmpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/frontend/templates/index.gotmpl b/frontend/templates/index.gotmpl
index c5981b3..dbe182a 100644
--- a/frontend/templates/index.gotmpl
+++ b/frontend/templates/index.gotmpl
@@ -14,9 +14,10 @@
         {{- range $key, $value := .Sources }}
           <a
             {{ if eq $.Source.Name $value.Name }}class="current"{{ end }}
-            href="/options/{{ $key }}/search"
-            >{{ $value.Name }}</a
+            href="/options/{{ $key }}/search{{ and $.Query (printf "?query=%s" $.Query) }}"
           >
+            {{- $value.Name -}}
+          </a>
         {{- end }}
       </nav>
     </header>