diff --git a/config.toml b/config.toml index e75514d..6303a68 100644 --- a/config.toml +++ b/config.toml @@ -3,10 +3,18 @@ languageCode = "en-us" title = "nilsschulte.de" copyright = "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License." +theme = "nils-theme" [author] name = "Nils Schulte" email = "blog@nilsschulte.de" +[params] +author = "Nils Schulte" +description = "Nils' Blog" + +## Set one of: +# gravatar = "soho@example.com" +profilePicture = "img/triangels.png" pygmentsCodeFences = true pygmentsCodeFencesGuessSyntax = true diff --git a/themes/nils-theme/layouts/_default/list.atom.xml b/themes/nils-theme/layouts/_default/list.atom.xml new file mode 100644 index 0000000..4634789 --- /dev/null +++ b/themes/nils-theme/layouts/_default/list.atom.xml @@ -0,0 +1,31 @@ +{{ printf "" | safeHTML }} + + {{ .Site.Title }} + + {{ with .OutputFormats.Get "Atom" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} + + {{ with $.Site.Author.name }}{{.}}{{end}} + {{ with $.Site.Author.email }}{{.}}{{end}} + + Hugo + {{ .Permalink }} + {{ range first 15 .Pages }} + + {{ .Title }} + + {{ .Permalink }} + {{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} + {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }} + {{ .Content | html }} + {{ range .Params.tags }} + + {{ end }} + {{ range .Params.categories }} + + {{ end }} + + {{ end }} + diff --git a/themes/nils-theme/layouts/_default/list.html b/themes/nils-theme/layouts/_default/list.html new file mode 100644 index 0000000..b5f9a94 --- /dev/null +++ b/themes/nils-theme/layouts/_default/list.html @@ -0,0 +1,26 @@ +{{ partial "header.html" . }} + + +
+ {{ range .Paginator.Pages }} +
+
+ +

+ {{- .Title -}} + {{ if and .Params.lang (ne .Site.Language.Lang .Params.lang) }} + [{{ .Params.lang }}] + {{ end }} +

+
+

+ {{.Summary}} +

+
+ {{ end }} + +
+ + + +{{ partial "footer.html" . }} diff --git a/themes/nils-theme/layouts/_default/list.rss.xml b/themes/nils-theme/layouts/_default/list.rss.xml new file mode 100644 index 0000000..ca73944 --- /dev/null +++ b/themes/nils-theme/layouts/_default/list.rss.xml @@ -0,0 +1,33 @@ +{{ printf "" | safeHTML }} + + + {{ .Site.Title }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo{{ 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 first 15 .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 }} + {{ .Content | html }} + {{ range .Params.tags }} + {{ . }} + {{ end }} + {{ range .Params.categories }} + {{ . }} + {{ end }} + + {{ end }} + + diff --git a/themes/nils-theme/layouts/_default/single.html b/themes/nils-theme/layouts/_default/single.html new file mode 100644 index 0000000..1b1ca6f --- /dev/null +++ b/themes/nils-theme/layouts/_default/single.html @@ -0,0 +1,18 @@ +{{ partial "header.html" . }} + +
+
+

{{ .Title }}

+ +
+ + {{ .Content }} + + {{ if eq .Params.lang "en" }} + + {{ end }} +
+ +{{ partial "footer.html" . }} diff --git a/themes/nils-theme/layouts/index.html b/themes/nils-theme/layouts/index.html new file mode 100644 index 0000000..590d91e --- /dev/null +++ b/themes/nils-theme/layouts/index.html @@ -0,0 +1,28 @@ +{{ partial "head.html" . }} +
+
+
+
+
+ Triangles +
+
+ Triangles +
+ +{{ partial "nav.html" . }} +{{ partial "footer.html" . }} diff --git a/themes/nils-theme/layouts/partials/article-footer.html b/themes/nils-theme/layouts/partials/article-footer.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/nils-theme/layouts/partials/foot.html b/themes/nils-theme/layouts/partials/foot.html new file mode 100644 index 0000000..7fb2bd6 --- /dev/null +++ b/themes/nils-theme/layouts/partials/foot.html @@ -0,0 +1,2 @@ + + diff --git a/themes/nils-theme/layouts/partials/footer.html b/themes/nils-theme/layouts/partials/footer.html new file mode 100644 index 0000000..49a5783 --- /dev/null +++ b/themes/nils-theme/layouts/partials/footer.html @@ -0,0 +1,11 @@ +
+ + +
+ +{{ partial "foot.html" . }} diff --git a/themes/nils-theme/layouts/partials/head.html b/themes/nils-theme/layouts/partials/head.html new file mode 100644 index 0000000..0f8f2d9 --- /dev/null +++ b/themes/nils-theme/layouts/partials/head.html @@ -0,0 +1,210 @@ + + + + + {{ partial "title.txt" . }} + + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + + + + diff --git a/themes/nils-theme/layouts/partials/header.html b/themes/nils-theme/layouts/partials/header.html new file mode 100644 index 0000000..3508fd2 --- /dev/null +++ b/themes/nils-theme/layouts/partials/header.html @@ -0,0 +1,12 @@ +{{ partial "head.html" . }} + +
+
+ + +
+ + +
+ +{{ partial "nav.html" . }} \ No newline at end of file diff --git a/themes/nils-theme/layouts/partials/nav.html b/themes/nils-theme/layouts/partials/nav.html new file mode 100644 index 0000000..6d9f0a1 --- /dev/null +++ b/themes/nils-theme/layouts/partials/nav.html @@ -0,0 +1,5 @@ + diff --git a/themes/nils-theme/layouts/partials/title.txt b/themes/nils-theme/layouts/partials/title.txt new file mode 100644 index 0000000..c1a3c91 --- /dev/null +++ b/themes/nils-theme/layouts/partials/title.txt @@ -0,0 +1,15 @@ +{{- $title := .Title -}} +{{- $siteTitle := .Site.Title -}} +{{- if .IsHome -}} + {{ $siteTitle }} +{{- else if eq .Kind "taxonomy" -}} + {{ title .Data.Singular }}: {{ $title }} · {{ $siteTitle }} +{{- else if eq .Kind "section" -}} + {{ $title }} · {{ $siteTitle }} +{{- else if .IsPage -}} + {{ $title }} · {{ $siteTitle }} +{{- else if not (eq .Title "") -}} + {{ $title }} · {{ $siteTitle }} +{{- else -}} + {{ $siteTitle }} +{{- end -}} diff --git a/themes/nils-theme/theme.toml b/themes/nils-theme/theme.toml new file mode 100644 index 0000000..0538cc2 --- /dev/null +++ b/themes/nils-theme/theme.toml @@ -0,0 +1,12 @@ +name = "nils-theme" +license = "GPL" +licenselink = "https://github.com/schnilz/nilsschulte.de/blob/master/LICENSE.md" +description = "A simple theme" +tags = ["blog", "theme", "hyde", "highlight.js", "font-awesome", "google analytics", "disqus", "personal", "syntax highlighting", "responsive", "graphcomment"] +features = ["blog", "theme", "highlight.js", "font-awesome", "responsive", "disqus", "graphcomment", "portfolio"] +min_version = "0.01" + +[author] + name = "Nils Schulte" + homepage = "https://nilsschulte.de" +