mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-19 09:03:02 -04:00
✨ Add site search powered by Fuse.js
This commit is contained in:
@@ -17,14 +17,17 @@
|
||||
<div class="absolute flex self-center">
|
||||
<a
|
||||
class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 dark:bg-neutral-600 focus:translate-y-0"
|
||||
href="#maincontent"
|
||||
href="#main-content"
|
||||
><span class="font-bold ltr:pr-2 rtl:pl-2 text-primary-600 dark:text-primary-400"
|
||||
>↓</span
|
||||
>{{ i18n "header.skip_to_main" }}</a
|
||||
>
|
||||
</div>
|
||||
{{- partial "header.html" . -}}
|
||||
<main id="maincontent" class="grow">{{- block "main" . }}{{- end }}</main>
|
||||
<main id="main-content" class="grow">{{- block "main" . }}{{- end }}</main>
|
||||
{{ if .Site.Params.enableSearch | default false }}
|
||||
{{- partial "search.html" . -}}
|
||||
{{ end }}
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{- range .Site.RegularPages -}}
|
||||
{{ $section := .Site.GetPage "section" .Section }}
|
||||
{{- $.Scratch.Add "index" (dict "date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long")) "title" .Title "section" $section.Title "summary" .Summary "content" (.Plain | safeJS) "permalink" .Permalink) -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
||||
Reference in New Issue
Block a user