1- <!doctype html>
2- < html lang ="{{ .Site.Language.Lang }} " class ="{{.Params.class}} no-js ">
3- < head >
4- {{ partial "head.html" . }}
5- </ head >
6- < body class ="td-search {{- if ne (lower .Params.cid) "" -}}{{- printf " cid-%s" (lower .Params.cid) -}}{{- end -}}">
7- < header >
8- {{ partial "navbar.html" . }}
9- {{ block "announcement" . }}
10- {{ partial "announcement.html" . }}
11- {{ end }}
12- {{ block "hero" . }}
13- < section class ="header-hero filler ">
14- </ section >
15- {{ block "hero-more" . }}{{ end }}
16- {{ end }}
17- </ header >
18- < div class ="td-outer ">
19- < main role ="main " class ="td-main ">
20- < section class ="row td-search-result ">
21- < div class ="col-12 col-md-4 offset-md-2 ">
22- < form class ="td-sidebar__search d-flex align-items-center ">
23- {{ partial "search-input.html" . }}
24- </ form >
25- </ div >
26- < div class ="col-12 col-md-8 offset-md-2 ">
27- {{ if .Site.Params.gcs_engine_id }}
28- < script >
29- ( function ( ) {
30- var cx = '{{ . }}' ;
31- var gcse = document . createElement ( 'script' ) ;
32- gcse . type = 'text/javascript' ;
33- gcse . async = true ;
34- gcse . src = 'https://cse.google.com/cse.js?cx=' + cx ;
35- var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
36- s . parentNode . insertBefore ( gcse , s ) ;
37- } ) ( ) ;
38- </ script >
39- < gcse:searchresults-only > </ gcse:searchresults-only >
40- {{ else if .Site.Params.customSearch }}
41- < script src ="/pagefind/pagefind-ui.js "> </ script >
42- < gcse:searchresults-only linktarget ="_parent ">
43- < div id ="search " style ="display:none "> </ div >
44- </ gcse:searchresults-only >
45- {{ end }}
46- </ div >
47- </ section >
48- </ main >
49- </ div >
50- {{ partial "footer.html" . }}
51- {{ partialCached "scripts.html" . }}
52- </ body >
53- </ html >
1+ {{ define "main" }}
2+ <!--From shortcodes/site-searchbar.html which is used in the home page-->
3+ < div class ="col-sm-6 col-md-6 col-lg-6 mx-auto py-3 ">
4+ {{partial "search-input" .}}
5+ </ div >
6+ < section class ="row td-search-result ">
7+ < div class ="col-12 col-md-8 offset-md-2 ">
8+ < h2 class ="ml-4 "> {{ .Title }}</ h2 >
9+ {{ with .Site.Params.gcs_engine_id }}
10+ < script >
11+ ( function ( ) {
12+ var cx = '{{ . }}' ;
13+ var gcse = document . createElement ( 'script' ) ;
14+ gcse . type = 'text/javascript' ;
15+ gcse . async = true ;
16+ gcse . src = 'https://cse.google.com/cse.js?cx=' + cx ;
17+ var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
18+ s . parentNode . insertBefore ( gcse , s ) ;
19+ } ) ( ) ;
20+ </ script >
21+ < gcse:searchresults-only > </ gcse:searchresults-only >
22+ {{ end }}
23+ {{ if .Site.Params.customSearch }}
24+ < script src ="/pagefind/pagefind-ui.js "> </ script >
25+ < gcse:searchresults-only linktarget ="_parent ">
26+ < div id ="search " style ="display:none "> </ div >
27+ </ gcse:searchresults-only >
28+ {{ end }}
29+ </ div >
30+ </ section >
31+
32+ {{ end }}
0 commit comments