mirror of
https://gitea.com/gitea/theme.git
synced 2026-05-04 21:12:36 +08:00
Add optional navbar search (for docs.gitea.io) (#112)
Reviewed-on: https://gitea.com/gitea/theme/pulls/112 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: John Olheiser <john+gitea@jolheiser.com> Co-authored-by: Norwin <noerw@noreply.gitea.io> Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
<a class="navbar-item" href="{{ .Site.BaseURL }}">
|
||||
<img src="{{ .Site.BaseURL }}images/gitea.png" alt="{{ .Site.Title }}">
|
||||
</a>
|
||||
{{ if eq .Site.Params.search "nav" }}
|
||||
<!-- this works together with assets/js/search.js from the docs.gitea.io -->
|
||||
<form action="{{ "search" | absLangURL }}">
|
||||
<input id="search-query" name="s" placeholder="Search" />
|
||||
</form>
|
||||
{{ end }}
|
||||
<span class="navbar-burger burger" data-target="navMenu" aria-label="menu" aria-expanded="false">
|
||||
<span></span>
|
||||
<span></span>
|
||||
|
||||
Reference in New Issue
Block a user