From 900bb5e845c3ad44defbd427cae3d44a4a43321f Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 25 Feb 2023 13:15:44 +0100 Subject: feat: Initial commit --- code/frontpage/layouts/404.html | 10 + .../layouts/_default/_markup/render-heading.html | 1 + code/frontpage/layouts/_default/baseof.html | 32 +++ code/frontpage/layouts/_default/index.js | 10 + code/frontpage/layouts/_default/index.json | 5 + code/frontpage/layouts/_default/list.html | 31 +++ .../frontpage/layouts/_default/section.sitemap.xml | 46 ++++ code/frontpage/layouts/_default/single.html | 10 + code/frontpage/layouts/_default/terms.html | 20 ++ code/frontpage/layouts/_default/versions.html | 27 +++ code/frontpage/layouts/blog/single.html | 53 +++++ code/frontpage/layouts/docs/list.html | 22 ++ code/frontpage/layouts/docs/single.html | 53 +++++ code/frontpage/layouts/index.headers | 10 + code/frontpage/layouts/index.html | 68 ++++++ code/frontpage/layouts/index.redirects | 13 ++ .../layouts/partials/content/card-image.html | 17 ++ .../frontpage/layouts/partials/content/figure.html | 37 +++ code/frontpage/layouts/partials/content/image.html | 32 +++ code/frontpage/layouts/partials/footer/footer.html | 18 ++ .../layouts/partials/footer/script-footer.html | 119 ++++++++++ .../layouts/partials/head/custom-head.html | 1 + code/frontpage/layouts/partials/head/favicons.html | 9 + code/frontpage/layouts/partials/head/head.html | 11 + .../frontpage/layouts/partials/head/opengraph.html | 69 ++++++ .../layouts/partials/head/resource-hints.html | 4 + .../layouts/partials/head/script-header.html | 8 + code/frontpage/layouts/partials/head/seo.html | 48 ++++ .../layouts/partials/head/structured-data.html | 210 +++++++++++++++++ .../layouts/partials/head/stylesheet.html | 11 + .../layouts/partials/head/twitter_cards.html | 24 ++ code/frontpage/layouts/partials/header/alert.html | 10 + code/frontpage/layouts/partials/header/header.html | 254 +++++++++++++++++++++ .../frontpage/layouts/partials/main/blog-meta.html | 2 + .../layouts/partials/main/breadcrumb.html | 4 + code/frontpage/layouts/partials/main/date.html | 6 + .../layouts/partials/main/docs-navigation.html | 24 ++ .../frontpage/layouts/partials/main/edit-page.html | 34 +++ .../layouts/partials/main/last-modified.html | 10 + .../partials/sidebar/auto-collapsible-menu.html | 57 +++++ .../partials/sidebar/auto-default-menu.html | 37 +++ .../layouts/partials/sidebar/docs-menu.html | 9 + .../layouts/partials/sidebar/docs-toc.html | 26 +++ .../partials/sidebar/manual-collapsible-menu.html | 63 +++++ .../partials/sidebar/manual-default-menu.html | 41 ++++ code/frontpage/layouts/robots.txt | 7 + code/frontpage/layouts/rss.xml | 27 +++ code/frontpage/layouts/shortcodes/alert.html | 12 + code/frontpage/layouts/shortcodes/details.html | 4 + code/frontpage/layouts/shortcodes/email.html | 1 + code/frontpage/layouts/shortcodes/mermaid.html | 8 + code/frontpage/layouts/shortcodes/video.html | 11 + code/frontpage/layouts/sitemap.xml | 22 ++ 53 files changed, 1698 insertions(+) create mode 100644 code/frontpage/layouts/404.html create mode 100644 code/frontpage/layouts/_default/_markup/render-heading.html create mode 100644 code/frontpage/layouts/_default/baseof.html create mode 100644 code/frontpage/layouts/_default/index.js create mode 100644 code/frontpage/layouts/_default/index.json create mode 100644 code/frontpage/layouts/_default/list.html create mode 100644 code/frontpage/layouts/_default/section.sitemap.xml create mode 100644 code/frontpage/layouts/_default/single.html create mode 100644 code/frontpage/layouts/_default/terms.html create mode 100644 code/frontpage/layouts/_default/versions.html create mode 100644 code/frontpage/layouts/blog/single.html create mode 100644 code/frontpage/layouts/docs/list.html create mode 100644 code/frontpage/layouts/docs/single.html create mode 100644 code/frontpage/layouts/index.headers create mode 100644 code/frontpage/layouts/index.html create mode 100644 code/frontpage/layouts/index.redirects create mode 100644 code/frontpage/layouts/partials/content/card-image.html create mode 100644 code/frontpage/layouts/partials/content/figure.html create mode 100644 code/frontpage/layouts/partials/content/image.html create mode 100644 code/frontpage/layouts/partials/footer/footer.html create mode 100644 code/frontpage/layouts/partials/footer/script-footer.html create mode 100644 code/frontpage/layouts/partials/head/custom-head.html create mode 100644 code/frontpage/layouts/partials/head/favicons.html create mode 100644 code/frontpage/layouts/partials/head/head.html create mode 100644 code/frontpage/layouts/partials/head/opengraph.html create mode 100644 code/frontpage/layouts/partials/head/resource-hints.html create mode 100644 code/frontpage/layouts/partials/head/script-header.html create mode 100644 code/frontpage/layouts/partials/head/seo.html create mode 100644 code/frontpage/layouts/partials/head/structured-data.html create mode 100644 code/frontpage/layouts/partials/head/stylesheet.html create mode 100644 code/frontpage/layouts/partials/head/twitter_cards.html create mode 100644 code/frontpage/layouts/partials/header/alert.html create mode 100644 code/frontpage/layouts/partials/header/header.html create mode 100644 code/frontpage/layouts/partials/main/blog-meta.html create mode 100644 code/frontpage/layouts/partials/main/breadcrumb.html create mode 100644 code/frontpage/layouts/partials/main/date.html create mode 100644 code/frontpage/layouts/partials/main/docs-navigation.html create mode 100644 code/frontpage/layouts/partials/main/edit-page.html create mode 100644 code/frontpage/layouts/partials/main/last-modified.html create mode 100644 code/frontpage/layouts/partials/sidebar/auto-collapsible-menu.html create mode 100644 code/frontpage/layouts/partials/sidebar/auto-default-menu.html create mode 100644 code/frontpage/layouts/partials/sidebar/docs-menu.html create mode 100644 code/frontpage/layouts/partials/sidebar/docs-toc.html create mode 100644 code/frontpage/layouts/partials/sidebar/manual-collapsible-menu.html create mode 100644 code/frontpage/layouts/partials/sidebar/manual-default-menu.html create mode 100644 code/frontpage/layouts/robots.txt create mode 100644 code/frontpage/layouts/rss.xml create mode 100644 code/frontpage/layouts/shortcodes/alert.html create mode 100644 code/frontpage/layouts/shortcodes/details.html create mode 100644 code/frontpage/layouts/shortcodes/email.html create mode 100644 code/frontpage/layouts/shortcodes/mermaid.html create mode 100644 code/frontpage/layouts/shortcodes/video.html create mode 100644 code/frontpage/layouts/sitemap.xml (limited to 'code/frontpage/layouts') diff --git a/code/frontpage/layouts/404.html b/code/frontpage/layouts/404.html new file mode 100644 index 0000000..76d447a --- /dev/null +++ b/code/frontpage/layouts/404.html @@ -0,0 +1,10 @@ +{{ define "main" }} +
+
+
+

{{ i18n "404-title" }}

+

{{ i18n "404-text" }}

+
+
+
+{{ end }} \ No newline at end of file diff --git a/code/frontpage/layouts/_default/_markup/render-heading.html b/code/frontpage/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..8abeac6 --- /dev/null +++ b/code/frontpage/layouts/_default/_markup/render-heading.html @@ -0,0 +1 @@ +{{ .Text | safeHTML }} diff --git a/code/frontpage/layouts/_default/baseof.html b/code/frontpage/layouts/_default/baseof.html new file mode 100644 index 0000000..155ff84 --- /dev/null +++ b/code/frontpage/layouts/_default/baseof.html @@ -0,0 +1,32 @@ + + + {{ partial "head/head.html" . }} + {{ if eq .Kind "home" -}} + {{ .Scratch.Set "class" "home" -}} + {{ else if eq .Kind "404" -}} + {{ .Scratch.Set "class" "error404" -}} + {{ else if eq .Kind "page" -}} + {{ .Scratch.Set "class" .Type -}} + {{ .Scratch.Add "class" " single" -}} + {{ else -}} + {{ .Scratch.Set "class" .Type -}} + {{ .Scratch.Add "class" " list" -}} + {{ end -}} + + {{ partial "header/header.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+
+ {{ block "sidebar-prefooter" . }}{{ end }} + {{ block "sidebar-footer" . }}{{ end }} + {{ partial "footer/footer.html" . }} + {{ partial "footer/script-footer.html" . }} + {{ if eq .Site.Params.options.toTopButton true -}} +
+ Top +
+ {{ end }} + + \ No newline at end of file diff --git a/code/frontpage/layouts/_default/index.js b/code/frontpage/layouts/_default/index.js new file mode 100644 index 0000000..9f764f9 --- /dev/null +++ b/code/frontpage/layouts/_default/index.js @@ -0,0 +1,10 @@ +var docs = [ +{{ range $index, $page := (where .Site.Pages "Section" "docs") -}} + { + id: {{ $index }}, + title: "{{ .Title }}", + description: "{{ .Params.description }}", + href: "{{ .URL | relURL }}" + }, +{{ end -}} +]; \ No newline at end of file diff --git a/code/frontpage/layouts/_default/index.json b/code/frontpage/layouts/_default/index.json new file mode 100644 index 0000000..6842871 --- /dev/null +++ b/code/frontpage/layouts/_default/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- $.Scratch.Add "index" (dict "title" .Title "description" .Params.description "contents" .Plain "RelPermalink" .RelPermalink) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} \ No newline at end of file diff --git a/code/frontpage/layouts/_default/list.html b/code/frontpage/layouts/_default/list.html new file mode 100644 index 0000000..455b2af --- /dev/null +++ b/code/frontpage/layouts/_default/list.html @@ -0,0 +1,31 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+ {{ with .Content -}}
{{ . }}
{{ end -}} +
+
+
+ {{ $paginator := .Paginate (.Data.Pages) -}} + {{ range $paginator.Pages -}} +
+
+ {{- .Scratch.Set "fillImage" "1270x620 Center" -}} +
+
+

{{ .Params.title }}

+

{{ .Params.excerpt | safeHTML }}

+ {{ partial "main/blog-meta.html" . -}} +
+
+
+
+ {{ end -}} +
+
+
+ {{ $.Scratch.Set "paginator" true }} + {{ template "_internal/pagination.html" . }} +
+
+{{ end }} \ No newline at end of file diff --git a/code/frontpage/layouts/_default/section.sitemap.xml b/code/frontpage/layouts/_default/section.sitemap.xml new file mode 100644 index 0000000..701951d --- /dev/null +++ b/code/frontpage/layouts/_default/section.sitemap.xml @@ -0,0 +1,46 @@ +{{ printf "" | safeHTML -}} + + {{ range $i, $e := .Data.Pages -}} + {{ if ne .Params.sitemap_exclude true }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + + {{ end -}} + {{ end -}} + {{ range .Sections -}} + {{ range $i, $e := .Data.Pages -}} + {{ if ne .Params.sitemap_exclude true -}} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + + {{ end -}} + {{ end -}} + {{ end -}} + \ No newline at end of file diff --git a/code/frontpage/layouts/_default/single.html b/code/frontpage/layouts/_default/single.html new file mode 100644 index 0000000..2f8fc99 --- /dev/null +++ b/code/frontpage/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+ {{ .Content }} +
+
+
+{{ end }} diff --git a/code/frontpage/layouts/_default/terms.html b/code/frontpage/layouts/_default/terms.html new file mode 100644 index 0000000..73fdeb8 --- /dev/null +++ b/code/frontpage/layouts/_default/terms.html @@ -0,0 +1,20 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+
{{ .Content }}
+
+ {{ range .Paginator.Pages }} + + {{ end }} +
+ {{ template "_internal/pagination.html" . }} +
+
+{{ end }} diff --git a/code/frontpage/layouts/_default/versions.html b/code/frontpage/layouts/_default/versions.html new file mode 100644 index 0000000..3101b82 --- /dev/null +++ b/code/frontpage/layouts/_default/versions.html @@ -0,0 +1,27 @@ +{{ define "main" }} +
+

{{ .Title }}

+

{{ .Params.lead | safeHTML }}

+ {{ .Content }} +
+ {{ range $release := sort (index $.Site.Data "docs-versions") "group" "desc" -}} +
+

{{ $release.group }}

+

{{ $release.description }}

+ {{ $versions := sort $release.versions "v" "desc" -}} + {{ range $i, $version := $versions -}} + {{ $len := len $versions -}} + {{ if (eq $i 0) }}{{ end }} + {{ end -}} +
+ {{ end -}} +
+
+{{ end }} diff --git a/code/frontpage/layouts/blog/single.html b/code/frontpage/layouts/blog/single.html new file mode 100644 index 0000000..7e6e4d2 --- /dev/null +++ b/code/frontpage/layouts/blog/single.html @@ -0,0 +1,53 @@ +{{ define "main" }} +
+
+
+
+

{{ .Title }}

+ {{ partial "main/blog-meta.html" . }} +
+
+
+ {{ .Content }} + {{ if .Params.tags -}} +
+ {{ range $index, $tag := .Params.tags -}} + {{ . }} + {{ end -}} +
+ {{ end -}} +
+
+
+ +{{ $related := .Site.RegularPages.Related . | first 3 -}} +{{ with $related -}} + +{{ end -}} + +{{ end }} + + diff --git a/code/frontpage/layouts/docs/list.html b/code/frontpage/layouts/docs/list.html new file mode 100644 index 0000000..4775e0c --- /dev/null +++ b/code/frontpage/layouts/docs/list.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
+
+
+

{{ if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}

+
{{ .Content }}
+
+ {{ $currentSection := .CurrentSection }} + {{ range where .Site.RegularPages.ByTitle "Section" .Section }} + {{ if in (.RelPermalink | string) $currentSection.RelPermalink }} + + {{ end }} + {{ end }} +
+
+
+
+{{ end }} \ No newline at end of file diff --git a/code/frontpage/layouts/docs/single.html b/code/frontpage/layouts/docs/single.html new file mode 100644 index 0000000..3f88e71 --- /dev/null +++ b/code/frontpage/layouts/docs/single.html @@ -0,0 +1,53 @@ +{{ define "main" }} +
+
+ +
+ {{ if ne .Params.toc false -}} + + {{ end -}} + {{ if .Params.toc -}} +
+ {{ else -}} +
+ {{ end -}} + {{ if .Site.Params.options.breadCrumb -}} + + + {{ end }} +

{{ .Title }}

+

{{ .Params.lead | safeHTML }}

+ {{ if ne .Params.toc false -}} + + {{ end -}} + {{ .Content }} + + {{ partial "main/docs-navigation.html" . }} + +
+
+{{ end }} diff --git a/code/frontpage/layouts/index.headers b/code/frontpage/layouts/index.headers new file mode 100644 index 0000000..a44c93a --- /dev/null +++ b/code/frontpage/layouts/index.headers @@ -0,0 +1,10 @@ +/* + Strict-Transport-Security: max-age=31536000; includeSubDomains; preload + X-Content-Type-Options: nosniff + X-XSS-Protection: 1; mode=block + Content-Security-Policy: default-src 'self'; frame-ancestors https://jamstackthemes.dev; manifest-src 'self' https://*.netlify.app; connect-src 'self' https://*.netlify.app; font-src 'self' https://*.netlify.app; img-src 'self' https://*.netlify.app data: https://i.giphy.com; script-src 'self' https://*.netlify.app 'sha512-RGGByJUOP98hE4wFZM78RM/3MijWJs0Tm0DbfrFhCDCXKXfDx60fii+syp5iMs3UcNX/1H4zJNgmqSejfhHrYw==' 'sha512-RBYr6Ld4w1yVqaACrgrBLQfPgGhj/1jyacA74WxJ1KM6KVcSWymwrdDwb3HDcdpwiNJ5yssot1He0U9vXoQVlg==' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk=' 'sha256-vOgyKS2vkH4n5TxBJpeh9SgzrE6LVGsAeOAvEST6oCc='; style-src 'self' https://*.netlify.app 'unsafe-inline' + X-Frame-Options: SAMEORIGIN + Referrer-Policy: strict-origin + Feature-Policy: geolocation 'self' + Cache-Control: public, max-age=31536000 + Access-Control-Allow-Origin: * diff --git a/code/frontpage/layouts/index.html b/code/frontpage/layouts/index.html new file mode 100644 index 0000000..ca44125 --- /dev/null +++ b/code/frontpage/layouts/index.html @@ -0,0 +1,68 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+
+
+

{{ .Params.lead | safeHTML }}

+

GPLv3 Licensed. + + License + + - + + Source + +

+
+
+
+{{ end }} + +{{ define "sidebar-prefooter" }} +{{ if eq $.Site.Language.LanguageName "English" }} +
+
+
+
+

Projects

+

Manage your projects with time tracking, planning and ecomnomics all built-in.

+
+
+

Task management

+

Manage your tasks across projects and personal objectives.

+
+
+

Support tickets

+

Follow-up your customers with built-in support for email, chat and phone support channels.

+
+
+

Wiki

+

Manage your companys' global, project and personal documentation needs with a lightweight and + complete wiki.

+
+
+

Transparency

+

Practise transparency with your customers by giving them a dashboard to get relevant information

+
+
+

Integrate

+

We expose our own production apis for public use, giving you unrestricted integration possibilities + and reliability.

+
+
+
+
+{{ end }} +{{ end }} + +{{ define "sidebar-footer" }} +
+
+
+ {{- .Content -}} +
+
+
+{{ end }} \ No newline at end of file diff --git a/code/frontpage/layouts/index.redirects b/code/frontpage/layouts/index.redirects new file mode 100644 index 0000000..12b9350 --- /dev/null +++ b/code/frontpage/layouts/index.redirects @@ -0,0 +1,13 @@ +{{- range $p := .Site.Pages -}} +{{- range .Aliases }} +{{ . }} {{ $p.RelPermalink }} +{{- end }} +{{- end }} + +# /docs/1.0/prologue/ /docs/1.0/prologue/introduction/ +# /docs/1.0/help/ /docs/1.0/help/how-to-update/ +# /docs/1.0/ /docs/1.0/prologue/introduction/ +# /docs/ /docs/1.0/prologue/introduction/ +# +# /docs/0.1/* https://v0-1-0--doks-versioning-poc.netlify.app/docs/0.1/:splat 200 +# /docs/0.2/* https://v0-2-0--doks-versioning-poc.netlify.app/docs/0.2/:splat 200 diff --git a/code/frontpage/layouts/partials/content/card-image.html b/code/frontpage/layouts/partials/content/card-image.html new file mode 100644 index 0000000..51a5e51 --- /dev/null +++ b/code/frontpage/layouts/partials/content/card-image.html @@ -0,0 +1,17 @@ +{{ $fillImage := .Scratch.Get "fillImageCard" }} +{{ if not $fillImage -}} +{{ $fillImage = site.Params.fillImage }} +{{ end -}} + +{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }} +{{ if not $image -}} +{{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }} +{{ end -}} + +{{ $webp := printf "%s%s" $fillImage " webp" }} +{{/* {{ $image = $image.Resize $webp}} */}} + +{{ $lqip := $image.Resize site.Params.lqipWidth -}} + +{{ .Title }} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/content/figure.html b/code/frontpage/layouts/partials/content/figure.html new file mode 100644 index 0000000..fbb0bde --- /dev/null +++ b/code/frontpage/layouts/partials/content/figure.html @@ -0,0 +1,37 @@ +{{ $fillImage := .Scratch.Get "fillImage" }} +{{ if not $fillImage -}} + {{ $fillImage = site.Params.fillImage }} +{{ end -}} + +{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }} +{{ if not $image -}} + {{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }} +{{ end -}} + +{{ $image = $image.Fill $fillImage }} +{{ $lqip := $image.Resize site.Params.lqipWidth -}} + +{{ $imgSrc := "" -}} +{{ $imgSrcSet := slice -}} + +{{ $widths := site.Params.landscapePhotoWidths -}} +{{ if gt $image.Height $image.Width -}} + {{ $widths = site.Params.portraitPhotoWidths -}} +{{ end -}} + +{{ range $widths -}} + {{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}} + {{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}} + {{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}} +{{ end -}} +{{ $imgSrcSet = (delimit $imgSrcSet ",") -}} + +{{ if gt $image.Width site.Params.smallLimit -}} +
+ {{ .Title }} + + +
+{{ else -}} + {{ .Title }} +{{ end -}} diff --git a/code/frontpage/layouts/partials/content/image.html b/code/frontpage/layouts/partials/content/image.html new file mode 100644 index 0000000..2772531 --- /dev/null +++ b/code/frontpage/layouts/partials/content/image.html @@ -0,0 +1,32 @@ +{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }} +{{ if not $image -}} + {{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }} +{{ end -}} + +{{ $image = $image.Fill site.Params.fillImage }} +{{ $lqip := $image.Resize site.Params.lqipWidth -}} + +{{ $imgSrc := "" -}} +{{ $imgSrcSet := slice -}} + +{{ $widths := site.Params.landscapePhotoWidths -}} +{{ if gt $image.Height $image.Width -}} + {{ $widths = site.Params.portraitPhotoWidths -}} +{{ end -}} + +{{ range $widths -}} + {{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}} + {{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}} + {{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}} +{{ end -}} +{{ $imgSrcSet = (delimit $imgSrcSet ",") -}} + +{{ if gt $image.Width site.Params.smallLimit -}} +
+ {{ .Title }} + + +
+{{ else -}} + {{ .Title }} +{{ end -}} diff --git a/code/frontpage/layouts/partials/footer/footer.html b/code/frontpage/layouts/partials/footer/footer.html new file mode 100644 index 0000000..ceb5fae --- /dev/null +++ b/code/frontpage/layouts/partials/footer/footer.html @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/code/frontpage/layouts/partials/footer/script-footer.html b/code/frontpage/layouts/partials/footer/script-footer.html new file mode 100644 index 0000000..8799730 --- /dev/null +++ b/code/frontpage/layouts/partials/footer/script-footer.html @@ -0,0 +1,119 @@ +{{ $indexTemplate := resources.Get "js/index.js" -}} +{{ $index := $indexTemplate | resources.ExecuteAsTemplate "index.js" . -}} + +{{ $bs := resources.Get "js/bootstrap.js" -}} +{{ $bs := $bs | js.Build -}} + +{{ $highlight := resources.Get "js/highlight.js" -}} +{{ $highlight := $highlight | js.Build -}} + +{{ $katex := resources.Get "js/vendor/katex/dist/katex.js" -}} +{{ $katexAutoRender := resources.Get "js/vendor/katex/dist/contrib/auto-render.js" -}} + +{{ $mermaid := resources.Get "js/mermaid.js" | js.Build -}} + +{{ $app := resources.Get "js/app.js" -}} + +{{ $slice := slice $app -}} + +{{ if .Site.Params.options.lazySizes -}} + {{ $lazySizes := resources.Get "js/lazysizes.js" -}} + {{ $lazySizes := $lazySizes | js.Build -}} + {{ $slice = $slice | append $lazySizes -}} +{{ end -}} + +{{ if .Site.Params.options.clipBoard -}} + {{ $clipBoard := resources.Get "js/clipboard.js" -}} + {{ $clipBoard := $clipBoard | js.Build -}} + {{ $slice = $slice | append $clipBoard -}} +{{ end -}} + +{{ if .Site.Params.options.instantPage -}} + {{ $instantPage := resources.Get "js/instant.page.js" -}} + {{ $instantPage := $instantPage | js.Build -}} + {{ $slice = $slice | append $instantPage -}} +{{ end -}} + +{{ $showFlexSearch := .Site.Params.options.flexSearch }} + +{{ if $showFlexSearch -}} + {{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.bundle.js" -}} + {{ $slice = $slice | append $flexSearch -}} + {{ if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) -}} + {{ $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) -}} + {{ end -}} +{{ end -}} + +{{ if .Site.Params.options.darkMode -}} + {{ $darkMode := resources.Get "js/darkmode.js" -}} + {{ $darkMode := $darkMode | js.Build -}} + {{ $slice = $slice | append $darkMode -}} +{{ end -}} + +{{ if and (.Site.Params.alert) (.Site.Params.alertDismissable) -}} + {{ $alert := resources.Get "js/alert.js" -}} + {{ $alert := $alert | js.Build -}} + {{ $slice = $slice | append $alert -}} +{{ end -}} + +{{ if .Site.Params.options.kaTex -}} + {{ $katexConfig := resources.Get "js/katex.js" -}} + {{ $katexConfig := $katexConfig | js.Build -}} + {{ $slice = $slice | append $katexConfig -}} +{{ end -}} + +{{ $scrollLock := resources.Get "js/scroll-lock.js" | js.Build -}} +{{ $slice = $slice | append $scrollLock -}} + +{{ if .Site.Params.options.toTopButton -}} + {{ $toTopButton := resources.Get "js/to-top.js" -}} + {{ $toTopButton := $toTopButton | js.Build -}} + {{ $slice = $slice | append $toTopButton -}} +{{ end -}} + +{{ $js := $slice | resources.Concat "main.js" -}} + +{{ if eq (hugo.Environment) "development" -}} + {{ if .Site.Params.options.bootStrapJs -}} + + {{ end -}} + {{ if .Site.Params.options.highLight -}} + + {{ end -}} + {{ if .Site.Params.options.kaTex -}} + + + {{ end -}} + + {{ with .Params.mermaid -}} + + {{ end -}} + {{ if $showFlexSearch -}} + + {{ end -}} +{{ else -}} + {{ $js := $js | minify | fingerprint "sha512" -}} + {{ $index := $index | minify | fingerprint "sha512" -}} + {{ $bs := $bs | minify | fingerprint "sha512" -}} + {{ $highlight := $highlight | minify | fingerprint "sha512" -}} + {{ $katex := $katex | minify | fingerprint "sha512" -}} + {{ $katexAutoRender := $katexAutoRender | minify | fingerprint "sha512" -}} + {{ $mermaid := $mermaid | minify | fingerprint "sha512" -}} + {{ if .Site.Params.options.bootStrapJs -}} + + {{ end -}} + {{ if .Site.Params.options.highLight -}} + + {{ end -}} + {{ if .Site.Params.options.kaTex -}} + + + {{ end -}} + + {{ with .Params.mermaid -}} + + {{ end -}} + {{ if $showFlexSearch -}} + + {{ end -}} +{{ end -}} diff --git a/code/frontpage/layouts/partials/head/custom-head.html b/code/frontpage/layouts/partials/head/custom-head.html new file mode 100644 index 0000000..0c59d7f --- /dev/null +++ b/code/frontpage/layouts/partials/head/custom-head.html @@ -0,0 +1 @@ + diff --git a/code/frontpage/layouts/partials/head/favicons.html b/code/frontpage/layouts/partials/head/favicons.html new file mode 100644 index 0000000..93c5ed5 --- /dev/null +++ b/code/frontpage/layouts/partials/head/favicons.html @@ -0,0 +1,9 @@ + + +{{ if os.FileExists "static/favicon.svg" -}} + +{{ end -}} + + + + diff --git a/code/frontpage/layouts/partials/head/head.html b/code/frontpage/layouts/partials/head/head.html new file mode 100644 index 0000000..12e2a8c --- /dev/null +++ b/code/frontpage/layouts/partials/head/head.html @@ -0,0 +1,11 @@ + + + + + {{ block "head/resource-hints" . }}{{ partial "head/resource-hints.html" . }}{{ end }} + {{ block "head/script-header" . }}{{ partial "head/script-header.html" . }}{{ end }} + {{ block "head/stylesheet" . }}{{ partial "head/stylesheet.html" . }}{{ end }} + {{ block "head/seo" . }}{{ partial "head/seo.html" . }}{{ end }} + {{ block "head/favicons" . }}{{ partial "head/favicons.html" . }}{{ end }} + {{ block "head/custom-head" . }}{{ partial "head/custom-head.html" . }}{{ end }} + diff --git a/code/frontpage/layouts/partials/head/opengraph.html b/code/frontpage/layouts/partials/head/opengraph.html new file mode 100644 index 0000000..6127e82 --- /dev/null +++ b/code/frontpage/layouts/partials/head/opengraph.html @@ -0,0 +1,69 @@ + + + + +{{ if $.Scratch.Get "paginator" -}} + {{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "blog" ) -}} + +{{ else -}} + +{{ end -}} +{{ with .Site.Params.title -}} + +{{ end -}} + +{{ $iso8601 := "2006-01-02T15:04:05-07:00" -}} +{{ if .IsPage -}} + {{ if not .PublishDate.IsZero -}} + + {{ else if not .Date.IsZero -}} + + {{ end -}} + {{ if not .Lastmod.IsZero -}} + + {{ end -}} +{{ else -}} + {{ if not .Date.IsZero -}} + + {{ end -}} +{{ end -}} + +{{ if eq .Kind "home" -}} + {{ .Scratch.Set "title" .Site.Params.titleHome -}} +{{ else -}} + {{ .Scratch.Set "title" .Title -}} +{{ end -}} + +{{ with $.Params.images -}} + {{ range first 6 . -}} + + {{ end -}} +{{ else -}} + {{ $images := $.Resources.ByType "image" -}} + {{ $featured := $images.GetMatch "*feature*" -}} + {{ if not $featured -}} + {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }} + {{ end -}} + {{ with $featured -}} + + {{ else -}} + {{ with $.Site.Params.images -}} + + + {{ end -}} + {{ end -}} +{{ end -}} + +{{ with $.Site.Params.images -}} + {{ $.Scratch.Set "primaryImage" (index . 0 | absURL) -}} +{{ end -}} + +{{ with .Params.audio -}} + +{{ end -}} + +{{ with .Params.videos -}} + {{ range . -}} + + {{ end -}} +{{ end -}} diff --git a/code/frontpage/layouts/partials/head/resource-hints.html b/code/frontpage/layouts/partials/head/resource-hints.html new file mode 100644 index 0000000..6ebcdeb --- /dev/null +++ b/code/frontpage/layouts/partials/head/resource-hints.html @@ -0,0 +1,4 @@ +{{ if .Site.Params.options.kaTex -}} + + +{{ end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/head/script-header.html b/code/frontpage/layouts/partials/head/script-header.html new file mode 100644 index 0000000..38e5b5b --- /dev/null +++ b/code/frontpage/layouts/partials/head/script-header.html @@ -0,0 +1,8 @@ +{{ if .Site.Params.options.darkMode -}} + {{ $darkModeInit := resources.Get "js/darkmode-init.js" | js.Build | minify -}} + +{{ end -}} +{{- if and (.Site.Params.alert) (.Site.Params.alertDismissable) -}} + {{ $alertInit := resources.Get "js/alert-init.js" | js.Build | minify -}} + +{{- end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/head/seo.html b/code/frontpage/layouts/partials/head/seo.html new file mode 100644 index 0000000..ac31d72 --- /dev/null +++ b/code/frontpage/layouts/partials/head/seo.html @@ -0,0 +1,48 @@ +{{ if eq .Kind "404" -}} + +{{ else -}} + {{ with .Params.robots -}} + + {{ else -}} + + + + {{ end -}} +{{ end -}} + +{{ if .IsHome -}} + {{ .Site.Params.title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.titleAddition }} +{{ else -}} + {{ .Title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.title }} +{{ end -}} + +{{ with .Description -}} + +{{ else -}} + {{ with .Summary | plainify -}} + + {{ else -}} + + {{ end -}} +{{ end -}} + +{{ if $.Scratch.Get "paginator" }} + + {{ if .Paginator.HasPrev -}} + + {{ end -}} + {{ if .Paginator.HasNext -}} + + {{ end -}} +{{ else -}} + +{{ end -}} + +{{ partial "head/opengraph.html" . }} +{{ partial "head/twitter_cards.html" . }} + +{{ range .AlternativeOutputFormats -}} + +{{ end -}} + +{{ partial "head/structured-data.html" . }} diff --git a/code/frontpage/layouts/partials/head/structured-data.html b/code/frontpage/layouts/partials/head/structured-data.html new file mode 100644 index 0000000..1f153a3 --- /dev/null +++ b/code/frontpage/layouts/partials/head/structured-data.html @@ -0,0 +1,210 @@ +{{ $baseURL := "/" | absURL -}} + +{{ $dot := . -}} +{{ $dot.Scratch.Set "path" "" -}} +{{ $dot.Scratch.Set "breadcrumb" slice -}} + +{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" -}} +{{ $.Scratch.Add "path" .Site.BaseURL -}} + +{{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) -}} + {{ range $index, $element := split $url "/" -}} + {{ $dot.Scratch.Add "path" $element -}} + {{ $.Scratch.Add "path" "/" -}} + {{ if ne $element "" -}} + {{ $.Scratch.Add "breadcrumb" (slice (dict "url" ($.Scratch.Get "path") "name" . "position" (add $index 2))) -}} + {{ end -}} +{{ end -}} + + \ No newline at end of file diff --git a/code/frontpage/layouts/partials/head/stylesheet.html b/code/frontpage/layouts/partials/head/stylesheet.html new file mode 100644 index 0000000..4dc25c0 --- /dev/null +++ b/code/frontpage/layouts/partials/head/stylesheet.html @@ -0,0 +1,11 @@ +{{ if eq (hugo.Environment) "development" -}} + {{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}} + {{ $css := resources.Get "scss/app.scss" | toCSS $options -}} + +{{ else -}} + {{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}} + {{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}} + {{ $secureCSS := $css | resources.Fingerprint "sha512" -}} + +{{ end -}} + \ No newline at end of file diff --git a/code/frontpage/layouts/partials/head/twitter_cards.html b/code/frontpage/layouts/partials/head/twitter_cards.html new file mode 100644 index 0000000..fdf581c --- /dev/null +++ b/code/frontpage/layouts/partials/head/twitter_cards.html @@ -0,0 +1,24 @@ + + + + + +{{ with $.Params.images -}} + +{{ else -}} + {{ $images := $.Resources.ByType "image" -}} + {{ $featured := $images.GetMatch "*feature*" -}} + {{ if not $featured -}} + {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" -}} + {{ end -}} + {{ with $featured -}} + + {{ else -}} + {{ with $.Site.Params.images -}} + + {{ else -}} + + {{ end -}} + {{ end -}} +{{ end -}} + \ No newline at end of file diff --git a/code/frontpage/layouts/partials/header/alert.html b/code/frontpage/layouts/partials/header/alert.html new file mode 100644 index 0000000..7944ae9 --- /dev/null +++ b/code/frontpage/layouts/partials/header/alert.html @@ -0,0 +1,10 @@ +{{ if .Site.Params.alertDismissable -}} + +{{ else -}} + +{{ end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/header/header.html b/code/frontpage/layouts/partials/header/header.html new file mode 100644 index 0000000..7869784 --- /dev/null +++ b/code/frontpage/layouts/partials/header/header.html @@ -0,0 +1,254 @@ +{{ if .Site.Params.alert -}} +{{ partial "header/alert.html" . }} +{{ end -}} + +{{ if eq .Site.Params.options.navbarSticky true -}} +
+ {{ end -}} + + + + {{ if eq .Site.Params.options.navbarSticky true }} +
+{{ end -}} + +{{ if eq .Section "docs" -}} +
+ +
+ +{{ else if ne .CurrentSection .FirstSection -}} +
+ +
+{{ end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/main/blog-meta.html b/code/frontpage/layouts/partials/main/blog-meta.html new file mode 100644 index 0000000..7d11e94 --- /dev/null +++ b/code/frontpage/layouts/partials/main/blog-meta.html @@ -0,0 +1,2 @@ +{{ $last := sub (len .Params.contributors) 1 }} +

Posted{{ if .Params.categories -}} in {{ range $index, $category := .Params.categories -}}{{ if gt $index 0 -}}, {{ end -}}{{ . }}{{ end -}}{{ end -}} on {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }}{{ if eq $index $last }} and {{ else }}, {{ end }}{{ end }}{{ . }}{{ end -}}{{ end -}} ‐ {{ .ReadingTime -}} min read

\ No newline at end of file diff --git a/code/frontpage/layouts/partials/main/breadcrumb.html b/code/frontpage/layouts/partials/main/breadcrumb.html new file mode 100644 index 0000000..1d960d2 --- /dev/null +++ b/code/frontpage/layouts/partials/main/breadcrumb.html @@ -0,0 +1,4 @@ +{{ with .Parent -}} + {{ partial "main/breadcrumb.html" . -}} +

+{{ end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/main/date.html b/code/frontpage/layouts/partials/main/date.html new file mode 100644 index 0000000..4b41ddb --- /dev/null +++ b/code/frontpage/layouts/partials/main/date.html @@ -0,0 +1,6 @@ + +{{ $format := default "January 2, 2006" .Format -}} +{{ return (.Date.Format $format) -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/main/docs-navigation.html b/code/frontpage/layouts/partials/main/docs-navigation.html new file mode 100644 index 0000000..e6a5668 --- /dev/null +++ b/code/frontpage/layouts/partials/main/docs-navigation.html @@ -0,0 +1,24 @@ +{{ if or .Prev .Next -}} +
+ + {{ $pages := where site.RegularPages "Section" .Section -}} + {{ with $pages.Next . -}} + +
+
+ ← {{ .Title }} +
+
+
+ {{ end -}} + {{ with $pages.Prev . -}} + +
+
+ {{ .Title }} → +
+
+
+ {{ end -}} +
+{{ end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/main/edit-page.html b/code/frontpage/layouts/partials/main/edit-page.html new file mode 100644 index 0000000..b69ed36 --- /dev/null +++ b/code/frontpage/layouts/partials/main/edit-page.html @@ -0,0 +1,34 @@ +{{ $parts := slice .Site.Params.docsRepo }} + +{{ if (eq .Site.Params.repoHost "GitHub") }} + {{ $parts = $parts | append "blob" .Site.Params.docsRepoBranch }} +{{ else if (eq .Site.Params.repoHost "Gitea") }} + {{ $parts = $parts | append "_edit" .Site.Params.docsRepoBranch }} +{{ else if (eq .Site.Params.repoHost "GitLab") }} + {{ $parts = $parts | append "-/blob" .Site.Params.docsRepoBranch }} +{{ else if (eq .Site.Params.repoHost "Bitbucket") }} + {{ $parts = $parts | append "src" .Site.Params.docsRepoBranch }} +{{ else if (eq .Site.Params.repoHost "BitbucketServer") }} + {{ $parts = $parts | append "browse" .Site.Params.docsRepoBranch }} +{{ end }} + +{{ if isset .Site.Params "docsreposubpath" }} + {{ if not (eq .Site.Params.docsRepoSubPath "") }} + {{ $parts = $parts | append .Site.Params.docsRepoSubPath }} + {{ end }} +{{ end }} + +{{ $filePath := replace .File.Path "\\" "/" }} + +{{ $parts = $parts | append "content" .Lang $filePath }} + +{{ $url := delimit $parts "/" }} + +
+ + + + + Edit this page on {{ .Site.Params.repoHost }} + +
diff --git a/code/frontpage/layouts/partials/main/last-modified.html b/code/frontpage/layouts/partials/main/last-modified.html new file mode 100644 index 0000000..edb6c7d --- /dev/null +++ b/code/frontpage/layouts/partials/main/last-modified.html @@ -0,0 +1,10 @@ +{{ if and .GitInfo .Site.Params.docsRepo -}} + {{- $date := partial "main/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} + {{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} +
+ + + Last modified on {{ $date }} + +
+{{ end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/sidebar/auto-collapsible-menu.html b/code/frontpage/layouts/partials/sidebar/auto-collapsible-menu.html new file mode 100644 index 0000000..4600d0a --- /dev/null +++ b/code/frontpage/layouts/partials/sidebar/auto-collapsible-menu.html @@ -0,0 +1,57 @@ + + diff --git a/code/frontpage/layouts/partials/sidebar/auto-default-menu.html b/code/frontpage/layouts/partials/sidebar/auto-default-menu.html new file mode 100644 index 0000000..6e4565b --- /dev/null +++ b/code/frontpage/layouts/partials/sidebar/auto-default-menu.html @@ -0,0 +1,37 @@ + +{{ $currentPage := . -}} +{{ $section := $currentPage.Section -}} +{{ range (where .Site.Sections "Section" "in" $section) }} + {{ range .Sections }} + {{ $active := in $currentPage.RelPermalink .RelPermalink }} +

{{ .Title }}

+ + {{ end }} +{{ end }} diff --git a/code/frontpage/layouts/partials/sidebar/docs-menu.html b/code/frontpage/layouts/partials/sidebar/docs-menu.html new file mode 100644 index 0000000..b7baebb --- /dev/null +++ b/code/frontpage/layouts/partials/sidebar/docs-menu.html @@ -0,0 +1,9 @@ +{{ if and .Site.Params.menu.section.auto .Site.Params.menu.section.collapsibleSidebar -}} + {{ partial "sidebar/auto-collapsible-menu.html" . -}} +{{ else if and .Site.Params.menu.section.auto (not .Site.Params.menu.section.collapsibleSidebar) -}} + {{ partial "sidebar/auto-default-menu.html" . -}} +{{ else if and (not .Site.Params.menu.section.auto) .Site.Params.menu.section.collapsibleSidebar -}} + {{ partial "sidebar/manual-collapsible-menu.html" . -}} +{{ else if and (not .Site.Params.menu.section.auto) (not .Site.Params.menu.section.collapsibleSidebar) -}} + {{ partial "sidebar/manual-default-menu.html" . -}} +{{ end -}} \ No newline at end of file diff --git a/code/frontpage/layouts/partials/sidebar/docs-toc.html b/code/frontpage/layouts/partials/sidebar/docs-toc.html new file mode 100644 index 0000000..c71a7b8 --- /dev/null +++ b/code/frontpage/layouts/partials/sidebar/docs-toc.html @@ -0,0 +1,26 @@ +{{ if and (ne .Params.toc false) (ne .TableOfContents "") -}} +
+ +
+
+ +
+
+
+ +{{ end -}} diff --git a/code/frontpage/layouts/partials/sidebar/manual-collapsible-menu.html b/code/frontpage/layouts/partials/sidebar/manual-collapsible-menu.html new file mode 100644 index 0000000..f83c667 --- /dev/null +++ b/code/frontpage/layouts/partials/sidebar/manual-collapsible-menu.html @@ -0,0 +1,63 @@ + + diff --git a/code/frontpage/layouts/partials/sidebar/manual-default-menu.html b/code/frontpage/layouts/partials/sidebar/manual-default-menu.html new file mode 100644 index 0000000..32c4cd4 --- /dev/null +++ b/code/frontpage/layouts/partials/sidebar/manual-default-menu.html @@ -0,0 +1,41 @@ + +{{ $currentPage := . -}} +{{ $section := $currentPage.Section -}} +{{ range (index .Site.Menus $section) -}} +

{{ .Name }}

+ {{ if .HasChildren -}} + + {{ end -}} +{{ end -}} diff --git a/code/frontpage/layouts/robots.txt b/code/frontpage/layouts/robots.txt new file mode 100644 index 0000000..3107a65 --- /dev/null +++ b/code/frontpage/layouts/robots.txt @@ -0,0 +1,7 @@ +User-agent: * +{{ if eq (hugo.Environment) "production" -}} +Allow: / +{{ else -}} +Disallow: / +{{ end }} +Sitemap: {{ "sitemap.xml" | absURL -}} diff --git a/code/frontpage/layouts/rss.xml b/code/frontpage/layouts/rss.xml new file mode 100644 index 0000000..3a5bb13 --- /dev/null +++ b/code/frontpage/layouts/rss.xml @@ -0,0 +1,27 @@ +{{ printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.Params.languageTag | default "en-US" }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.copyRight }} + {{ . | safeHTML }}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Pages }}{{ if ne .Params.feed_exclude true }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + + {{ end }}{{ end }} + + diff --git a/code/frontpage/layouts/shortcodes/alert.html b/code/frontpage/layouts/shortcodes/alert.html new file mode 100644 index 0000000..e2abe8e --- /dev/null +++ b/code/frontpage/layouts/shortcodes/alert.html @@ -0,0 +1,12 @@ + diff --git a/code/frontpage/layouts/shortcodes/details.html b/code/frontpage/layouts/shortcodes/details.html new file mode 100644 index 0000000..61a7183 --- /dev/null +++ b/code/frontpage/layouts/shortcodes/details.html @@ -0,0 +1,4 @@ + + {{ with .Get 0 -}}{{ . | safeHTML }}{{ else -}}{{ errorf "No summary provided"}}{{ end -}} + {{ with .Inner -}}{{ . | markdownify}}{{ else -}}{{ errorf "No details provided"}}{{ end -}} + \ No newline at end of file diff --git a/code/frontpage/layouts/shortcodes/email.html b/code/frontpage/layouts/shortcodes/email.html new file mode 100644 index 0000000..88674fc --- /dev/null +++ b/code/frontpage/layouts/shortcodes/email.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/code/frontpage/layouts/shortcodes/mermaid.html b/code/frontpage/layouts/shortcodes/mermaid.html new file mode 100644 index 0000000..aeecad5 --- /dev/null +++ b/code/frontpage/layouts/shortcodes/mermaid.html @@ -0,0 +1,8 @@ +{{ if .Page.Params.mermaid -}} +
+ {{ $data := replaceRE "(^\\s+```)" "" .Inner -}} + {{ replaceRE "(```\\s+$)" "" $data -}} +
+{{ else -}} + {{ errorf "Failed to process mermaid shortcode: %s. Set mermaid to true in page front matter." .Position }} +{{ end -}} diff --git a/code/frontpage/layouts/shortcodes/video.html b/code/frontpage/layouts/shortcodes/video.html new file mode 100644 index 0000000..784c3a7 --- /dev/null +++ b/code/frontpage/layouts/shortcodes/video.html @@ -0,0 +1,11 @@ +
+ + {{ with .Get "webm-src" -}} + + {{ end -}} + {{ with .Get "mp4-src" -}} + + {{ end -}} + Sorry, your browser doesn't support embedded videos. + +
diff --git a/code/frontpage/layouts/sitemap.xml b/code/frontpage/layouts/sitemap.xml new file mode 100644 index 0000000..a3fcf7a --- /dev/null +++ b/code/frontpage/layouts/sitemap.xml @@ -0,0 +1,22 @@ +{{ printf "" | safeHTML }} + + {{ range .Data.Pages }}{{ if ne .Params.sitemap_exclude true }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + + {{ end }}{{ end }} + -- cgit v1.3