| layouts/partials/nav.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/scripts.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/search.html | ●●●●● patch | view | raw | blame | history |
layouts/partials/nav.html
@@ -1,5 +1,5 @@ <nav class="wrap nav"> <a href="{{ .Site.BaseURL }}"> <a href="{{ .Site.BaseURL }}" class="nav_brand"> <picture> {{- $logos := .Site.Params.logo }} {{- $normalPath := absURL (printf "images/%s" $logos.lightMode) }} @@ -9,11 +9,12 @@ {{ end }} <img srcset = '{{ $normalPath }}' alt = '{{ .Site.Title }} Logo'> </picture> <label class="nav_toggle">Menu</label> </a> {{ if .Site.Params.enableSearch | default true }} {{- partial "search.html" . }} {{ end }} <ul class="nav_body"> <li> {{- partial "search.html" . }} </li> {{- $p := . }} {{- range .Site.Menus.main }} <li class="nav-item"> layouts/partials/scripts.html
@@ -1,3 +1,6 @@ {{- $funcPath := "js/functions.js" }} {{- $functions := resources.Get $funcPath | resources.ExecuteAsTemplate $funcPath . }} {{- $lunrPath := "js/lunr.js" }} {{- $lunr := resources.Get $lunrPath | resources.ExecuteAsTemplate $lunrPath . }} @@ -7,5 +10,7 @@ {{- $mainScriptPath := "js/index.js" }} {{- $main := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }} {{- $bundle := slice $lunr $search $main | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint "sha512" }} {{- $bundle := slice $functions $main | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint "sha512" }} {{- $bundle2 := slice $lunr $search | resources.Concat "js/search.js" | resources.Minify | resources.Fingerprint "sha512" }} <script src = '{{ $bundle.Permalink }}'></script> <script src = '{{ $bundle2.Permalink }}' async></script> layouts/partials/search.html
@@ -1,6 +1,8 @@ {{ if .Site.Params.enableSearch | default true }} <div class="search"> <label for="search" class="search_label"></label> <input type="search" class="search_field" placeholder="{{ .Site.Params.searchPlaceholder }}" id="search"> <input type="search" class="search_field" placeholder="{{ .Site.Params.searchPlaceholder }}" id="search" autocomplete="off"> <div class="search_results"></div> </div> {{ end }}