You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.3 KiB
31 lines
1.3 KiB
{{ define "main" }}
|
|
<!-- The "search" layout renders the search engine -->
|
|
<article class="search article-list">
|
|
<header>
|
|
<h1>{{ .Title }}</h1>
|
|
{{- with .Description }}
|
|
<h4>{{ . }}</h4>
|
|
{{- end }}
|
|
</header>
|
|
{{ .Content }}
|
|
<input id="searchInput" tabindex="0" placeholder="{{ i18n "search_here" }}" autofocus>
|
|
<div id="searchResults">
|
|
</div>
|
|
<div style="display: none;" id="image-store">
|
|
{{- range $_, $file := (slice "en" "fr" "label" "link" "schedule") -}}
|
|
<div id="embedded-svg-{{ $file }}">
|
|
{{- partial (printf "icons/%s.svg" $file) . -}}
|
|
</div>
|
|
{{- end }}
|
|
</div>
|
|
{{- /*
|
|
-- The search index is a separate JSON file (search.searchindex.json),
|
|
-- loaded by /js/search.js. Only the URL of the index and the translated
|
|
-- strings are embedded in the page, in a JSON data block (no inline
|
|
-- script, see the Content Security Policy).
|
|
*/ -}}
|
|
{{- $config := dict "indexUrl" (.OutputFormats.Get "searchindex").RelPermalink "i18n" (dict "published_on" (i18n "published_on") "continue_reading" (i18n "continue_reading")) }}
|
|
<script type="application/json" id="search-config">{{ $config | jsonify | safeJS }}</script>
|
|
<script type="module" src="/js/search.js"></script>
|
|
</article>
|
|
{{ end }}
|
|
|