mirror of
https://github.com/falsycat/ar.falsy.cat.git
synced 2024-12-27 08:54:51 +00:00
19 lines
935 B
HTML
19 lines
935 B
HTML
<div id="search-container">
|
|
<div id="search-space">
|
|
<input autocomplete="off" id="search-bar" name="search" type="text" aria-label="{{ i18n "search" }}"
|
|
placeholder="{{ i18n "search_for_something" }}" dir="{{ $.Site.Language.LanguageDirection }}">
|
|
<div id="results-container">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{if $.Site.Data.config.enableSemanticSearch}}
|
|
{{ $js := resources.Get "js/semantic-search.js" | resources.ExecuteAsTemplate "js/semantic-search.js" . | resources.Fingerprint "md5" | resources.Minify }}
|
|
<script defer src="{{ $js.Permalink }}"></script>
|
|
{{else}}
|
|
<script src="https://cdn.jsdelivr.net/npm/flexsearch@0.7.21/dist/flexsearch.bundle.js"
|
|
integrity="sha256-i3A0NZGkhsKjVMzFxv3ksk0DZh3aXqu0l49Bbh0MdjE=" crossorigin="anonymous" defer></script>
|
|
{{ $js := resources.Get "js/full-text-search.js" | resources.Fingerprint "md5" | resources.Minify }}
|
|
<script defer src="{{ $js.Permalink }}"></script>
|
|
{{end}}
|
|
|