diff options
Diffstat (limited to 'internal/components/search.templ')
-rw-r--r-- | internal/components/search.templ | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/internal/components/search.templ b/internal/components/search.templ deleted file mode 100644 index 7076772..0000000 --- a/internal/components/search.templ +++ /dev/null @@ -1,44 +0,0 @@ -package components - -templ Search(tdata TemplateData, r ResultData) { - <form id="search" role="search"> - <fieldset> - <legend id="legend"> - <h2>{ sourceNameAndType(tdata.Source) } search</h2> - </legend> - <input - id="query" - aria-labelledby="legend" - name="query" - type="search" - value={ r.Query } - autofocus - spellcheck="false" - autocapitalize="none" - /> - <button>Search</button> - </fieldset> - </form> -} - -templ SearchPage(tdata TemplateData, r ResultData) { - @Page(tdata) { - <p> - Search Nix packages and options from <a href="https://nixos.org">NixOS</a>, <a href="https://github.com/LnL7/nix-darwin">nix-darwin</a> - and <a href="https://github.com/nix-community/home-manager">home-manager</a> - </p> - @script(tdata.Assets.ByPath["/static/search.js"]) - @Search(tdata, r) - <section id="results" role="list" aria-label="search results"> - { children... } - </section> - <dialog id="dialog"> - <button autofocus>Close</button> - </dialog> - <noscript> - <p class="notice"> - Everything should work fine without JavaScript. If that is not the case, <a href="https://todo.sr.ht/~alanpearce/searchix">report an issue</a> - </p> - </noscript> - } -} |