diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4b387a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.hugo_build.lock +public/ diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..203f02e --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +feditest.org diff --git a/README.md b/README.md new file mode 100644 index 0000000..ef8865f --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# FediTest.org + +This is the content of [feditest.org](https://feditest.org/). + +It is built with the [Hugo](https://gohugo.io/) static site generator, plus some Python scripts that generate a few of the pages. + +## Software requirements + +Install Git and Git-LFS, and initialize it: + +```shell +$ brew install git +$ brew install git-lfs +$ git lfs install +``` + +Install Hugo, e.g. on the Mac: + +```shell +$ brew install hugo +``` + +## To run the website locally + +Get the content: + +```shell +$ git clone https://github.com/fediverse-devnet/feditest.org.git +$ cd feditest.org +$ git submodule update +``` + +Run: + +```shell +$ hugo server +``` + +Then go to `http://localhost:1313/` (actual port will be printed to the terminal). diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..6160ee8 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,19 @@ +--- +title: FediTest +breadcrumbtitle: Home +layout: front +--- + +## FediTest + +This wants to become the website for the FediTest project, which builds a test suite for +the Fediverse. + +**Pardon our early work in progress.** + +
+ +### Follow us in the Fediverse + +- @feditest@mastodon.social + diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..344ba9b --- /dev/null +++ b/hugo.toml @@ -0,0 +1,22 @@ +baseURL = "https://feditest.org" +title = "FediTest" +languageCode = "en-US" +defaultContentLanguage = "en" +disableKinds = [ "taxonomy" ] +enableRobotsTXT = true +enableGitInfo = true + +[services.rss] +limit = 42 + +[markup.goldmark.renderer] +unsafe = true + +[markup.highlight] +noClasses = false + +[params.author] +name = "FediTest project" + +[sitemap] +filename = "sitemap.xml" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..da3abda --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,101 @@ + + + + + + + +{{ block "title" . }} + +{{ if .Site.Params.briefTitle }} + {{ .Site.Params.briefTitle }}{{ with .Title }} | {{ . }}{{ end }} + + +{{ else }} + {{ .Site.Title }}{{ with .Title }} | {{ . }}{{ end }} + + +{{ end }} +{{ end }} + + + + + +{{ if .IsHome }} + +{{ else }} + +{{ end }} + +{{ with .Site.Author.name }} + +{{ end }} + +{{ with .Site.Title }} + + +{{ end }} + +{{ with .Description }} + + + + +{{ end }} + +{{ with .Site.Params.ImageUrl }} + + + +{{ end }} +{{ with .Site.Params.Twitter }} + + +{{ end }} + +{{ with .Params.date }} + +{{ end }} + +{{ with .Keywords }} + + +{{ end }} + +{{ block "linksscripts" . }} +{{ partial "linksscripts.html" . }} +{{ end }} + +{{ range .AlternativeOutputFormats -}} +{{ printf ` ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} + + + + +{{ block "header" . }} +
+
+{{ partial "headerlogo.html" . }} + +
+
+{{ end }} + +{{ block "nav-sections" . }} +{{ partial "nav-sections.html" . }} +{{ end }} + +{{ block "main" . }} +

Placeholder for main content.

+{{ end }} + +{{ block "footer" . }} +{{ partial "footer.html" . }} +{{ end }} + + diff --git a/layouts/_default/front.html b/layouts/_default/front.html new file mode 100644 index 0000000..dffa283 --- /dev/null +++ b/layouts/_default/front.html @@ -0,0 +1,19 @@ +{{ define "main" }} + +{{ if .Params.class }} +
+{{ else }} +
+{{ end }} + +{{ if eq .Params.display false }} +

Post unavailable.

+{{ else }} +
+
+{{ .Content }} +
+
+{{ end }} +
+{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..c593faf --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,30 @@ +{{ define "main" }} + +{{ if .Params.class }} +
+{{ else }} +
+{{ end }} + +{{ partial "toc.html" . }} +{{ partial "breadcrumbs.html" . }} + +
+ +{{ partial "title-et-al-main.html" . }} + +{{ if .Content }} +
+{{ .Content }} +
+{{ if .Pages }} +

Details

+{{ end }} +{{ end }} + +{{ $p := ( .Paginate ( where ( where .Pages "Params.display" "!=" "hide" ) "Params.display" "!=" "false" )) }} +{{ partial "range-ul.html" $p.Pages.ByWeight }} +{{ partial "paginate-buttons.html" $p }} +
+
+{{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..0fa94fa --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,38 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := $pctx.RegularPages -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- 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.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{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 }} + + {{ .Title }} + {{ .Permalink }} +{{ if .Date }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} +{{ end }} +{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} +{{ end }} + {{ .Permalink }} + {{ .Content | html }} + +{{ end }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..abf6ea7 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,25 @@ +{{ define "main" }} + +{{ if .Params.class }} +
+{{ else }} +
+{{ end }} + +{{ partial "toc.html" . }} +{{ partial "breadcrumbs.html" . }} + +{{ if eq .Params.display false }} +

Post unavailable.

+{{ else }} +
+ +{{ partial "title-et-al-main.html" . }} + +
+{{ .Content }} +
+
+{{ end }} +
+{{ end }} diff --git a/layouts/glossary/list.html b/layouts/glossary/list.html new file mode 100644 index 0000000..0dad989 --- /dev/null +++ b/layouts/glossary/list.html @@ -0,0 +1,46 @@ +{{ define "main" }} + +{{ if .Params.class }} +
+{{ else }} +
+{{ end }} + +{{ partial "breadcrumbs.html" . }} + +
+ +{{ partial "title-et-al-main.html" . }} + +{{ if .Content }} +
+{{ .Content }} +
+{{ end }} + +{{ $p := ( .Paginate ( where ( where ( .RegularPages ) "Params.display" "!=" "hide" ) "Params.display" "!=" "false" ) 100 ) }} +
+{{ range $p.Pages.ByTitle }} +
+ {{ .Title }} +{{ if .Params.domain }} + ({{ .Params.domain }}) +{{ end }} +{{ if .Params.status }} + {{ .Params.status }} +{{ end }} +
+{{ if .Params.summary }} +
+{{ .Params.summary }} +
+{{ end }} +{{ end }} +
+ + +{{ partial "paginate-buttons-forward-backward.html" $p }} + +
+
+{{ end }} diff --git a/layouts/glossary/single.html b/layouts/glossary/single.html new file mode 100644 index 0000000..93ff94e --- /dev/null +++ b/layouts/glossary/single.html @@ -0,0 +1,59 @@ +{{ define "main" }} + +{{ if .Params.class }} +
+{{ else }} +
+{{ end }} + +{{ partial "breadcrumbs.html" . }} + +{{ if eq .Params.display false }} +

Post unavailable.

+{{ else }} +
+ +{{ partial "status.html" . }} +{{ with .Params.date }} +

{{ dateFormat "2006-01-02" . }}

+{{ end }} +

Glossary term: {{ .Title }}

+ +{{ with .Params.subtitle }} +

{{ . }}

+{{ end }} + +{{ with .Site.Params.Author.Name }} +

{{ . }}

+{{ end }} +

{{ .Page.Permalink }}

+ +{{ partial "categories.html" . }} + +
+{{ .Content }} +
+{{ partial "discuss.html" . }} +{{ if or .Params.seealsoweb .Params.seealsoterm }} +
+

See also:

+
    +{{ $s := .Site }} +{{ range $tag := .Params.seealsoterm }} +{{ with $s.GetPage ( printf "/glossary/%s.md" ( $tag )) -}} + +
  • {{ .Title }}
  • +{{ else }} +
  • {{ $tag }}
  • +{{ end }} +{{ end }} +{{ range $name, $url := .Params.seealsoweb }} +
  • {{ $name }}
  • +{{ end }} +
+{{ end }} +
+
+{{ end }} +
+{{ end }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..be8133c --- /dev/null +++ b/layouts/partials/breadcrumbs.html @@ -0,0 +1,16 @@ + + +{{ define "breadcrumbnav" }} +{{ if .p1.Parent }} +{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }} +{{ else if not .p1.IsHome }} +{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }} +{{ end }} + + {{ if .p1.Params.breadcrumbtitle }}{{ .p1.Params.breadcrumbtitle }}{{ else }}{{ .p1.Title }}{{ end }} + +{{ end }} diff --git a/layouts/partials/categories.html b/layouts/partials/categories.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..e939b49 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,9 @@ + diff --git a/layouts/partials/headerlogo.html b/layouts/partials/headerlogo.html new file mode 100644 index 0000000..e0e9d37 --- /dev/null +++ b/layouts/partials/headerlogo.html @@ -0,0 +1,2 @@ + + diff --git a/layouts/partials/linksscripts.html b/layouts/partials/linksscripts.html new file mode 100644 index 0000000..b9ee609 --- /dev/null +++ b/layouts/partials/linksscripts.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..f705f62 --- /dev/null +++ b/layouts/partials/menu.html @@ -0,0 +1,9 @@ + + diff --git a/layouts/partials/nav-sections.html b/layouts/partials/nav-sections.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..e03f127 --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,5 @@ + diff --git a/layouts/partials/paginate-buttons-forward-backward.html b/layouts/partials/paginate-buttons-forward-backward.html new file mode 100644 index 0000000..0237a52 --- /dev/null +++ b/layouts/partials/paginate-buttons-forward-backward.html @@ -0,0 +1,15 @@ +{{ $p := . }} +{{ if or ($p.HasPrev) ($p.HasNext) }} + +{{ end }} diff --git a/layouts/partials/paginate-buttons.html b/layouts/partials/paginate-buttons.html new file mode 100644 index 0000000..941bf8e --- /dev/null +++ b/layouts/partials/paginate-buttons.html @@ -0,0 +1,15 @@ +{{ $p := . }} +{{ if or ($p.HasPrev) ($p.HasNext) }} +
    +{{ if $p.HasPrev }} +
  • + ← Newer +
  • +{{ end }} +{{ if $p.HasNext }} +
  • + Older → +
  • +{{ end }} +
+{{ end }} diff --git a/layouts/partials/range-dl-summary.html b/layouts/partials/range-dl-summary.html new file mode 100644 index 0000000..f7c04e8 --- /dev/null +++ b/layouts/partials/range-dl-summary.html @@ -0,0 +1,19 @@ +{{ $p := . }} +
+{{ range $p }} +
+{{ if .Params.date }} + {{ .Date | time.Format ":date_long" }} +{{ end }} + {{ .Title }} +{{ if .Params.status }} + {{ .Params.status }} +{{ end }} +
+{{ if .Params.summary }} +
+{{ .Params.summary }} +
+{{ end }} +{{ end }} +
diff --git a/layouts/partials/range-ol.html b/layouts/partials/range-ol.html new file mode 100644 index 0000000..4091fcf --- /dev/null +++ b/layouts/partials/range-ol.html @@ -0,0 +1,9 @@ +{{ $p := . }} +
    +{{ range $p }} +
  1. + {{ .Title }} +
  2. +{{ end }} +
+ diff --git a/layouts/partials/range-ul-article.html b/layouts/partials/range-ul-article.html new file mode 100644 index 0000000..dc81079 --- /dev/null +++ b/layouts/partials/range-ul-article.html @@ -0,0 +1,13 @@ +{{ $p := . }} +
    +{{ range $p }} +
  • +
    +{{ partial "title-et-al-list.html" . }} +
    +{{ .Content }} +
    +
    +
  • +{{ end }} +
diff --git a/layouts/partials/range-ul.html b/layouts/partials/range-ul.html new file mode 100644 index 0000000..d2d1771 --- /dev/null +++ b/layouts/partials/range-ul.html @@ -0,0 +1,8 @@ +{{ $p := . }} + diff --git a/layouts/partials/recentchanges.html b/layouts/partials/recentchanges.html new file mode 100644 index 0000000..f4a0dcf --- /dev/null +++ b/layouts/partials/recentchanges.html @@ -0,0 +1,16 @@ +{{ $p := .Paginator }} +{{ if $p.Pages }} +
+

Recent additions/changes

+ +
    +{{ range $p.Pages.ByLastmod.Reverse }} +
  • + {{ .Title }} +
  • +{{ end }} +
+{{ partial "paginate-buttons.html" $p }} +
+{{ end }} + diff --git a/layouts/partials/status.html b/layouts/partials/status.html new file mode 100644 index 0000000..d540528 --- /dev/null +++ b/layouts/partials/status.html @@ -0,0 +1,6 @@ +{{ if .Params.status }} + +{{ end }} diff --git a/layouts/partials/tagline.html b/layouts/partials/tagline.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/title-et-al-list.html b/layouts/partials/title-et-al-list.html new file mode 100644 index 0000000..18dcb08 --- /dev/null +++ b/layouts/partials/title-et-al-list.html @@ -0,0 +1,11 @@ +{{ partial "status.html" . }} +{{ with .Params.date }} +

{{ dateFormat "2006-01-02" . }}

+{{ end }} +

{{ .Title }}

+ +{{ with .Params.subtitle }} +

{{ . }}

+{{ end }} + +{{ partial "categories.html" . }} diff --git a/layouts/partials/title-et-al-main.html b/layouts/partials/title-et-al-main.html new file mode 100644 index 0000000..f1c21b6 --- /dev/null +++ b/layouts/partials/title-et-al-main.html @@ -0,0 +1,23 @@ +{{ partial "status.html" . }} +{{ with .Params.date }} +

{{ dateFormat "2006-01-02" . }}

+{{ end }} +

{{ .Title }}

+ +{{ with .Params.subtitle }} +

{{ . }}

+{{ end }} + +{{ if .Params.author }} +

By +{{ with .Params.authorurl }}{{ end }}{{ .Params.author }}{{ with .Params.authorurl }}{{ end }} +

+{{ else }} +{{ with .Site.Params.Author.Name }} +

By {{ . }}

+{{ end }} +{{ end }} +

{{ .Page.Permalink }}

+ +{{ partial "categories.html" . }} + diff --git a/layouts/partials/toc-recursive.html b/layouts/partials/toc-recursive.html new file mode 100644 index 0000000..eebdd1c --- /dev/null +++ b/layouts/partials/toc-recursive.html @@ -0,0 +1,15 @@ +{{ template "toc-recursive" . }} + +{{ define "toc-recursive" }} +{{ $current := .current }} +{{ if .root.Pages }} + +{{ range .root.Pages.ByWeight }} + + {{ .Title }} +{{ template "toc-recursive" ( dict "root" . "current" $current "nottop" 1 ) }} + +{{ end }} + +{{ end }} +{{ end }} diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html new file mode 100644 index 0000000..02faf81 --- /dev/null +++ b/layouts/partials/toc.html @@ -0,0 +1,4 @@ + diff --git a/layouts/rss.xml b/layouts/rss.xml new file mode 100644 index 0000000..6ff3eee --- /dev/null +++ b/layouts/rss.xml @@ -0,0 +1,28 @@ +{{- $pages := where .Site.RegularPages "Section" "blog" -}} +{{- 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.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{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 }} + + {{ .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 }} + + diff --git a/layouts/shortcodes/anchor.html b/layouts/shortcodes/anchor.html new file mode 100644 index 0000000..2905c6f --- /dev/null +++ b/layouts/shortcodes/anchor.html @@ -0,0 +1,2 @@ +{{/* generates an HTML anchor */}} +[{{ .Get 0 }}] diff --git a/layouts/shortcodes/box.html b/layouts/shortcodes/box.html new file mode 100644 index 0000000..2f12343 --- /dev/null +++ b/layouts/shortcodes/box.html @@ -0,0 +1,3 @@ +
+{{ .Inner | markdownify }} +
diff --git a/layouts/shortcodes/comment.html b/layouts/shortcodes/comment.html new file mode 100644 index 0000000..3d29dff --- /dev/null +++ b/layouts/shortcodes/comment.html @@ -0,0 +1,3 @@ +{{/* Given there are no comments in Markdown, this tag can be used + as a comment that does not produce HTML output */}} +{{ $noop := .Inner }} diff --git a/layouts/shortcodes/gl.html b/layouts/shortcodes/gl.html new file mode 100644 index 0000000..ebc3c46 --- /dev/null +++ b/layouts/shortcodes/gl.html @@ -0,0 +1,13 @@ +{{- $tag := .Get 0 -}} +{{- $label := .Get 1 -}} +{{- with .Site.GetPage ( printf "/glossary/%s.md" ( $tag )) -}} + +{{- if $label -}} +{{- $label -}} +{{- else -}} +{{- .Title -}} +{{- end -}} + +{{- else -}} +{{ $tag }} +{{- end -}} diff --git a/layouts/shortcodes/gls.html b/layouts/shortcodes/gls.html new file mode 100644 index 0000000..cd8db3e --- /dev/null +++ b/layouts/shortcodes/gls.html @@ -0,0 +1,15 @@ +{{- $tag := .Get 0 -}} +{{- $label := .Get 1 -}} +{{- with .Site.GetPage ( printf "/glossary/%s.md" ( $tag )) -}} + +{{- if $label -}} +{{- $label -}} +{{- else if .Params.plural -}} +{{- .Params.plural -}} +{{- else -}} +{{ $tag }} +{{- end -}} + +{{- else -}} +{{ $tag }} +{{- end -}} diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 0000000..85ce965 --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,13 @@ +{{ if .Get "style" }} +
+{{ else }} +
+{{ end }} +{{ if .Get "href" }} + + {{ .Get + +{{ else }} + {{ .Get +{{ end }} +
diff --git a/layouts/shortcodes/include-html.html b/layouts/shortcodes/include-html.html new file mode 100644 index 0000000..6d7a826 --- /dev/null +++ b/layouts/shortcodes/include-html.html @@ -0,0 +1 @@ +{{ .Get "file" | readFile | safeHTML }} diff --git a/layouts/shortcodes/include-md.html b/layouts/shortcodes/include-md.html new file mode 100644 index 0000000..3b2ff3e --- /dev/null +++ b/layouts/shortcodes/include-md.html @@ -0,0 +1,2 @@ +{{ $file := .Get "file" | readFile }} +{{ (print $file ) | markdownify }} diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html new file mode 100644 index 0000000..cf7d794 --- /dev/null +++ b/layouts/shortcodes/note.html @@ -0,0 +1,6 @@ +
+

Note

+

+{{ .Inner }} +

+
diff --git a/layouts/shortcodes/pageref.html b/layouts/shortcodes/pageref.html new file mode 100644 index 0000000..48b467f --- /dev/null +++ b/layouts/shortcodes/pageref.html @@ -0,0 +1,11 @@ +{{- $ref := .Get 0 -}} +{{- $label := .Get 1 -}} +{{- with .Page.GetPage $ref -}} +{{- if $label -}} +{{ $label }} +{{- else -}} +{{ .Title }} +{{- end -}} +{{- else -}} +{{ $ref }} +{{- end -}} diff --git a/layouts/shortcodes/pagerefurl.html b/layouts/shortcodes/pagerefurl.html new file mode 100644 index 0000000..5659910 --- /dev/null +++ b/layouts/shortcodes/pagerefurl.html @@ -0,0 +1,6 @@ +{{- $ref := .Get 0 -}} +{{- with .Site.GetPage $ref -}} +{{ .Permalink }} +{{- else -}} +{{ $ref }} +{{- end -}} diff --git a/layouts/shortcodes/slide-in-img-left.html b/layouts/shortcodes/slide-in-img-left.html new file mode 100644 index 0000000..fe9816a --- /dev/null +++ b/layouts/shortcodes/slide-in-img-left.html @@ -0,0 +1,13 @@ +{{ if .Get "style" }} +
+{{ else }} +
+{{ end }} +{{ if .Get "href" }} + + {{ .Get + +{{ else }} + {{ .Get +{{ end }} +
diff --git a/layouts/shortcodes/slide-in-img-right.html b/layouts/shortcodes/slide-in-img-right.html new file mode 100644 index 0000000..a1ec365 --- /dev/null +++ b/layouts/shortcodes/slide-in-img-right.html @@ -0,0 +1,13 @@ +{{ if .Get "style" }} +
+{{ else }} +
+{{ end }} +{{ if .Get "href" }} + + {{ .Get + +{{ else }} + {{ .Get +{{ end }} +
diff --git a/layouts/shortcodes/warning.html b/layouts/shortcodes/warning.html new file mode 100644 index 0000000..ca5b9f8 --- /dev/null +++ b/layouts/shortcodes/warning.html @@ -0,0 +1,6 @@ +
+

Warning

+

+{{ .Inner }} +

+
diff --git a/static/.nojekyll b/static/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/static/assets/ext.svg b/static/assets/ext.svg new file mode 100644 index 0000000..316099a --- /dev/null +++ b/static/assets/ext.svg @@ -0,0 +1,10 @@ + + diff --git a/static/assets/logo.png b/static/assets/logo.png new file mode 100644 index 0000000..e22b590 Binary files /dev/null and b/static/assets/logo.png differ diff --git a/static/assets/menu.css b/static/assets/menu.css new file mode 100644 index 0000000..953956f --- /dev/null +++ b/static/assets/menu.css @@ -0,0 +1,92 @@ +/* menu navigation */ + +#page-nav { + text-align: right; + position: relative; /* so we can do an absolute child */ + font-size: 87.5%; +} + +#page-nav label, +#hamburger { + display: none; +} + +/* main menu items */ + +#page-nav ul { + list-style-type: none; + margin: 0; + padding: 0; +} + +#page-nav li { + /* styling regardless of mode */ + margin: 0; + padding: 5px 10px; + box-sizing: border-box; +} + +#page-nav > ul > li { + /* when wide display, no hamburger */ + display: inline-block; +} + +/* sub-menu */ + +#page-nav li ul { + display: none; + text-align: left; + z-index: 100; + background: #fff; +} + +#page-nav li:hover ul { + display: block; + position: absolute; +} + +#page-nav li li { + display: block; +} + +/* when display narrow, hamburger */ +@media screen and (max-width: 905px) { + #page-nav label { + display: inline-block; + font-style: normal; + font-size: 30px; + line-height: 18px; + text-align: center; + position: relative; + top: -3px; + } + + #page-nav ul { + /* styling */ + text-align: left; + position: absolute; + right: 10%; + border: 1px solid #c0c0c0; + border-radius: 5px; + background: #fff; + z-index: 100; + margin-top: 0; + + /* when input not checked */ + display: none; + } + #page-nav input:checked ~ ul { + /* when input checked */ + display: block; + } + + #page-nav > ul > li { + display: block; + } + + /* sub-menu */ + #page-nav li:hover ul { + display: block; + left: 20%; + } +} diff --git a/static/assets/print.css b/static/assets/print.css new file mode 100644 index 0000000..240f1a6 --- /dev/null +++ b/static/assets/print.css @@ -0,0 +1,5 @@ +header, +footer, +aside { + display: none; +} diff --git a/static/assets/site.css b/static/assets/site.css new file mode 100644 index 0000000..01ec241 --- /dev/null +++ b/static/assets/site.css @@ -0,0 +1,261 @@ +:root { + --header-background-color: rgb( 36, 37, 38 ); + --footer-background-color: rgb( 48, 56, 70 ); + + --base-font: system-ui; + + --base-font-color: rgb( 227, 227, 227 ); + --heading-font-color: rgb( 227, 227, 227 ); + + --header-font-size: 16px; + + --breadcrumb-font-size: 12px; + + --href-color: rgb( 37, 194, 160 ); + + --background-color: rgb( 27, 27, 29 ); + + --table-border-color: #606770; + --table-background-color: var( --background-color ); + --table-header-background-color: #ffffff08; + --table-stripe-background-color: #ffffff08; + + --code-font: 16px/1.4 "SFMono-Regular", Menlo, Monaco; + --code-background: rgb( 40, 42, 54 ); + +} + +* { + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +body { + margin: 0; + background: var( --background-color ); + color: var( --base-font-color ); + font-family: var( --base-font ); + line-height: 1.6; +} + +table { + border-collapse: collapse; +} + +header { + margin: 0 0 50px 0; + padding: 0; + background: var( --header-background-color ); +} + +footer { + clear: both; + margin: 50px 0 0 0; + padding: 1px 0; /* otherwise Chrome will collapse the enclosing container */ + background: var( --footer-background-color ); +} + +h1, h2, h3, h4, h5 { + color: var(--heading-font-color); +} + +h1 { + font-size: 3rem; + line-height: 125%; +} +h2 { + font-size: 2rem; + line-height: 125%; +} + +a.ext:after { + content: url( "/assets/ext.svg" ); + margin-left: 1ex; +} +a:hover { + color: var( --href-color ); + text-decoration: underline; +} + +header div.title, +header div.logo { + margin: 12px 20px; + font-weight: 700; +} +header img.logo { + vertical-align: middle; + height: 32px; +} + +header nav.menu { + display: flex; + justify-content: space-between; + align-items: center; + height: 3em; + font-size: var( --header-font-size ); + font-weight: 500; +} + +header nav.menu li { + display: inline-block; +} +header > div.container { + display: flex; + flex-wrap: nowrap; + align-items: center; + justify-content: space-between; +} +header div.nav-tagline { + flex-grow: 1; +} + +h1 a, +h2 a, +h3 a, +header a, +footer a { + color: var( --base-font-color ); +} +a { + color: var( --href-color ); + text-decoration: none; +} + +header > div.container, +footer > div.container, +main { + max-width: 980px; + margin: 0 auto; +} + +main { + min-height: min( 600px, 60vh ); +} + +footer { + padding-left: 20%; +} +footer ul { + margin: 0; + padding: 0; +} + +footer li { + margin-left: 0; + list-style: none; +} + +nav#breadcrumbnav ol { + list-style-type: none; + margin: 0; + padding: 0; + font-size: var( --breadcrumb-font-size ); +} +nav#breadcrumbnav li { + display: inline-block; + margin: 0; + padding: 0; +} +nav#breadcrumbnav li + li::before { + content: "\00BB"; +} +nav#breadcrumbnav li.path a { + color: var( --base-font-color ); +} + +p.main.author, +p.main.source { + display: none; +} + +table { + background: var( --table-background-color ); +} +td, +th { + padding: 1.5ex; + border: 1px solid var( --table-border-color ); +} + +thead + tbody { + border-top: 2px solid var( --table-border-color ); +} +thead tr { + background: var( --table-header-background-color ); +} +tbody tr:nth-child(2n) { + background: var( --table-stripe-background-color ); +} +pre { + font: var( --code-font ); + background: var( --code-background ); + padding: 1em; + overflow-x: auto; +} + +aside.toc { + float: right; + width: 220px; + margin: 0 0 20px 20px; + padding: 0 0 8px 16px; + border-left: var( --table-border-color ) 1px solid; + font-size: 90%; +} + +aside.toc * { + line-height: 120%; +} +aside.toc a { + color: inherit; +} +aside.toc a:hover { + color: var( --href-color ); +} +aside.toc h1 { + margin: 1ex auto; + text-align: center; + text-transform: uppercase; + font-size: 90%; +} + +aside.toc ol { + margin: 0; + padding: 0; +} +aside.toc li { + margin: 8px 0; + padding: 0; + list-style: none; +} + +aside.toc > ol > li > a { + font-weight: 500; +} + +aside.toc li li { + margin-left: 2ex; +} + +#toc ol.toc, +#toc li.toc { + display: none; +} +#toc ol.toc.toc-current-path, +#toc li.toc.toc-current-path, +#toc #toc-current { + display: block; +} + +#toc ol.toc.toc-current-path > li, +#toc-current ol.toc, +#toc-current li.toc, +#toc > li.toc { + display: block; +} +#toc-current > a { + font-weight: bold; +} +#toc-current > ol.toc ol.toc { + display: none; +} diff --git a/static/assets/syntax.css b/static/assets/syntax.css new file mode 100644 index 0000000..ea0a3e2 --- /dev/null +++ b/static/assets/syntax.css @@ -0,0 +1,86 @@ +/* Background */ .bg { color: #f8f8f2; background-color: #272822; } +/* PreWrapper */ .chroma { color: #f8f8f2; background-color: #272822; } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { color: #960050; background-color: #1e0010 } +/* CodeLine */ .chroma .cl { } +/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } +/* LineHighlight */ .chroma .hl { background-color: #3c3d38 } +/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Line */ .chroma .line { display: flex; } +/* Keyword */ .chroma .k { color: #66d9ef } +/* KeywordConstant */ .chroma .kc { color: #66d9ef } +/* KeywordDeclaration */ .chroma .kd { color: #66d9ef } +/* KeywordNamespace */ .chroma .kn { color: #f92672 } +/* KeywordPseudo */ .chroma .kp { color: #66d9ef } +/* KeywordReserved */ .chroma .kr { color: #66d9ef } +/* KeywordType */ .chroma .kt { color: #66d9ef } +/* Name */ .chroma .n { } +/* NameAttribute */ .chroma .na { color: #a6e22e } +/* NameBuiltin */ .chroma .nb { } +/* NameBuiltinPseudo */ .chroma .bp { } +/* NameClass */ .chroma .nc { color: #a6e22e } +/* NameConstant */ .chroma .no { color: #66d9ef } +/* NameDecorator */ .chroma .nd { color: #a6e22e } +/* NameEntity */ .chroma .ni { } +/* NameException */ .chroma .ne { color: #a6e22e } +/* NameFunction */ .chroma .nf { color: #a6e22e } +/* NameFunctionMagic */ .chroma .fm { } +/* NameLabel */ .chroma .nl { } +/* NameNamespace */ .chroma .nn { } +/* NameOther */ .chroma .nx { color: #a6e22e } +/* NameProperty */ .chroma .py { } +/* NameTag */ .chroma .nt { color: #f92672 } +/* NameVariable */ .chroma .nv { } +/* NameVariableClass */ .chroma .vc { } +/* NameVariableGlobal */ .chroma .vg { } +/* NameVariableInstance */ .chroma .vi { } +/* NameVariableMagic */ .chroma .vm { } +/* Literal */ .chroma .l { color: #ae81ff } +/* LiteralDate */ .chroma .ld { color: #e6db74 } +/* LiteralString */ .chroma .s { color: #e6db74 } +/* LiteralStringAffix */ .chroma .sa { color: #e6db74 } +/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 } +/* LiteralStringChar */ .chroma .sc { color: #e6db74 } +/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 } +/* LiteralStringDoc */ .chroma .sd { color: #e6db74 } +/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 } +/* LiteralStringEscape */ .chroma .se { color: #ae81ff } +/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 } +/* LiteralStringInterpol */ .chroma .si { color: #e6db74 } +/* LiteralStringOther */ .chroma .sx { color: #e6db74 } +/* LiteralStringRegex */ .chroma .sr { color: #e6db74 } +/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 } +/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 } +/* LiteralNumber */ .chroma .m { color: #ae81ff } +/* LiteralNumberBin */ .chroma .mb { color: #ae81ff } +/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } +/* LiteralNumberHex */ .chroma .mh { color: #ae81ff } +/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } +/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } +/* LiteralNumberOct */ .chroma .mo { color: #ae81ff } +/* Operator */ .chroma .o { color: #f92672 } +/* OperatorWord */ .chroma .ow { color: #f92672 } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #75715e } +/* CommentHashbang */ .chroma .ch { color: #75715e } +/* CommentMultiline */ .chroma .cm { color: #75715e } +/* CommentSingle */ .chroma .c1 { color: #75715e } +/* CommentSpecial */ .chroma .cs { color: #75715e } +/* CommentPreproc */ .chroma .cp { color: #75715e } +/* CommentPreprocFile */ .chroma .cpf { color: #75715e } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { color: #f92672 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { } +/* GenericHeading */ .chroma .gh { } +/* GenericInserted */ .chroma .gi { color: #a6e22e } +/* GenericOutput */ .chroma .go { } +/* GenericPrompt */ .chroma .gp { } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #75715e } +/* GenericTraceback */ .chroma .gt { } +/* GenericUnderline */ .chroma .gl { } +/* TextWhitespace */ .chroma .w { } diff --git a/static/assets/toc.js b/static/assets/toc.js new file mode 100644 index 0000000..6a463f6 --- /dev/null +++ b/static/assets/toc.js @@ -0,0 +1,12 @@ +window.onload = function() { + var toc = document.getElementById( "toc" ); + var tocCurrent = document.getElementById( "toc-current" ); + + if( toc != null && tocCurrent != null ) { + for( var current = tocCurrent.parentElement ; current != toc && current != null; current = current.parentElement ) { + if( current.classList.contains( "toc" ) ) { + current.classList.add( "toc-current-path" ); + } + } + } +} diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..23785f0 Binary files /dev/null and b/static/favicon.ico differ