Stop including hugo theme in our repo and use hugo modules instead
We have made a few modifications to the original hugo learn theme, some of
which are not easy to split into separate files so for now I'm just including
the files of the learn theme that have our customizations so that they override
the original ones from the theme.
--- a/Dockerfile Wed Apr 27 07:52:28 2022 -0500
+++ b/Dockerfile Wed Apr 27 22:09:26 2022 -0500
@@ -22,7 +22,7 @@
FROM docker.io/debian:bullseye as hugo-build
- apt-get install -y hugo && \
+ apt-get install -y golang hugo && \ rm -rf /var/lib/apt/lists
--- a/hugo/config.toml Wed Apr 27 07:52:28 2022 -0500
+++ b/hugo/config.toml Wed Apr 27 22:09:26 2022 -0500
@@ -1,9 +1,13 @@
baseURL = "https://pidgin.im/"
title = "Pidgin, the universal chat client"
+ # the following is the theme that we use, it gets automatically placed + # in the themes directory + path = "github.com/matcornic/hugo-theme-learn" currentVersion = "2.14.8"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/go.mod Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,5 @@
+module keep.imfreedom.org/pidgin/nest +require github.com/matcornic/hugo-theme-learn v0.0.0-20190128010848-7f5e927f0c5c // indirect --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/go.sum Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,4 @@
+github.com/matcornic/hugo-theme-learn v0.0.0-20190128010848-7f5e927f0c5c h1:MbSvYqjUn2roCsqGN0p4qjG2lFoO8WCIuDa1qbajSEk= +github.com/matcornic/hugo-theme-learn v0.0.0-20190128010848-7f5e927f0c5c/go.mod h1:YoToDcvQxmAFhpEuapKUysBDEBckqDEssqTrmeZ2+uY= +github.com/matcornic/hugo-theme-learn v0.0.0-20211028190410-e817f53d690d h1:p7ktiW/GnHccjB9oO5YGY7us5v/oHmkyF0C7EDZFM3s= +github.com/matcornic/hugo-theme-learn v0.0.0-20211028190410-e817f53d690d/go.mod h1:YoToDcvQxmAFhpEuapKUysBDEBckqDEssqTrmeZ2+uY= --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/404.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,73 @@
+<html lang="{{ .Page.Language | default "en" }}" class="js csstransforms3d"> + {{ partial "meta.html" . }} + {{ partial "favicon.html" . }} + {{ .Scratch.Add "title" "" }} + {{ if eq .Site.Data.titles .Title }} + {{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }} + {{ .Scratch.Set "title" .Title }} + <title>{{ .Scratch.Get "title" }}</title> + {{ $assetBusting := cond (hugo.IsProduction) "" (print "?" now.Unix) }} + <link href="{{ "css/nucleus.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/fontawesome-all.min.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/hybrid.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/perfect-scrollbar.min.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/horsey.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/theme.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/hugo-theme.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + {{ with .Site.Params.themeVariant }} + <link href="{{ (printf "css/theme-%s.css" .) | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <style type="text/css"> + :root #header+#content>#left>#rlblock_left { + display: none !important; + p, li, ul { text-align: center + {{ partial "custom-header.html" . }} +<body class="" data-url="/"> + <section id="body" style="margin-left:0px;"> + <div id="overlay"></div> + <a href='{{ "" | relLangURL }}'>{{ T "Go-to-homepage" }}</a> + <img src='{{ "/images/gopher-404.jpg" | relURL }}' style="width:50%" alt="Page not found!" /> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/_default/list.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,7 @@
+{{ partial "header.html" . }} +{{ partial "footline.html" . }} +{{ partial "footer.html" . }} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/_default/single.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,7 @@
+{{ partial "header.html" . }} +{{ partial "footline.html" . }} +{{ partial "footer.html" . }} --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/index.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,38 @@
+{{ partial "header.html" . }} +<span id="sidebar-toggle-span"> + <a href="#" id="sidebar-toggle" data-sidebar-toggle=""> + <i class="fas fa-bars"></i> navigation +{{ if .Site.Home.Content }} + {{ .Site.Home.Content }} + {{ if eq .Site.Language.Lang "fr" }} + <h1>Personaliser la page d'accueil</h1> + Le site fonctionne. Ne pas oublier de personaliser cette page avec votre propre contenu. 3 manières de faire : + <li><b>1. </b> Créer un fichier _index.md dans le dossier <b>content</b> et le remplir de Markdown</li> + <li><b>2. </b> Créer un fichier index.html dans le dossier <b>static</b> et le remplir de code HTML</li> + <li><b>3. </b> Configurer le serveur http pour rediriger automatiquement la homepage vers la page de votre choix dans le site</li> + <h1>Customize your own home page</h1> + The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices : + <li><b>1. </b> Create an _index.md document in <b>content</b> folder and fill it with Markdown content</li> + <li><b>2. </b> Create an <b>index.html</b> file in the <b>static</b> folder and fill the file with HTML content</li> + <li><b>3. </b> Configure your server to automatically redirect home page to one your documentation page</li> +{{ partial "footline.html" . }} +{{ partial "footer.html" . }} --- a/hugo/layouts/partials/favicon.html Wed Apr 27 07:52:28 2022 -0500
+++ b/hugo/layouts/partials/favicon.html Wed Apr 27 22:09:26 2022 -0500
@@ -1,3 +1,1 @@
-<link rel="icon" type="image/png" href="/images/pidgin-circle-16.png" sizes="16x16">
-<link rel="icon" type="image/png" href="/images/pidgin-circle-32.png" sizes="32x32">
-<link rel="icon" type="image/png" href="/images/pidgin-circle-96.png" sizes="96x96">
\ No newline at end of file
+<link rel="icon" href="{{"images/favicon.png" | relURL}}" type="image/png"> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/partials/footer.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,73 @@
+ {{/* TODO: Remove disgusting conditional tag spanning file */}} + {{ if .Params.chapter }} + </div> <!-- end chapter--> + {{ partial "custom-comments.html" . }} + <!-- Next prev page --> + {{ $currentNode := . }} + {{ template "menu-nextprev" dict "menu" .Site.Home "currentnode" $currentNode }} + {{ define "menu-nextprev" }} + {{ $currentNode := .currentnode }} + {{ if ne .menu.Params.hidden true }} + {{ if hasPrefix $currentNode.RelPermalink .menu.RelPermalink }} + {{ $currentNode.Scratch.Set "NextPageOK" "OK" }} + {{ $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") }} + {{ if eq ($currentNode.Scratch.Get "NextPageOK") "OK" }} + {{ $currentNode.Scratch.Set "NextPageOK" nil }} + {{ $currentNode.Scratch.Set "nextPage" .menu }} + {{ $currentNode.Scratch.Set "prevPageTmp" .menu }} + {{ $currentNode.Scratch.Set "pages" .menu.Pages }} + {{ $currentNode.Scratch.Set "pages" .menu.Sections }} + {{ else if .menu.Sections }} + {{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }} + {{ $pages := ($currentNode.Scratch.Get "pages") }} + {{ range $pages.ByWeight }} + {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} + {{ $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }} + {{ with ($.Scratch.Get "prevPage") }} + <a class="nav nav-prev" href="{{ .RelPermalink }}" title="{{ .Title }}"> <i class="fa fa-chevron-left"></i></a> + {{ with ($.Scratch.Get "nextPage") }} + <a class="nav nav-next" href="{{ .RelPermalink }}" title="{{ .Title }}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a> + <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"> + <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div> + <script src="{{ "js/clipboard.min.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script src="{{ "js/perfect-scrollbar.min.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script src="{{ "js/perfect-scrollbar.jquery.min.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script src="{{ "js/jquery.sticky.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script src="{{ "js/html5shiv-printshiv.min.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script src="{{ "js/highlight.pack.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script>hljs.initHighlightingOnLoad();</script> + <script src="{{ "js/modernizr.custom.71422.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script src="{{ "js/learn.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + <script src="{{ "js/hugo-learn.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> + {{ partial "custom-footer.html" . }} --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/partials/header.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,125 @@
+<html lang="{{ .Page.Language | default "en" }}" class="js csstransforms3d"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + {{ partial "meta.html" . }} + {{ partial "favicon.html" . }} + <title>{{ .Title }} :: {{ .Site.Title }}</title> + {{ $assetBusting := cond (hugo.IsProduction) "" (print "?" now.Unix) }} + <link href="{{ "css/nucleus.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/fontawesome-all.min.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/hybrid.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/perfect-scrollbar.min.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/auto-complete.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/theme.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <link href="{{ "css/hugo-theme.css" | relURL }}{{ $assetBusting }}" rel="stylesheet"> + {{ with .Site.Params.themeVariant }} + <link href="{{ (printf "css/theme-%s.css" .) | relURL }}{{ $assetBusting }}" rel="stylesheet"> + <script src="{{ "js/jquery-2.x.min.js"| relURL }}{{ $assetBusting }}"></script> + <style type="text/css"> + :root #header + #content > #left > #rlblock_left{ + display:none !important; + {{ if or .Params.disableInlineCopyToClipBoard .Site.Params.disableInlineCopyToClipBoard }} + var isCodeToClipboardEnabled = false + var isCodeToClipboardEnabled = true + {{ partial "custom-header.html" . }} +<body class="" data-url="{{ .RelPermalink }}"> + {{ partial "menu.html" . }} + <div id="overlay"></div> + <div class="padding highlightable"> + {{ if and (or .IsPage .IsSection) .Site.Params.editURL }} + <div id="top-github-link"> + title='{{ T "Edit-this-page" }}' + href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" + <i class="fas fa-code-branch"></i> + <span id="top-github-link-text">{{ T "Edit-this-page" }}</span> + {{ $toc := (and (not .Params.disableToc) (not .Params.chapter)) }} + <div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"> + <span id="sidebar-toggle-span"> + <a href="#" id="sidebar-toggle" data-sidebar-toggle=""> + <i class="fas fa-bars"></i> + <span id="toc-menu"><i class="fas fa-list-alt"></i></span> + {{ $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }} + {{ if $showBreadcrumb }} + {{ template "breadcrumb" dict "page" . "value" .Title }} + {{ if .Params.chapter }} + {{ if and (not .IsHome) (not .Params.chapter) }} + {{ if gt .WordCount 400 }} +{{ define "breadcrumb" }} + {{ $parent := .page.Parent }} + {{ $value := (printf "<a href='%s'>%s</a> > %s" $parent.RelPermalink $parent.Title .value) }} + {{ template "breadcrumb" dict "page" $parent "value" $value }} + {{ .value | safeHTML }} --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/partials/menu.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,152 @@
+<nav id="sidebar" class="{{ if $.Site.Params.showVisitedLinks }}showVisitedLinks{{ end }}"> + {{ $currentNode := . }} + {{ $showvisitedlinks := .Site.Params.showVisitedLinks }} + <div id="header-wrapper"> + {{ partial "logo.html" . }} + {{ if not .Site.Params.disableSearch }} + {{ partial "search.html" . }} + <div class="highlightable"> + {{ $orderByTitle := (eq .Site.Params.ordersectionsby "title") }} + {{ $sections := cond $orderByTitle .Site.Home.Sections.ByTitle .Site.Home.Sections.ByWeight }} + {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} + {{ $disableShortcutsTitle := .Site.Params.DisableShortcutsTitle }} + {{ with .Site.Menus.shortcuts }} + <section id="shortcuts"> + {{ if not $disableShortcutsTitle }}<h3>{{ T "Shortcuts-Title" }}</h3>{{ else }}<br />{{ end }} + {{ range sort . "Weight" }} + {{ .Pre }}<a class="padding" {{ printf "href=%q" .URL | safeHTMLAttr }}>{{ safeHTML .Name }}</a>{{ .Post }} + {{ if or .Site.IsMultiLingual $showvisitedlinks }} + <section id="prefooter"> + {{ if and .Site.IsMultiLingual (not .Site.Params.DisableLanguageSwitchingButton) }} + <i class="fas fa-language fa-fw"></i> + <div class="select-style"> + <select id="select-language" onchange="location = this.value;"> + {{ $siteLanguages := .Site.Languages }} + {{ $pageLang := .Page.Lang }} + {{ range .Page.AllTranslations }} + {{ $translation := . }} + {{ range $siteLanguages }} + {{ if eq $translation.Lang .Lang }} + {{ $selected := false }} + id="{{ $translation.Language }}" + value="{{ $translation.RelPermalink }}" + {{ if eq $pageLang .Lang }}selected{{ end }} + >{{ .LanguageName }}</option> + <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="255px" height="255px" viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve"> + <g id="arrow-drop-down"> + <polygon points="0,63.75 127.5,191.25 255,63.75 " /> + {{ if $showvisitedlinks }} + <li><a class="padding" href="#" data-clear-history-toggle=""><i class="fas fa-history fa-fw"></i> {{ T "Clear-History" }}</a></li> + {{ partial "menu-footer.html" . }} +{{ define "section-tree-nav" }} + {{ $showvisitedlinks := .showvisitedlinks }} + {{ $currentNode := .currentnode }} + {{ safeHTML .Params.head }} + <li data-nav-id="{{ .RelPermalink }}" title="{{ .Title }}" class="dd-item + {{- if .IsAncestor $currentNode }} parent{{ end -}} + {{- if and (eq .File.UniqueID $currentNode.File.UniqueID) }} active{{ end -}} + {{- if .Params.alwaysopen }} parent{{ end }}"> + <a href="{{ .RelPermalink }}"> + {{ safeHTML .Params.Pre }}{{ or .Params.menuTitle .LinkTitle .Title }}{{ safeHTML .Params.Post }} + {{ if $showvisitedlinks }} + <i class="fas read-icon"></i> + {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} + {{ if ne $numberOfPages 0 }} + {{ $currentNode.Scratch.Set "pages" .Pages }} + {{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }} + {{ $pages := ($currentNode.Scratch.Get "pages") }} + {{ if eq .Site.Params.ordersectionsby "title" }} + {{ range $pages.ByTitle }} + {{ if and .Params.hidden (not $.showhidden) }} + {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} + {{ range $pages.ByWeight }} + {{ if and .Params.hidden (not $.showhidden) }} + {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} + {{ if not .Params.Hidden }} + data-nav-id="{{ .RelPermalink }}" + class="dd-item {{ if eq .File.UniqueID $currentNode.File.UniqueID }}active{{ end }}" + <a href="{{ .RelPermalink }}"> + {{ safeHTML .Params.Pre }} + {{ or .Params.menuTitle .LinkTitle .Title }} + {{ safeHTML .Params.Post }} + {{ if $showvisitedlinks }} + <i class="fas fa-check read-icon"></i> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/partials/search.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,16 @@
+ <label for="search-by"><i class="fas fa-search"></i></label> + <input data-search-input id="search-by" type="search" placeholder="{{ T "Search-placeholder" }}"> + <span data-search-clear=""><i class="fas fa-times"></i></span> +{{ $assetBusting := cond (hugo.IsProduction) "" (print "?" now.Unix) }} +<script type="text/javascript" src="{{ "js/lunr.min.js" | relURL }}{{ $assetBusting }}"></script> +<script type="text/javascript" src="{{ "js/auto-complete.js" | relURL }}{{ $assetBusting }}"></script> +<script type="text/javascript"> + {{ if .Site.IsMultiLingual }} + var baseurl = "{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}"; + var baseurl = "{{ .Site.BaseURL }}"; +<script type="text/javascript" src="{{ "js/search.js" | relURL }}{{ $assetBusting }}"></script> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/attachments.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,41 @@
+<section class="attachments {{ with .Get "style" }}{{ . }}{{ end }}"> + <i class="fas fa-paperclip" aria-hidden="true"></i> + {{ with .Get "title" }} + {{ T "Attachments-label" }} + {{ if eq .Page.File.BaseFileName "index" }} + {{ $.Scratch.Add "filesName" "files" }} + {{ $.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName) }} + <div class="attachments-files"> + {{ range (readDir (printf "./content/%s%s" .Page.File.Dir ($.Scratch.Get "filesName")) ) }} + {{ $fileDir := replace $.Page.File.Dir "\\" "/" }} + {{ if ($.Get "pattern") }} + {{ if (findRE ($.Get "pattern") .Name) }} + <a href="{{ (printf "%s%s/%s" $fileDir ($.Scratch.Get "filesName") .Name) | relURL }}" > + ({{ div .Size 1024 }} ko) + <a href="{{ (printf "%s%s/%s" $fileDir ($.Scratch.Get "filesName") .Name) | relURL }}" > + ({{ div .Size 1024 }} ko) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/button.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,13 @@
+<a {{ with .Get "href" }} href="{{ . }}" target="_blank" {{ end }} class="btn btn-default"> + {{ $icon := .Get "icon" }} + {{ $iconposition := .Get "icon-position" }} + {{ if or (not ($iconposition)) (eq $iconposition "left") }} + <i class="{{ $icon }}"></i> + {{ if and ($icon) (eq $iconposition "right") }} + <i class="{{ $icon }}"></i> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/children.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,88 @@
+{{ $showhidden := .Get "showhidden" }} +{{ $style := .Get "style" | default "li" }} +{{ $depth := .Get "depth" | default 1 }} +{{ $withDescription := .Get "description" | default false }} +{{ $sortTerm := .Get "sort" | default "Weight" }} +<ul class="children children-{{ $style }}"> + {{ .Scratch.Set "pages" .Page.Pages }} + {{ if .Page.Sections }} + {{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }} + {{ $pages := (.Scratch.Get "pages") }} + {{ if eq $sortTerm "Weight" }} + {{ template "childs" dict "menu" $pages.ByWeight "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm }} + {{ else if eq $sortTerm "Name" }} + {{ template "childs" dict "menu" $pages.ByTitle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm }} + {{ else if eq $sortTerm "PublishDate" }} + {{ template "childs" dict "menu" $pages.ByPublishDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm }} + {{ else if eq $sortTerm "Date" }} + {{ template "childs" dict "menu" $pages.ByDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm }} + {{ else if eq $sortTerm "Length" }} + {{ template "childs" dict "menu" $pages.ByLength "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm }} + {{ template "childs" dict "menu" $pages "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm }} + {{ if and .Params.hidden (not $.showhidden) }} + {{ if hasPrefix $.style "h" }} + {{ $num := sub ( int (trim $.style "h") ) 1 }} + {{ $numn := add $num $.count }} + {{ (printf "<h%d>" $numn)|safeHTML }} + <a href="{{ .URL }}" >{{ .Title }}</a> + {{ (printf "</h%d>" $numn)|safeHTML }} + {{ (printf "<%s>" $.style)|safeHTML }} + <a href="{{ .URL }}" >{{ .Title }}</a> + {{ (printf "</%s>" $.style)|safeHTML }} + <p>{{ .Description }}</p> + {{ if lt $.count $.depth }} + {{ if eq $.style "li" }} + {{ $.Page.Scratch.Set "pages" .Pages }} + {{ $.Page.Scratch.Set "pages" (.Pages | union .Sections) }} + {{ $pages := ($.Page.Scratch.Get "pages") }} + {{ if eq $.sortTerm "Weight" }} + {{ template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm }} + {{ else if eq $.sortTerm "Name" }} + {{ template "childs" dict "menu" $pages.ByTitle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm }} + {{ else if eq $.sortTerm "PublishDate" }} + {{ template "childs" dict "menu" $pages.ByPublishDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm }} + {{ else if eq $.sortTerm "Date" }} + {{ template "childs" dict "menu" $pages.ByDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm }} + {{ else if eq $.sortTerm "Length" }} + {{ template "childs" dict "menu" $pages.ByLength "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm }} + {{ template "childs" dict "menu" $pages "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm }} + {{ if eq $.style "li" }} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/expand.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,16 @@
+ <div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fas fa-chevron-down' : 'fas fa-chevron-right';});});"> + <i style="font-size:x-small;" class="fas fa-chevron-right"></i> + {{ $expandMessage := T "Expand-title" }} + {{ if .IsNamedParams }} + {{ .Get "default" | default $expandMessage }} + {{ .Get 0 | default $expandMessage }} + <div class="expand-content" style="display: none;"> + {{ .Inner | safeHTML }} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/mermaid.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,3 @@
+<div class="mermaid" align='{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}'> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/ref.html Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,14 @@
+{{- if in (.Get 0) "/_index.md" -}} + {{- $paths := (split (.Get 0) "_index.md") -}} + {{- $pagepath := index $paths 0 -}} + {{- $anchor := index $paths 1 -}} + {{- with .Site.GetPage "section" (trim $pagepath "/") -}} + {{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}} + {{- with .Site.GetPage "section" (.Get 0) }} + {{- .Get 0 | relref .Page -}} --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/static/css/hugo-theme.css Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,254 @@
+/* Insert here special css for hugo theme, on top of any other imported css */ + font-size: 13px !important; + padding: 15px !important; +#TableOfContents > ul > li > ul > li > ul li { +#TableOfContents > ul > li > a { + font-weight: bold; padding: 0 18px; margin: 0 2px; +#TableOfContents > ul > li > ul > li > a { +#TableOfContents > ul > li > ul > li > ul > li > ul > li > ul > li { + font-size: 16px !important; + color: #323232 !important; +#body a.highlight, #body a.highlight:hover, #body a.highlight:focus { +#body a.highlight:after { + background-color: #0082a7; /*#CE3B2F*/ + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; +#body a.highlight:hover:after, #body a.highlight:focus:after { + background-color: rgba(246, 246, 246, 0.97); + border: thin solid #ECECEC; + border-right: thin solid #DAD8D8 !important; + padding-right: 1rem !important; + margin-right: 0.5rem !important; + border-right: thin solid #DAD8D8 !important; + padding-right: 0.5rem !important; + margin-right: 1rem !important; + display: inline-block !important; + padding: 6px 12px !important; + margin-bottom: 0 !important; + font-size: 14px !important; + font-weight: normal !important; + line-height: 1.42857143 !important; + text-align: center !important; + white-space: nowrap !important; + vertical-align: middle !important; + -ms-touch-action: manipulation !important; + touch-action: manipulation !important; + cursor: pointer !important; + -webkit-user-select: none !important; + -moz-user-select: none !important; + -ms-user-select: none !important; + user-select: none !important; + background-image: none !important; + border: 1px solid transparent !important; + border-radius: 4px !important; + -webkit-transition: all 0.15s !important; + -moz-transition: all 0.15s !important; + transition: all 0.15s !important; + /*outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px;*/ + outline: none !important; + color: #2b2b2b !important; + text-decoration: none !important; + color: #333 !important; + background-color: #fff !important; + border-color: #ccc !important; + color: #fff !important; + background-color: #9e9e9e !important; + border-color: #9e9e9e !important; + background-image: none !important; +h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { +/* Redfines headers style */ +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { + line-height: 110% !important; + margin: 2.5rem 0 1.5rem 0; + line-height: 110% !important; + line-height: 110% !important; + margin: 1.5rem 0 0.75rem 0; + line-height: 110% !important; + margin: 1rem 0 0.2rem 0; + line-height: 110% !important; + margin: 0.5rem 0 0.2rem 0; + font-weight: 300 !important; +.select-style svg:hover { + background: transparent; + background-image: none; + -webkit-appearance: none; +.select-style select:focus { +@media only all and (max-width: 47.938em) { + #breadcrumbs .links, #top-github-link-text { + box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.1); \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/static/css/theme.css Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,1116 @@
+#top-github-link, #body #breadcrumbs { + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -o-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); +.button, .button-secondary { +.button:active, .button-secondary:active { + font-family: 'Novacento Sans Wide'; + src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot"); + src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff2") format("woff2"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff") format("woff"), url("../fonts/Novecentosanswide-UltraLight-webfont.ttf") format("truetype"), url("../fonts/Novecentosanswide-UltraLight-webfont.svg#novecento_sans_wideultralight") format("svg"); + font-family: 'Work Sans'; + src: url("../fonts/Work_Sans_300.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_300.woff") format("woff"), url("../fonts/Work_Sans_300.woff2") format("woff2"), url("../fonts/Work_Sans_300.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_300.ttf") format("truetype"); + font-family: 'Work Sans'; + src: url("../fonts/Work_Sans_500.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_500.woff") format("woff"), url("../fonts/Work_Sans_500.woff2") format("woff2"), url("../fonts/Work_Sans_500.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_500.ttf") format("truetype"); +@media only all and (min-width: 48em) and (max-width: 59.938em) { +@media only all and (max-width: 47.938em) { + border: 1px solid #eaeaea; +.default-animation, #header #logo-svg, #header #logo-svg path, #sidebar, #sidebar ul, #body, #body .padding, #body .nav { + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + transition: all 0.5s ease; + font-weight: 300 !important; + border: 1px solid #ddd; +textarea, input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], select[multiple=multiple] { + background-color: white; + border: 1px solid #ddd; + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); +textarea:hover, input[type="email"]:hover, input[type="number"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="tel"]:hover, input[type="text"]:hover, input[type="url"]:hover, input[type="color"]:hover, input[type="date"]:hover, input[type="datetime"]:hover, input[type="datetime-local"]:hover, input[type="month"]:hover, input[type="time"]:hover, input[type="week"]:hover, select[multiple=multiple]:hover { +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + box-shadow: inset 0 1px 3px rgba(0,0,0,.06),0 0 5px rgba(0,169,218,.7) + border-bottom: 4px solid #9c6fb6; +#header #logo-svg path { + border: 1px solid #915eae; + color: rgba(255, 255, 255, 0.8); + color: rgba(255, 255, 255, 0.6); + color: rgba(255, 255, 255, 0.9); + background: transparent; + padding: 0 25px 0 30px; +.searchbox input::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.6); +.searchbox input::-moz-placeholder { + color: rgba(255, 255, 255, 0.6); +.searchbox input:-moz-placeholder { + color: rgba(255, 255, 255, 0.6); +.searchbox input:-ms-input-placeholder { + color: rgba(255, 255, 255, 0.6); +@media only all and (max-width: 47.938em) { + background-color: #322A38; + color: rgba(204, 204, 204, 0.6); + border-bottom: 1px solid #2a232f; + color: rgba(204, 204, 204, 0.6); + color: #d9d9d9 !important; + color: #767676 !important; + color: #767676 !important; +#sidebar h5 + ul.topics { +#sidebar h5.parent + ul.topics, #sidebar h5.active + ul.topics { +#sidebar ul.searched a { +#sidebar ul.searched .search-match a { +#sidebar ul.searched .search-match a:hover { +#sidebar ul.topics.searched ul { +#sidebar ul.topics ul ul { +#sidebar ul.topics li.parent ul, #sidebar ul.topics > li.active ul { +#sidebar ul.topics > li > a { +#sidebar ul.topics > li > a b { +#sidebar ul.topics > li > a .fa { +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { +#sidebar ul li.active > a { + color: #767676 !important; +#sidebar ul li.visited + span { + text-overflow: ellipsis; +#sidebar ul li.visited > a .read-icon { + margin: 0 0 1.563rem 0; +#body img, #body .video-container { +#body img.border, #body .video-container.border { + border: 2px solid #e6e6e6 !important; +#body img.shadow, #body .video-container.shadow { + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); + display: inline !important; + vertical-align: bottom; + border: 1px solid #ccc; +@media only all and (max-width: 59.938em) { +@media only all and (max-width: 59.938em) { + margin-right: 0 !important; + vertical-align: middle; +@media only all and (max-width: 59.938em) { + justify-content: center; + font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + border-bottom: 4px solid #F0F2F4; + font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + font-size: 18px !important; + font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + text-rendering: optimizeLegibility; + font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + text-transform: uppercase; + border-left: 10px solid #F0F2F4; +div.notices p:first-child:before { + font-family: "Font Awesome 5 Free"; +div.notices p:first-child:after { + border-top: 30px solid #F0B37E; +div.notices.info p:first-child:after { + border-top: 30px solid rgba(217, 83, 79, 0.8); +div.notices.warning p:first-child:after { + border-top: 30px solid #6AB0DE; +div.notices.note p:first-child:after { + border-top: 30px solid rgba(92, 184, 92, 0.8); +div.notices.tip p:first-child:after { +/* attachments shortcode */ +section.attachments label { +section.attachments .attachments-files { +section.attachments.orange label { +section.attachments.orange .attachments-files { +section.attachments.green label { + background: rgba(92, 184, 92, 0.8); +section.attachments.green .attachments-files { +section.attachments.blue label { +section.attachments.blue .attachments-files { +section.attachments.grey label { +section.attachments.grey .attachments-files { +/* Children shortcode */ +/* Children shortcode */ +.children-h2 p, .children-h3 p { +.children h3,.children h2 { + font-family: "Consolas", menlo, monospace; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code, h7 code { + border-bottom: 4px solid #F0F2F4; +#body a.anchor-link:hover { +#body-inner .tabs-wrapper.ui-theme-badges { +#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li { + text-transform: uppercase; +#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li a { +#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li.current a { + border: 1px solid #eaeaea; + border: 1px solid #eaeaea; + box-shadow: 0 3px 0 #00a5d4; + box-shadow: 0 3px 0 #008db6; + box-shadow: 0 1px 0 #008db6; + box-shadow: 0 3px 0 #f7a733; +.button-secondary:hover { + box-shadow: 0 3px 0 #f69b15; +.button-secondary:active { + box-shadow: 0 1px 0 #f69b15; + margin-right: -0.85rem; +@media only all and (max-width: 47.938em) { +@media only all and (max-width: 47.938em) { +@media only all and (max-width: 47.938em) { + font: normal normal 11px/1.5 "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + letter-spacing: normal; + content: attr(aria-label); + background: rgba(0, 0, 0, 0.8); + -webkit-font-smoothing: subpixel-antialiased; + color: rgba(0, 0, 0, 0.8); + border: 5px solid transparent; +.tooltipped:hover:before, .tooltipped:hover:after, .tooltipped:active:before, .tooltipped:active:after, .tooltipped:focus:before, .tooltipped:focus:after { +.tooltipped-s:after, .tooltipped-se:after, .tooltipped-sw:after { +.tooltipped-s:before, .tooltipped-se:before, .tooltipped-sw:before { + border-bottom-color: rgba(0, 0, 0, 0.8); +.tooltipped-n:after, .tooltipped-ne:after, .tooltipped-nw:after { +.tooltipped-n:before, .tooltipped-ne:before, .tooltipped-nw:before { + border-top-color: rgba(0, 0, 0, 0.8); +.tooltipped-s:after, .tooltipped-n:after { + transform: translateX(50%); + transform: translateY(50%); + border-left-color: rgba(0, 0, 0, 0.8); + transform: translateY(50%); + border-right-color: rgba(0, 0, 0, 0.8); +.hljs::selection, .hljs span::selection { +.lightbox-active #body { +.lightbox-active #body .padding { + vertical-align: middle; +.lifecycle #body-inner ul { +.lifecycle #body-inner ol { +.lifecycle #body-inner ol li { +.lifecycle #body-inner ol strong, .lifecycle #body-inner ol label, .lifecycle #body-inner ol th { + text-decoration: underline; +.lifecycle #body-inner ol ol { +.lifecycle #body-inner h3[class*='level'] { +.lifecycle #body-inner ol h3 { + margin-top: 1rem !important; + right: 2rem !important; +.lifecycle #body-inner .level-1 + ol { + border: 4px solid #1ABC9C; +.lifecycle #body-inner .level-1 + ol h3 { +.lifecycle #body-inner .level-2 + ol { + border: 4px solid #2ECC71; +.lifecycle #body-inner .level-2 + ol h3 { +.lifecycle #body-inner .level-3 + ol { + border: 4px solid #3498DB; +.lifecycle #body-inner .level-3 + ol h3 { +.lifecycle #body-inner .level-4 + ol { + border: 4px solid #34495E; +.lifecycle #body-inner .level-4 + ol h3 { + text-overflow: ellipsis; +#body #breadcrumbs span { +@media only all and (max-width: 59.938em) { +@media only all and (max-width: 47.938em) { + .sidebar-hidden #sidebar { + .sidebar-hidden #body { + .sidebar-hidden #overlay { + background: rgba(255, 255, 255, 0.5); + background-color: #e2e2fd; + border-radius: 2px 2px 2px 0; +.copy-to-clipboard:hover { + background-color: #E8E2CD; +pre .copy-to-clipboard { + background-color: #4d5257; +pre .copy-to-clipboard:hover { + background-color: #656c72; + -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + transform-style: preserve-3d; +#sidebar ul.topics > li > a .read-icon { +#sidebar #shortcuts li { +#sidebar ul li .read-icon { +#sidebar ul li.visited > a .read-icon { +#sidebar #shortcuts h3 { + font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/static/js/hugo-learn.js Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,29 @@
+// Stick the top to the top of the screen when scrolling +$(document).ready(function(){ + $("#top-bar").sticky({topSpacing:0, zIndex: 1000}); +jQuery(document).ready(function() { + // Add link button for every + var text, clip = new Clipboard('.anchor'); + $("h1~h2,h1~h3,h1~h4,h1~h5,h1~h6").append(function(index, html){ + var url = encodeURI(document.location.origin + document.location.pathname); + var link = url + "#"+element[0].id; + return " <span class='anchor' data-clipboard-text='"+link+"'>" + + "<i class='fas fa-link fa-lg'></i>" + + $(".anchor").on('mouseleave', function(e) { + $(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w'); + clip.on('success', function(e) { + $(e.trigger).attr('aria-label', 'Link copied to clipboard!').addClass('tooltipped tooltipped-s'); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/static/js/learn.js Wed Apr 27 22:09:26 2022 -0500
@@ -0,0 +1,458 @@
+// Scrollbar Width function +function getScrollBarWidth() { + var inner = document.createElement('p'); + inner.style.width = "100%"; + inner.style.height = "200px"; + var outer = document.createElement('div'); + outer.style.position = "absolute"; + outer.style.top = "0px"; + outer.style.left = "0px"; + outer.style.visibility = "hidden"; + outer.style.width = "200px"; + outer.style.height = "150px"; + outer.style.overflow = "hidden"; + outer.appendChild(inner); + document.body.appendChild(outer); + var w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + var w2 = inner.offsetWidth; + if (w1 == w2) w2 = outer.clientWidth; + document.body.removeChild(outer); +function setMenuHeight() { + $('#sidebar .highlightable').height($('#sidebar').innerHeight() - $('#header-wrapper').height() - 40); + $('#sidebar .highlightable').perfectScrollbar('update'); +function fallbackMessage(action) { + var actionKey = (action === 'cut' ? 'X' : 'C'); + if (/iPhone|iPad/i.test(navigator.userAgent)) { + actionMsg = 'No support :('; + else if (/Mac/i.test(navigator.userAgent)) { + actionMsg = 'Press ⌘-' + actionKey + ' to ' + action; + actionMsg = 'Press Ctrl-' + actionKey + ' to ' + action; +// for the window resize +$(window).resize(function() { +// debouncing function from John Hann +// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ + var debounce = function(func, threshold, execAsap) { + return function debounced() { + var obj = this, args = arguments; + timeout = setTimeout(delayed, threshold || 100); + jQuery.fn[sr] = function(fn) { return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); }; +})(jQuery, 'smartresize'); +jQuery(document).ready(function() { + jQuery('#sidebar .category-icon').on('click', function() { + $( this ).toggleClass("fa-angle-down fa-angle-right") ; + $( this ).parent().parent().children('ul').toggle() ; + var sidebarStatus = searchStatus = 'open'; + $('#sidebar .highlightable').perfectScrollbar(); + jQuery('#overlay').on('click', function() { + jQuery(document.body).toggleClass('sidebar-hidden'); + sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open'); + jQuery('[data-sidebar-toggle]').on('click', function() { + jQuery(document.body).toggleClass('sidebar-hidden'); + sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open'); + jQuery('[data-clear-history-toggle]').on('click', function() { + sessionStorage.clear(); + jQuery('[data-search-toggle]').on('click', function() { + if (sidebarStatus == 'closed') { + jQuery('[data-sidebar-toggle]').trigger('click'); + jQuery(document.body).removeClass('searchbox-hidden'); + jQuery(document.body).toggleClass('searchbox-hidden'); + searchStatus = (jQuery(document.body).hasClass('searchbox-hidden') ? 'closed' : 'open'); + jQuery('[data-search-input]').on('input', function() { + var input = jQuery(this), + items = jQuery('[data-nav-id]'); + items.removeClass('search-match'); + $('ul.topics').removeClass('searched'); + items.css('display', 'block'); + sessionStorage.removeItem('search-value'); + $(".highlightable").unhighlight({ element: 'mark' }) + sessionStorage.setItem('search-value', value); + $(".highlightable").unhighlight({ element: 'mark' }).highlight(value, { element: 'mark' }); + if (ajax && ajax.abort) ajax.abort(); + jQuery('[data-search-clear]').on('click', function() { + jQuery('[data-search-input]').val('').trigger('input'); + sessionStorage.removeItem('search-input'); + $(".highlightable").unhighlight({ element: 'mark' }) + $.expr[":"].contains = $.expr.createPseudo(function(arg) { + return function( elem ) { + return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; + if (sessionStorage.getItem('search-value')) { + var searchValue = sessionStorage.getItem('search-value') + $(document.body).removeClass('searchbox-hidden'); + $('[data-search-input]').val(searchValue); + $('[data-search-input]').trigger('input'); + var searchedElem = $('#body-inner').find(':contains(' + searchValue + ')').get(0); + searchedElem.scrollIntoView(true); + var scrolledY = window.scrollY; + window.scroll(0, scrolledY - 125); + if (isCodeToClipboardEnabled) { + const elems = $('code') + const clipboard = new Clipboard('.copy-to-clipboard', { + $(trigger).prev('code').text().replace(/^\$\s/gm, '') + clipboard.on('success', (e) => { + addToolTip(e, 'Copied to clipboard!') + clipboard.on('error', (e) => { + addToolTip(e, fallbackMessage(e.action)) + $(document).one('copy', () => addToolTip(e, 'Copied to clipboard!')); + elems.each(function () { + const isInHeading = code.parent().is('h1,h2,h3,h4,h5,h6,h7'); + const isInToc = code.parents('nav#TableOfContents').length > 0; + const isTooShort = code.text().length < 5 + if (!isInHeading && !isInToc && !isTooShort) { + code.addClass('with-copy'); + code.after('<i class="copy-to-clipboard far fa-copy" title="Copy to clipboard"></i>'); + code.next('.copy-to-clipboard').on('mouseleave', removeTooltip); + function removeTooltip() { + $(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w'); + function addToolTip(e, message) { + var inPre = $(e.trigger).parent().prop('tagName') == 'PRE'; + .attr('aria-label', message) + .addClass('tooltipped tooltipped-' + (inPre ? 'w' : 's')); + // allow keyboard control for prev/next links + jQuery('.nav-prev').click(function(){ + location.href = jQuery(this).attr('href'); + jQuery('.nav-next').click(function() { + location.href = jQuery(this).attr('href'); + jQuery('input').keydown(function (e) { + // left and right arrow keys + if (e.which == '37' || e.which == '39') { + jQuery(document).keydown(function(e) { + // prev links - left arrow key + jQuery('.nav.nav-prev').click(); + // next links - right arrow key + jQuery('.nav.nav-next').click(); + $('#top-bar a:not(:has(img)):not(.btn)').addClass('highlight'); + $('#body-inner a:not(:has(img)):not(.btn):not(a[rel="footnote"])').addClass('highlight'); + var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0) + if (!touchsupport){ // browser doesn't support touch + $('#toc-menu').hover(function() { + $('.progress').stop(true, false, true).fadeToggle(100); + $('.progress').hover(function() { + $('.progress').stop(true, false, true).fadeToggle(100); + if (touchsupport){ // browser does support touch + $('#toc-menu').click(function() { + $('.progress').stop(true, false, true).fadeToggle(100); + $('.progress').click(function() { + $('.progress').stop(true, false, true).fadeToggle(100); + * Fix anchor scrolling that hides behind top nav bar + * Courtesy of https://stackoverflow.com/a/13067009/28106 + * We could use pure css for this if only heading anchors were + * involved, but this works for any anchor, including footnotes + (function (document, history, location) { + var HISTORY_SUPPORT = !!(history && history.pushState); + ANCHOR_REGEX: /^#[^ ]+$/, + * Establish events, and fix initial scroll position if a hash is provided. + this.scrollToCurrent(); + $(window).on('hashchange', $.proxy(this, 'scrollToCurrent')); + $('body').on('click', 'a', $.proxy(this, 'delegateAnchors')); + * Return the offset amount to deduct from the normal scroll position. + * Modify as appropriate to allow for dynamic calculations + getFixedOffset: function () { + return this.OFFSET_HEIGHT_PX; + * If the provided href is an anchor which resolves to an element on the + * @return {Boolean} - Was the href an anchor. + scrollIfAnchor: function (href, pushToHistory) { + var match, anchorOffset; + if (!this.ANCHOR_REGEX.test(href)) { + match = document.getElementById(href.slice(1)); + anchorOffset = $(match).offset().top - this.getFixedOffset(); + $('html, body').animate({ scrollTop: anchorOffset }); + // Add the state to history as-per normal anchor links + if (HISTORY_SUPPORT && pushToHistory) { + history.pushState({}, document.title, location.pathname + href); + * Attempt to scroll to the current location's hash. + scrollToCurrent: function (e) { + if (this.scrollIfAnchor(window.location.hash) && e) { + * If the click event's target was an anchor, fix the scroll position. + delegateAnchors: function (e) { + if (this.scrollIfAnchor(elem.getAttribute('href'), true)) { + $(document).ready($.proxy(anchorScrolls, 'init')); + })(window.document, window.history, window.location); +jQuery(window).on('load', function() { + function adjustForScrollbar() { + if ((parseInt(jQuery('#body-inner').height()) + 83) >= jQuery('#body').height()) { + jQuery('.nav.nav-next').css({ 'margin-right': getScrollBarWidth() }); + jQuery('.nav.nav-next').css({ 'margin-right': 0 }); + // adjust sidebar for scrollbar + jQuery(window).smartresize(function() { + // store this page in session + sessionStorage.setItem(jQuery('body').data('url'), 1); + // loop through the sessionStorage and see if something should be marked as visited + for (var url in sessionStorage) { + if (sessionStorage.getItem(url) == 1) jQuery('[data-nav-id="' + url + '"]').addClass('visited'); + $(".highlightable").highlight(sessionStorage.getItem('search-value'), { element: 'mark' }); + highlight: function(node, re, nodeName, className) { + if (node.nodeType === 3) { + var match = node.data.match(re); + var highlight = document.createElement(nodeName || 'span'); + highlight.className = className || 'highlight'; + var wordNode = node.splitText(match.index); + wordNode.splitText(match[0].length); + var wordClone = wordNode.cloneNode(true); + highlight.appendChild(wordClone); + wordNode.parentNode.replaceChild(highlight, wordNode); + return 1; //skip added node in parent + } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children + !/(script|style)/i.test(node.tagName) && // ignore script and style nodes + !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted + for (var i = 0; i < node.childNodes.length; i++) { + i += jQuery.highlight(node.childNodes[i], re, nodeName, className); +jQuery.fn.unhighlight = function(options) { + className: 'highlight', + jQuery.extend(settings, options); + return this.find(settings.element + "." + settings.className).each(function() { + var parent = this.parentNode; + parent.replaceChild(this.firstChild, this); +jQuery.fn.highlight = function(words, options) { + className: 'highlight', + jQuery.extend(settings, options); + if (!words) { return; } + if (words.constructor === String) { + words = jQuery.grep(words, function(word, i) { + words = jQuery.map(words, function(word, i) { + return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + if (words.length == 0) { return this; } + var flag = settings.caseSensitive ? "" : "i"; + var pattern = "(" + words.join("|") + ")"; + if (settings.wordsOnly) { + pattern = "\\b" + pattern + "\\b"; + var re = new RegExp(pattern, flag); + return this.each(function() { + jQuery.highlight(this, re, settings.element, settings.className); --- a/hugo/themes/learn/layouts/partials/menu.html Wed Apr 27 07:52:28 2022 -0500
+++ b/hugo/themes/learn/layouts/partials/menu.html Wed Apr 27 22:09:26 2022 -0500
@@ -24,7 +24,7 @@
{{ $disableShortcutsTitle := .Site.Params.DisableShortcutsTitle }}
{{ with .Site.Menus.shortcuts }}
- {{ if not $disableShortcutsTitle }}<h3>{{ T "Shortcuts-Title" }}</h3>{{ else }}<br />{{ end }}
+ <h3>{{ if not $disableShortcutsTitle }}{{ T "Shortcuts-Title" }}{{ end }}</h3> {{ range sort . "Weight" }}
--- a/hugo/themes/learn/static/css/hugo-theme.css Wed Apr 27 07:52:28 2022 -0500
+++ b/hugo/themes/learn/static/css/hugo-theme.css Wed Apr 27 22:09:26 2022 -0500
@@ -136,7 +136,7 @@
--- a/hugo/themes/learn/static/css/theme.css Wed Apr 27 07:52:28 2022 -0500
+++ b/hugo/themes/learn/static/css/theme.css Wed Apr 27 22:09:26 2022 -0500
@@ -52,7 +52,7 @@
@@ -218,10 +218,10 @@
- color: #767676 !important;
+ color: #777 !important; - color: #767676 !important;
+ color: #777 !important; #sidebar h5 + ul.topics {
@@ -280,7 +280,7 @@
#sidebar ul li.active > a {
- color: #767676 !important;
+ color: #777 !important;