pidgin/nest

Formats html templates

2019-01-18, Jason
49c58db14051
Parents 66a0559188fb
Children dc206417ce23
Formats html templates
--- a/layouts/shortcodes/gsoc.html Fri Jan 18 21:26:26 2019 +0000
+++ b/layouts/shortcodes/gsoc.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,5 +1,5 @@
{{ range sort .Site.Data.gsoc "year" "desc" }}
- <h3 id="gsoc-{{.year}}">{{.year}}</h3>
+ <h3 id="gsoc-{{ .year }}">{{ .year }}</h3>
<table>
<thead>
@@ -9,14 +9,14 @@
<th>Status</th>
</thead>
<tbody>
- {{range .participants}}
+ {{ range .participants }}
<tr>
<td>{{ .project }}</td>
<td>{{ .student }}</td>
<td>{{ .mentor }}</td>
<td>{{ .status | markdownify }}</td>
</tr>
- {{end}}
+ {{ end }}
</tbody>
</table>
{{ end }}
--- a/layouts/shortcodes/i18n-languages.html Fri Jan 18 21:26:26 2019 +0000
+++ b/layouts/shortcodes/i18n-languages.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,5 +1,5 @@
<ul class="condensed">
{{- range .Site.Data.i18n_languages -}}
- <li>{{.}}</li>
+ <li>{{ . }}</li>
{{- end -}}
</ul>
--- a/layouts/shortcodes/plugintable.html Fri Jan 18 21:26:26 2019 +0000
+++ b/layouts/shortcodes/plugintable.html Fri Jan 18 21:57:19 2019 +0000
@@ -15,18 +15,18 @@
</thead>
<tbody>
{{ range .Site.Data.plugins }}
- <tr data-type="{{.type}}">
+ <tr data-type="{{ .type }}">
<td>
- <img src="{{.logo}}" />
+ <img src="{{ .logo }}" />
</td>
<td class="pulgin-heading">
- {{.heading}}
+ {{ .heading }}
</td>
<td class="pulgin-info">
- <b>{{.type}}</b> {{.info | markdownify}}
+ <b>{{ .type }}</b> {{ .info | markdownify }}
</td>
<td class="pulgin-repo">
- <a href="{{.repo}}">{{.maintainer}}</a>
+ <a href="{{ .repo }}">{{ .maintainer }}</a>
</td>
</tr>
{{ end }}
--- a/readme.md Fri Jan 18 21:26:26 2019 +0000
+++ b/readme.md Fri Jan 18 21:57:19 2019 +0000
@@ -4,11 +4,11 @@
## Table of contents
- * [Community](community.md)
- * [Contributing](contributing.md)
- * [Design Guidelines](design-guidelines.md)
- * [Development FAQ](development-faq.md)
- * [Release Process](release-process.md)
+- [Community](community.md)
+- [Contributing](contributing.md)
+- [Design Guidelines](design-guidelines.md)
+- [Development FAQ](development-faq.md)
+- [Release Process](release-process.md)
## Dependencies
@@ -17,6 +17,16 @@
## Developing Docs
1. To start devleopment server run: `hugo server -D --disableFastRender -v --verboseLog --noHTTPCache`
- * `--disableFastRender`. Disabling fast render is needed because hugo starts to ignore new content in the data dir
- * `-v --verboseLog`. Better logging and debugging experience
- * `--noHTTPCache`. To prevent caching issues with
\ No newline at end of file
+ - `--disableFastRender`. Disabling fast render is needed because hugo starts to ignore new content in the data dir
+ - `-v --verboseLog`. Better logging and debugging experience
+ - `--noHTTPCache`. To prevent caching issues with
+
+### Formatting
+
+These are some regexes to quickly format templating
+
+| regex | replace |
+| -------------------- | -------- |
+| `\{\{(\w|\.|\$|\()` | `{{ $1` |
+| `\{\{-(\w|\.|$)` | `{{- $1` |
+| `("|\w|\.|\))(-)?}}` | `$1 }}` |
--- a/themes/learn/layouts/404.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/404.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,59 +1,74 @@
<!DOCTYPE html>
<html lang="{{ .Page.Language | default "en" }}" class="js csstransforms3d">
-
<head>
- <meta charset="utf-8"> {{ partial "meta.html" . }} {{ partial "favicon.html" . }} {{ .Scratch.Add "title" "" }}{{ if eq .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}}
- <title>{{ .Scratch.Get "title" }}</title>
+ <meta charset="utf-8">
+ {{ partial "meta.html" . }}
+ {{ partial "favicon.html" . }}
- {{ $assetBusting := not .Site.Params.disableAssetsBusting }}
- <link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/hybrid.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/featherlight.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/horsey.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/hugo-theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- {{with .Site.Params.themeVariant}}
- <link href="{{(printf "css/theme-%s.css" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- {{end}}
-<style type="text/css">
- :root #header + #content > #left > #rlblock_left {
+ {{ .Scratch.Add "title" "" }}
+ {{ if eq .Site.Data.titles .Title }}
+ {{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}
+ {{ else }}
+ {{ .Scratch.Set "title" .Title }}
+ {{ end }}
+
+ <title>{{ .Scratch.Get "title" }}</title>
+
+ {{ $assetBusting := not .Site.Params.disableAssetsBusting }}
+ <link href="{{ "css/nucleus.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/fontawesome-all.min.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/hybrid.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/featherlight.min.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/perfect-scrollbar.min.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/horsey.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/theme.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/hugo-theme.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ {{ with .Site.Params.themeVariant }}
+ <link href="{{ (printf "css/theme-%s.css" .) | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ {{ end }}
+
+ <style type="text/css">
+ :root #header+#content>#left>#rlblock_left {
display: none !important;
}
-
- p,
- li,
- ul {
- text-align: center
+
+ p, li, ul { text-align: center
}
-
+
ul {
list-style-type: none;
}
-</style>
-{{ partial "custom-header.html" . }}
-</head>
+ </style>
-<body>
-
- <body class="" data-url="/">
+ {{ partial "custom-header.html" . }}
+</head>
+<body class="" data-url="/">
+ <section id="body" style="margin-left:0px;">
+ <div id="overlay"></div>
- <section id="body" style="margin-left:0px;">
- <div id="overlay"></div>
- <div id="chapter">
- <div id="body-inner">
- <h1>{{T "title-404"}}</h1>
- <p>
- </p>
- <p>{{T "message-404"}}</p>
- <p></p>
- <p><a href='{{ "" | relLangURL }}'>{{T "Go-to-homepage"}}</a></p>
- <p><img src='{{ "/images/gopher-404.jpg" | relURL }}' style="width:50%" alt="Page not found!"></img></p>
- </div>
+ <div id="chapter">
+ <div id="body-inner">
+ <h1>
+ {{ T "title-404" }}
+ </h1>
+
+ <p></p>
+
+ <p>
+ {{ T "message-404" }}
+ </p>
+
+ <p></p>
+
+ <p>
+ <a href='{{ "" | relLangURL }}'>{{ T "Go-to-homepage" }}</a>
+ </p>
+
+ <p>
+ <img src='{{ "/images/gopher-404.jpg" | relURL }}' style="width:50%" alt="Page not found!" />
+ </p>
</div>
-
- </section>
- </body>
-
+ </div>
+ </section>
+</body>
</html>
--- a/themes/learn/layouts/_default/list.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/_default/list.html Fri Jan 18 21:57:19 2019 +0000
@@ -3,10 +3,10 @@
{{ .Content }}
<footer class=" footline" >
- {{with .Params.LastModifierDisplayName}}
- <i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{with $.Date}} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{end}}
+ {{ with .Params.LastModifierDisplayName }}
+ <i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{ with $.Date }} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{ end }}
</div>
- {{end}}
+ {{ end }}
</footer>
{{ partial "footer.html" . }}
\ No newline at end of file
--- a/themes/learn/layouts/_default/single.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/_default/single.html Fri Jan 18 21:57:19 2019 +0000
@@ -3,11 +3,10 @@
{{ .Content }}
<footer class=" footline" >
- {{with .Params.LastModifierDisplayName}}
- <i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{with $.Date}} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{end}}
+ {{ with .Params.LastModifierDisplayName }}
+ <i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{ with $.Date }} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{ end }}
</div>
- {{end}}
+ {{ end }}
</footer>
-
{{ partial "footer.html" . }}
--- a/themes/learn/layouts/index.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/index.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,31 +1,37 @@
{{ partial "header.html" . }}
<span id="sidebar-toggle-span">
-<a href="#" id="sidebar-toggle" data-sidebar-toggle=""><i class="fas fa-bars"></i> navigation</a>
+ <a href="#" id="sidebar-toggle" data-sidebar-toggle="">
+ <i class="fas fa-bars"></i> navigation
+ </a>
</span>
-{{if .Site.Home.Content }}
-{{.Site.Home.Content}}
-{{else}}
- {{if eq .Site.Language.Lang "fr"}}
+{{ if .Site.Home.Content }}
+ {{ .Site.Home.Content }}
+{{ else }}
+ {{ if eq .Site.Language.Lang "fr" }}
<h1>Personaliser la page d'accueil</h1>
+
<p>
Le site fonctionne. Ne pas oublier de personaliser cette page avec votre propre contenu. 3 manières de faire :
</p>
+
<ul>
<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>
</ul>
- {{else}}
+ {{ else }}
<h1>Customize your own home page</h1>
+
<p>
The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices :
</p>
+
<ul>
<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>
</ul>
- {{end}}
+ {{ end }}
{{ end }}
{{ partial "footer.html" . }}
--- a/themes/learn/layouts/partials/footer.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/partials/footer.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,54 +1,55 @@
- {{ if .Params.chapter }}
- </div> <!-- end chapter-->
- {{ end }}
- </div>
+ {{/* TODO: Remove disgusting conditional tag spanning file */}}
+ {{ if .Params.chapter }}
+ </div> <!-- end chapter-->
+ {{ end }}
+ </div>
{{ partial "custom-comments.html" . }}
- </div>
+ </div>
<div id="navigation">
<!-- 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.URL .menu.URL }}
+ {{ $currentNode := .currentnode }}
+ {{ if ne .menu.Params.hidden true }}
+ {{ if hasPrefix $currentNode.URL .menu.URL }}
{{ $currentNode.Scratch.Set "NextPageOK" "OK" }}
{{ $currentNode.Scratch.Set "prevPage" ($currentNode.Scratch.Get "prevPageTmp") }}
- {{else}}
- {{if eq ($currentNode.Scratch.Get "NextPageOK") "OK"}}
+ {{ else }}
+ {{ if eq ($currentNode.Scratch.Get "NextPageOK") "OK" }}
{{ $currentNode.Scratch.Set "NextPageOK" nil }}
{{ $currentNode.Scratch.Set "nextPage" .menu }}
- {{end}}
- {{end}}
+ {{ end }}
+ {{ end }}
{{ $currentNode.Scratch.Set "prevPageTmp" .menu }}
- {{ $currentNode.Scratch.Set "pages" .menu.Pages }}
- {{ if .menu.IsHome}}
- {{ $currentNode.Scratch.Set "pages" .menu.Sections }}
- {{ else if .menu.Sections}}
- {{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }}
- {{end}}
- {{ $pages := ($currentNode.Scratch.Get "pages") }}
+ {{ $currentNode.Scratch.Set "pages" .menu.Pages }}
+ {{ if .menu.IsHome }}
+ {{ $currentNode.Scratch.Set "pages" .menu.Sections }}
+ {{ else if .menu.Sections }}
+ {{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }}
+ {{ end }}
+ {{ $pages := ($currentNode.Scratch.Get "pages") }}
- {{ range $pages.ByWeight }}
- {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }}
- {{end}}
+ {{ range $pages.ByWeight }}
+ {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }}
+ {{ end }}
{{ end }}
{{ end }}
- {{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}}
- {{if $showPrevNext}}
- {{with ($.Scratch.Get "prevPage")}}
- <a class="nav nav-prev" href="{{.URL}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
- {{end}}
- {{with ($.Scratch.Get "nextPage")}}
- <a class="nav nav-next" href="{{.URL}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
- {{end}}
- {{end}}
+ {{ $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }}
+ {{ if $showPrevNext }}
+ {{ with ($.Scratch.Get "prevPage") }}
+ <a class="nav nav-prev" href="{{ .URL }}" title="{{ .Title }}"> <i class="fa fa-chevron-left"></i></a>
+ {{ end }}
+ {{ with ($.Scratch.Get "nextPage") }}
+ <a class="nav nav-next" href="{{ .URL }}" title="{{ .Title }}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
+ {{ end }}
+ {{ end }}
</div>
</section>
@@ -56,20 +57,20 @@
<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>
</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/featherlight.min.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 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/featherlight.min.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>
+ <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>
- <link href="{{"mermaid/mermaid.css" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" type="text/css" rel="stylesheet" />
- <script src="{{"mermaid/mermaid.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
+ <link href="{{ "mermaid/mermaid.css" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" type="text/css" rel="stylesheet" />
+ <script src="{{ "mermaid/mermaid.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
--- a/themes/learn/layouts/partials/header.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/partials/header.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,100 +1,104 @@
<!DOCTYPE html>
<html lang="{{ .Page.Language | default "en" }}" class="js csstransforms3d">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- {{ .Hugo.Generator }}
- {{ partial "meta.html" . }}
- {{ partial "favicon.html" . }}
- <title>{{ .Title }} :: {{ .Site.Title }}</title>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ {{ .Hugo.Generator }}
+ {{ partial "meta.html" . }}
+ {{ partial "favicon.html" . }}
+ <title>{{ .Title }} :: {{ .Site.Title }}</title>
- {{ $assetBusting := not .Site.Params.disableAssetsBusting }}
- <link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/hybrid.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/featherlight.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- <link href="{{"css/hugo-theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- {{with .Site.Params.themeVariant}}
- <link href="{{(printf "css/theme-%s.css" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
- {{end}}
+ {{ $assetBusting := not .Site.Params.disableAssetsBusting }}
+ <link href="{{ "css/nucleus.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/fontawesome-all.min.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/hybrid.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/featherlight.min.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/perfect-scrollbar.min.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/auto-complete.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/theme.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ <link href="{{ "css/hugo-theme.css" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ {{ with .Site.Params.themeVariant }}
+ <link href="{{ (printf "css/theme-%s.css" .) | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
+ {{ end }}
- <script src="{{"js/jquery-2.x.min.js"| relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
+ <script src="{{ "js/jquery-2.x.min.js"| relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
- <style type="text/css">
- :root #header + #content > #left > #rlblock_left{
- display:none !important;
+ <style type="text/css">
+ :root #header + #content > #left > #rlblock_left{
+ display:none !important;
+ }
+ {{ if .Site.Params.disableInlineCopyToClipBoard }}
+ :not(pre) > code + span.copy-to-clipboard {
+ display: none;
}
- {{ if .Site.Params.disableInlineCopyToClipBoard }}
- :not(pre) > code + span.copy-to-clipboard {
- display: none;
- }
- {{ end }}
- </style>
- {{ partial "custom-header.html" . }}
- </head>
- <body class="" data-url="{{ .RelPermalink }}">
- {{ partial "menu.html" . }}
- <section id="body">
- <div id="overlay"></div>
- <div class="padding highlightable">
- {{if not .IsHome}}
- <div>
- <div id="top-bar">
- {{ if and (or .IsPage .IsSection) .Site.Params.editURL }}
- {{ $File := .File }}
- {{ $Site := .Site }}
- {{with $File.Path }}
- <div id="top-github-link">
- <a class="github-link" title='{{T "Edit-this-page"}}' href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" target="blank">
- <i class="fas fa-code-branch"></i>
- <span id="top-github-link-text">{{T "Edit-this-page"}}</span>
- </a>
- </div>
- {{ end }}
- {{ end }}
- {{$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>
- </a>
- </span>
- {{ if $toc }}
- <span id="toc-menu"><i class="fas fa-list-alt"></i></span>
- {{ end }}
- <span class="links">
- {{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}}
- {{if $showBreadcrumb}}
- {{ template "breadcrumb" dict "page" . "value" .Title }}
- {{ else }}
- {{ .Title }}
- {{ end }}
- </span>
+ {{ end }}
+ </style>
+ {{ partial "custom-header.html" . }}
+</head>
+
+<body class="" data-url="{{ .RelPermalink }}">
+ {{ partial "menu.html" . }}
+ <section id="body">
+ <div id="overlay"></div>
+ <div class="padding highlightable">
+ {{ if not .IsHome }}
+ <div>
+ <div id="top-bar">
+ {{ if and (or .IsPage .IsSection) .Site.Params.editURL }}
+ {{ $File := .File }}
+ {{ $Site := .Site }}
+ {{ with $File.Path }}
+ <div id="top-github-link">
+ <a class="github-link" title='{{ T "Edit-this-page" }}' href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" target="blank">
+ <i class="fas fa-code-branch"></i>
+ <span id="top-github-link-text">{{ T "Edit-this-page" }}</span>
+ </a>
</div>
- {{ if $toc }}
- {{ partial "toc.html" . }}
- {{ end }}
- </div>
- </div>
+ {{ end }}
{{ end }}
- {{ if .Params.chapter }}
- <div id="chapter">
+ {{ $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>
+ </a>
+ </span>
+ {{ if $toc }}
+ <span id="toc-menu"><i class="fas fa-list-alt"></i></span>
+ {{ end }}
+ <span class="links">
+ {{ $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }}
+ {{ if $showBreadcrumb }}
+ {{ template "breadcrumb" dict "page" . "value" .Title }}
+ {{ else }}
+ {{ .Title }}
+ {{ end }}
+ </span>
+ </div>
+
+ {{ if $toc }}
+ {{ partial "toc.html" . }}
+ {{ end }}
+ </div>
+ </div>
+ {{ end }}
+
+ {{/* TODO: Remove disgusting conditional tag spanning file */}}
+ {{ if .Params.chapter }}
+ <div id="chapter">
+ {{ end }}
+ <div id="body-inner">
+ {{ if and (not .IsHome) (not .Params.chapter) }}
+ <h1>{{ .Title }}</h1>
{{ end }}
- <div id="body-inner">
- {{if and (not .IsHome) (not .Params.chapter) }}
- <h1>{{.Title}}</h1>
- {{end}}
- {{define "breadcrumb"}}
- {{$parent := .page.Parent }}
+ {{ define "breadcrumb" }}
+ {{ $parent := .page.Parent }}
{{ if $parent }}
{{ $value := (printf "<a href='%s'>%s</a> > %s" $parent.URL $parent.Title .value) }}
{{ template "breadcrumb" dict "page" $parent "value" $value }}
- {{else}}
- {{.value|safeHTML}}
- {{end}}
- {{end}}
+ {{ else }}
+ {{ .value|safeHTML }}
+ {{ end }}
+ {{ end }}
--- a/themes/learn/layouts/partials/menu.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/partials/menu.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,89 +1,89 @@
-<nav id="sidebar" class="{{if $.Site.Params.showVisitedLinks }}showVisitedLinks{{end}}">
+<nav id="sidebar" class="{{ if $.Site.Params.showVisitedLinks }}showVisitedLinks{{ end }}">
-{{ $currentNode := . }}
-{{ $showvisitedlinks := .Site.Params.showVisitedLinks }}
+ {{ $currentNode := . }}
+ {{ $showvisitedlinks := .Site.Params.showVisitedLinks }}
<div id="header-wrapper">
<div id="header">
{{ partial "logo.html" . }}
</div>
- {{if not .Site.Params.disableSearch}}
- {{ partial "search.html" . }}
- {{end}}
+ {{ if not .Site.Params.disableSearch }}
+ {{ partial "search.html" . }}
+ {{ end }}
</div>
- <div class="highlightable">
+ <div class="highlightable">
<ul class="topics">
- {{if eq .Site.Params.ordersectionsby "title"}}
- {{range .Site.Home.Sections.ByTitle}}
- {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks}}
- {{end}}
- {{else}}
- {{range .Site.Home.Sections.ByWeight}}
- {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks}}
- {{end}}
- {{end}}
+ {{ if eq .Site.Params.ordersectionsby "title" }}
+ {{ range .Site.Home.Sections.ByTitle }}
+ {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
+ {{ end }}
+ {{ else }}
+ {{ range .Site.Home.Sections.ByWeight }}
+ {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
+ {{ end }}
+ {{ end }}
</ul>
- {{ $disableShortcutsTitle := .Site.Params.DisableShortcutsTitle}}
- {{with .Site.Menus.shortcuts}}
+ {{ $disableShortcutsTitle := .Site.Params.DisableShortcutsTitle }}
+ {{ with .Site.Menus.shortcuts }}
<section id="shortcuts">
- <h3>{{ if not $disableShortcutsTitle}}{{ T "Shortcuts-Title"}}{{ end }}</h3>
+ <h3>{{ if not $disableShortcutsTitle }}{{ T "Shortcuts-Title" }}{{ end }}</h3>
<ul>
- {{ range sort . "Weight"}}
- <li>
- {{.Pre}}<a class="padding" href="{{.URL | absLangURL }}">{{safeHTML .Name}}</a>{{.Post}}
- </li>
- {{end}}
+ {{ range sort . "Weight" }}
+ <li>
+ {{ .Pre }}<a class="padding" href="{{ .URL | absLangURL }}">{{ safeHTML .Name }}</a>{{ .Post }}
+ </li>
+ {{ end }}
</ul>
</section>
- {{end}}
+ {{ end }}
- {{ if or .Site.IsMultiLingual $showvisitedlinks }}
- <section id="prefooter">
- <hr/>
- <ul>
- {{ if and .Site.IsMultiLingual (not .Site.Params.DisableLanguageSwitchingButton)}}
- <li>
- <a class="padding">
- <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 }}
- {{ if eq $pageLang .Lang}}
- <option id="{{ $translation.Language }}" value="{{ $translation.URL }}" selected>{{ .LanguageName }}</option>
- {{ else }}
- <option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option>
- {{ end }}
- {{ end }}
- {{ end }}
- {{ end }}
- </select>
- <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>
- <g id="arrow-drop-down">
- <polygon points="0,63.75 127.5,191.25 255,63.75 " />
- </g>
- </g>
- </svg>
- </div>
- </a>
- </li>
- {{end}}
-
- {{ if $showvisitedlinks}}
- <li><a class="padding" href="#" data-clear-history-toggle=""><i class="fas fa-history fa-fw"></i> {{T "Clear-History"}}</a></li>
+ {{ if or .Site.IsMultiLingual $showvisitedlinks }}
+ <section id="prefooter">
+ <hr/>
+ <ul>
+ {{ if and .Site.IsMultiLingual (not .Site.Params.DisableLanguageSwitchingButton) }}
+ <li>
+ <a class="padding">
+ <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 }}
+ {{ if eq $pageLang .Lang }}
+ <option id="{{ $translation.Language }}" value="{{ $translation.URL }}" selected>{{ .LanguageName }}</option>
+ {{ else }}
+ <option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ </select>
+ <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>
+ <g id="arrow-drop-down">
+ <polygon points="0,63.75 127.5,191.25 255,63.75 " />
+ </g>
+ </g>
+ </svg>
+ </div>
+ </a>
+ </li>
+ {{ end }}
+
+ {{ if $showvisitedlinks }}
+ <li><a class="padding" href="#" data-clear-history-toggle=""><i class="fas fa-history fa-fw"></i> {{ T "Clear-History" }}</a></li>
+ {{ end }}
+ </ul>
+ </section>
{{ end }}
- </ul>
- </section>
- {{ end }}
<section id="footer">
{{ partial "menu-footer.html" . }}
</section>
@@ -94,56 +94,58 @@
{{ define "section-tree-nav" }}
{{ $showvisitedlinks := .showvisitedlinks }}
{{ $currentNode := .currentnode }}
- {{with .sect}}
- {{if .IsSection}}
- {{safeHTML .Params.head}}
- <li data-nav-id="{{.URL}}" title="{{.Title}}" class="dd-item
- {{- if .IsAncestor $currentNode }} parent{{ end -}}
- {{- if eq .UniqueID $currentNode.UniqueID }} active{{ end -}}
- {{- if .Params.alwaysopen }} parent{{ end }}">
- <a href="{{.RelPermalink}}">
- {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}}
- {{ if $showvisitedlinks}}
+{{ with .sect }}
+ {{ if .IsSection }}
+ {{ safeHTML .Params.head }}
+ <li data-nav-id="{{ .URL }}" title="{{ .Title }}" class="dd-item
+ {{- if .IsAncestor $currentNode }} parent{{ end -}}
+ {{- if eq .UniqueID $currentNode.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>
{{ end }}
- </a>
- {{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
- {{ if ne $numberOfPages 0 }}
- <ul>
- {{ $currentNode.Scratch.Set "pages" .Pages }}
- {{ if .Sections}}
- {{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }}
- {{end}}
- {{ $pages := ($currentNode.Scratch.Get "pages") }}
-
- {{if eq .Site.Params.ordersectionsby "title"}}
- {{ range $pages.ByTitle }}
- {{ if and .Params.hidden (not $.showhidden) }}
- {{else}}
- {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
- {{end}}
- {{ end }}
- {{else}}
- {{ range $pages.ByWeight }}
- {{ if and .Params.hidden (not $.showhidden) }}
- {{else}}
- {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
- {{end}}
- {{ end }}
- {{end}}
- </ul>
- {{ end }}
- </li>
- {{else}}
- {{ if not .Params.Hidden }}
- <li data-nav-id="{{.URL}}" title="{{.Title}}" class="dd-item {{if eq .UniqueID $currentNode.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>{{end}}
</a>
- </li>
- {{ end }}
- {{end}}
- {{ end }}
+ {{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
+ {{ if ne $numberOfPages 0 }}
+ <ul>
+ {{ $currentNode.Scratch.Set "pages" .Pages }}
+ {{ if .Sections }}
+ {{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }}
+ {{ end }}
+ {{ $pages := ($currentNode.Scratch.Get "pages") }}
+
+ {{ if eq .Site.Params.ordersectionsby "title" }}
+ {{ range $pages.ByTitle }}
+ {{ if and .Params.hidden (not $.showhidden) }}
+ {{ else }}
+ {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
+ {{ end }}
+ {{ end }}
+ {{ else }}
+ {{ range $pages.ByWeight }}
+ {{ if and .Params.hidden (not $.showhidden) }}
+ {{ else }}
+ {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ </ul>
+ {{ end }}
+ </li>
+ {{ else }}
+ {{ if not .Params.Hidden }}
+ <li data-nav-id="{{ .URL }}" title="{{ .Title }}" class="dd-item {{ if eq .UniqueID $currentNode.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>
+ {{ end }}
+ </a>
+ </li>
+ {{ end }}
+ {{ end }}
+ {{ end }}
{{ end }}
--- a/themes/learn/layouts/partials/search.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/partials/search.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,16 +1,16 @@
<div class="searchbox">
<label for="search-by"><i class="fas fa-search"></i></label>
- <input data-search-input id="search-by" type="search" placeholder="{{T "Search-placeholder"}}">
+ <input data-search-input id="search-by" type="search" placeholder="{{ T "Search-placeholder" }}">
<span data-search-clear=""><i class="fas fa-times"></i></span>
</div>
{{ $assetBusting := not .Site.Params.disableAssetsBusting }}
-<script type="text/javascript" src="{{"js/lunr.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
-<script type="text/javascript" src="{{"js/auto-complete.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
+<script type="text/javascript" src="{{ "js/lunr.min.js" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
+<script type="text/javascript" src="{{ "js/auto-complete.js" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
<script type="text/javascript">
{{ if .Site.IsMultiLingual }}
- var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ var baseurl = "{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}";
{{ else }}
- var baseurl = "{{.Site.BaseURL}}";
+ var baseurl = "{{ .Site.BaseURL }}";
{{ end }}
</script>
-<script type="text/javascript" src="{{"js/search.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
+<script type="text/javascript" src="{{ "js/search.js" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
--- a/themes/learn/layouts/shortcodes/attachments.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/shortcodes/attachments.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,35 +1,41 @@
-<section class="attachments {{ with .Get "style"}}{{.}}{{ end }}">
+<section class="attachments {{ with .Get "style" }}{{ . }}{{ end }}">
<label>
<i class="fas fa-paperclip" aria-hidden="true"></i>
- {{with .Get "title"}}{{.}}{{else}}{{T "Attachments-label"}}{{end}}
+ {{ with .Get "title" }}
+ {{ . }}
+ {{ else }}
+ {{ T "Attachments-label" }}
+ {{ end }}
</label>
- {{if eq .Page.File.BaseFileName "index"}}
- {{$.Scratch.Add "filesName" "files"}}
- {{else}}
- {{$.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName)}}
- {{end}}
+
+ {{ if eq .Page.File.BaseFileName "index" }}
+ {{ $.Scratch.Add "filesName" "files" }}
+ {{ else }}
+ {{ $.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName) }}
+ {{ end }}
+
<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)}}
+ {{ 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) }}
+ <li>
+ <a href="{{ (printf "%s%s/%s" $fileDir ($.Scratch.Get "filesName") .Name) | relURL }}" >
+ {{ .Name }}
+ </a>
+ ({{ div .Size 1024 }} ko)
+ </li>
+ {{ end }}
+ {{ else }}
<li>
<a href="{{ (printf "%s%s/%s" $fileDir ($.Scratch.Get "filesName") .Name) | relURL }}" >
- {{.Name}}
+ {{ .Name }}
</a>
- ({{div .Size 1024 }} ko)
+ ({{ div .Size 1024 }} ko)
</li>
- {{end}}
- {{else}}
- <li>
- <a href="{{ (printf "%s%s/%s" $fileDir ($.Scratch.Get "filesName") .Name) | relURL }}" >
- {{.Name}}
- </a>
- ({{div .Size 1024 }} ko)
- </li>
- {{end}}
- {{end}}
- <div>
- {{.Inner}}
+ {{ end }}
+ {{ end }}
+ </div>
+ {{ .Inner }}
</section>
--- a/themes/learn/layouts/shortcodes/button.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/shortcodes/button.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,13 +1,13 @@
-<a {{ with .Get "href"}} href="{{.}}" target="_blank" {{ end }} class="btn btn-default">
+<a {{ with .Get "href" }} href="{{ . }}" target="_blank" {{ end }} class="btn btn-default">
{{ $icon := .Get "icon" }}
{{ $iconposition := .Get "icon-position" }}
{{ if ($icon) }}
{{ if or (not ($iconposition)) (eq $iconposition "left") }}
- <i class="{{$icon}}"></i>
+ <i class="{{ $icon }}"></i>
{{ end }}
{{ end }}
{{ .Inner }}
- {{ if and ($icon) (eq $iconposition "right")}}
- <i class="{{$icon}}"></i>
+ {{ if and ($icon) (eq $iconposition "right") }}
+ <i class="{{ $icon }}"></i>
{{ end }}
</a>
--- a/themes/learn/layouts/shortcodes/children.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/shortcodes/children.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,96 +1,88 @@
-{{ $showhidden := .Get "showhidden"}}
+{{ $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}}">
+<ul class="children children-{{ $style }}">
{{ .Scratch.Set "pages" .Page.Pages }}
- {{ if .Page.Sections}}
- {{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }}
- {{end}}
- {{ $pages := (.Scratch.Get "pages") }}
+ {{ if .Page.Sections }}
+ {{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }}
+ {{ end }}
+ {{ $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}}
- {{else}}
- {{template "childs" dict "menu" $pages "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}}
- {{end}}
+ {{ 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 }}
+ {{ else }}
+ {{ template "childs" dict "menu" $pages "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm }}
+ {{ end }}
</ul>
-{{.Inner|safeHTML}}
+{{ .Inner|safeHTML }}
{{ define "childs" }}
{{ range .menu }}
{{ if and .Params.hidden (not $.showhidden) }}
- {{else}}
-
+ {{ else }}
+ {{ if hasPrefix $.style "h" }}
+ {{ $num := sub ( int (trim $.style "h") ) 1 }}
+ {{ $numn := add $num $.count }}
-{{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 "<h%d>" $numn)|safeHTML }}
+ <a href="{{ .URL }}" >{{ .Title }}</a>
+ {{ (printf "</h%d>" $numn)|safeHTML }}
-{{else}}
-{{(printf "<%s>" $.style)|safeHTML}}
-<a href="{{.URL}}" >{{ .Title }}</a>
-{{(printf "</%s>" $.style)|safeHTML}}
-{{end}}
-
-
-
+ {{ else }}
+ {{ (printf "<%s>" $.style)|safeHTML }}
+ <a href="{{ .URL }}" >{{ .Title }}</a>
+ {{ (printf "</%s>" $.style)|safeHTML }}
+ {{ end }}
-
- {{if $.description}}
- {{if .Description}}
-<p>{{.Description}}</p>
- {{else}}
-<p>{{.Summary}}</p>
- {{end}}
- {{end}}
-
+ {{ if $.description }}
+ {{ if .Description }}
+ <p>{{ .Description }}</p>
+ {{ else }}
+ <p>{{ .Summary }}</p>
+ {{ end }}
+ {{ end }}
-
- {{ if lt $.count $.depth}}
-{{if eq $.style "li"}}
-<ul>
-{{end}}
- {{ $.Page.Scratch.Set "pages" .Pages }}
- {{ if .Sections}}
- {{ $.Page.Scratch.Set "pages" (.Pages | union .Sections) }}
- {{end}}
- {{ $pages := ($.Page.Scratch.Get "pages") }}
+ {{ if lt $.count $.depth }}
+ {{ if eq $.style "li" }}
+ <ul>
+ {{ end }}
+ {{ $.Page.Scratch.Set "pages" .Pages }}
+ {{ if .Sections }}
+ {{ $.Page.Scratch.Set "pages" (.Pages | union .Sections) }}
+ {{ end }}
- {{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}}
- {{else}}
- {{template "childs" dict "menu" $pages "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
- {{end}}
-{{if eq $.style "li"}}
-</ul>
-{{end}}
- {{end}}
+ {{ $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 }}
+ {{ else }}
+ {{ template "childs" dict "menu" $pages "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm }}
+ {{ end }}
- {{end}}
- {{end}}
-{{end}}
\ No newline at end of file
+ {{ if eq $.style "li" }}
+ </ul>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+{{ end }}
\ No newline at end of file
--- a/themes/learn/layouts/shortcodes/expand.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/shortcodes/expand.html Fri Jan 18 21:57:19 2019 +0000
@@ -2,15 +2,15 @@
<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>
<span>
- {{$expandMessage := T "Expand-title"}}
+ {{ $expandMessage := T "Expand-title" }}
{{ if .IsNamedParams }}
- {{.Get "default" | default $expandMessage}}
- {{else}}
- {{.Get 0 | default $expandMessage}}
- {{end}}
+ {{ .Get "default" | default $expandMessage }}
+ {{ else }}
+ {{ .Get 0 | default $expandMessage }}
+ {{ end }}
</span>
</div>
<div class="expand-content" style="display: none;">
- {{.Inner | safeHTML}}
+ {{ .Inner | safeHTML }}
</div>
</div>
\ No newline at end of file
--- a/themes/learn/layouts/shortcodes/mermaid.html Fri Jan 18 21:26:26 2019 +0000
+++ b/themes/learn/layouts/shortcodes/mermaid.html Fri Jan 18 21:57:19 2019 +0000
@@ -1,1 +1,3 @@
-<div class="mermaid" align="{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}">{{ safeHTML .Inner }}</div>
+<div class="mermaid" align='{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}'>
+ {{ safeHTML .Inner }}
+</div>