mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 11:13:06 +00:00
1ad20bd8b2
menu and search
16 lines
No EOL
1.2 KiB
HTML
16 lines
No EOL
1.2 KiB
HTML
<div class="searchbox">
|
|
<label for="search-by"><i class="fas fa-search"></i></label>
|
|
<input data-search-input id="search-by" type="search" placeholder="{{ T "Search-placeholder" }}">
|
|
<span data-search-clear=""><i class="fas fa-times"></i></span>
|
|
</div>
|
|
{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
|
|
<script src="{{"js/lunr.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
|
|
<script src="{{"js/auto-complete.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
|
|
{{ "<!-- hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic: -->" | safeHTML }}
|
|
{{ "<!-- https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72 -->" | safeHTML }}
|
|
<script>
|
|
var index_url={{ "index.json" | relLangURL }};
|
|
var root_url="/";
|
|
var baseUri=root_url.replace(/\/$/, '');
|
|
</script>
|
|
<script src="{{ "js/search.js" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script> |