File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<!-- Include all theme CSS filenames here -->
22{{- $page := . -}}
33
4- {{- $inServerMode := .Site .IsServer -}}
4+ {{- $inServerMode := hugo .IsServer -}}
55{{- $sass := (slice "theme-css/fresh/core.scss") -}}
66{{- $cssOpts := cond ($inServerMode) (dict "enableSourceMap" true) (dict "outputStyle" "compressed") -}}
77
Original file line number Diff line number Diff line change 1+ {{- $inServerMode := hugo.IsServer -}}
2+
3+ < script src ="https://code.jquery.com/jquery-3.6.4.min.js "> </ script >
4+
5+ <!-- Custom JS -->
6+ <!-- All JS files under static/js are included -->
7+ {{- $jsFiles := resources.Match "js/*.js" -}}
8+ {{- if $inServerMode -}}
9+ {{- $js := $jsFiles | resources.Concat "js/bundle.js" }}
10+ < script type ="text/javascript " src ={{ $js.RelPermalink }} > </ script >
11+ {{ else }}
12+ {{- $js := $jsFiles | resources.Concat "js/bundle.js" | resources.Minify }}
13+ < script type ="text/javascript " src ={{ $js.RelPermalink }} > </ script >
14+ {{- end -}}
15+
16+ < script type ="text/javascript "> setupShortcuts ( maxLevel = { { default 2 . Page . Params . shortcutDepth } } ) ; </ script >
17+
18+ {{- if .HasShortcode "youtube" }}
19+ < script type ="text/javascript ">
20+ var buttons = document . getElementsByClassName ( "video-transcript-button" ) ;
21+ var i ;
22+
23+ for ( i = 0 ; i < buttons . length ; i ++ ) {
24+ buttons [ i ] . addEventListener ( "click" , function ( ) {
25+ this . classList . toggle ( "active" ) ;
26+ var content = this . nextElementSibling ;
27+ if ( content . style . display === "block" ) {
28+ content . style . display = "none" ;
29+ } else {
30+ content . style . display = "block" ;
31+ }
32+ } ) ;
33+ }
34+ </ script >
35+ {{ end -}}
36+
37+ {{- if .HasShortcode "mermaid" }}
38+ < script type ="module ">
39+ import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10.1.0/dist/mermaid.esm.min.mjs' ;
40+ mermaid . initialize ( { startOnLoad : true } ) ;
41+ </ script >
42+ {{ end -}}
Original file line number Diff line number Diff line change 11[build .environment ]
2- HUGO_VERSION = " 0.126.1 "
2+ HUGO_VERSION = " 0.152.2 "
You can’t perform that action at this time.
0 commit comments