From 3245f1f1404785d92c21eb381c08dee5a4be6bb7 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Tue, 4 Sep 2018 09:08:41 +0300 Subject: Moved site to website folder --- website/themes/natrium/layouts/404.html | 17 +++++++++++ website/themes/natrium/layouts/_default/list.html | 1 + .../themes/natrium/layouts/_default/single.html | 31 ++++++++++++++++++++ website/themes/natrium/layouts/index.html | 20 +++++++++++++ .../themes/natrium/layouts/partials/footer.html | 13 +++++++++ website/themes/natrium/layouts/partials/head.html | 31 ++++++++++++++++++++ .../themes/natrium/layouts/partials/header.html | 10 +++++++ .../themes/natrium/layouts/partials/list-item.html | 6 ++++ website/themes/natrium/layouts/partials/nav.html | 14 +++++++++ .../natrium/layouts/partials/pagination.html | 34 ++++++++++++++++++++++ website/themes/natrium/layouts/rss.xml | 28 ++++++++++++++++++ .../themes/natrium/layouts/taxonomy/category.html | 18 ++++++++++++ .../natrium/layouts/taxonomy/category.terms.html | 22 ++++++++++++++ website/themes/natrium/layouts/taxonomy/tag.html | 18 ++++++++++++ .../themes/natrium/layouts/taxonomy/tag.terms.html | 31 ++++++++++++++++++++ 15 files changed, 294 insertions(+) create mode 100644 website/themes/natrium/layouts/404.html create mode 100644 website/themes/natrium/layouts/_default/list.html create mode 100644 website/themes/natrium/layouts/_default/single.html create mode 100644 website/themes/natrium/layouts/index.html create mode 100644 website/themes/natrium/layouts/partials/footer.html create mode 100644 website/themes/natrium/layouts/partials/head.html create mode 100644 website/themes/natrium/layouts/partials/header.html create mode 100644 website/themes/natrium/layouts/partials/list-item.html create mode 100644 website/themes/natrium/layouts/partials/nav.html create mode 100644 website/themes/natrium/layouts/partials/pagination.html create mode 100644 website/themes/natrium/layouts/rss.xml create mode 100644 website/themes/natrium/layouts/taxonomy/category.html create mode 100644 website/themes/natrium/layouts/taxonomy/category.terms.html create mode 100644 website/themes/natrium/layouts/taxonomy/tag.html create mode 100644 website/themes/natrium/layouts/taxonomy/tag.terms.html (limited to 'website/themes/natrium/layouts') diff --git a/website/themes/natrium/layouts/404.html b/website/themes/natrium/layouts/404.html new file mode 100644 index 0000000..28489eb --- /dev/null +++ b/website/themes/natrium/layouts/404.html @@ -0,0 +1,17 @@ +{{ partial "header" . }} + +
+
+

404

+
+
+ {{ i18n "errorMessage" }} +
+ +
+
+
+ +{{ partial "footer" . }} + + diff --git a/website/themes/natrium/layouts/_default/list.html b/website/themes/natrium/layouts/_default/list.html new file mode 100644 index 0000000..9353e44 --- /dev/null +++ b/website/themes/natrium/layouts/_default/list.html @@ -0,0 +1 @@ +/* Natrium doesn't support list.html. */ diff --git a/website/themes/natrium/layouts/_default/single.html b/website/themes/natrium/layouts/_default/single.html new file mode 100644 index 0000000..240109d --- /dev/null +++ b/website/themes/natrium/layouts/_default/single.html @@ -0,0 +1,31 @@ +{{ partial "header.html" . }} + +
+
+

{{ .Title }}

+ {{ if eq .Section "post" }} + + {{ end }} + +
+ {{ .Content }} +
+ +
    + {{ if .Params.categories }} +
    +
  • + {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}{{ end }}{{ . }}{{ end }} +
  • + {{ end }} + + {{ if .Params.tags }} +
  • + {{ range $index, $tag := .Params.tags }}{{ if gt $index 0 }}{{ end }}{{ . }}{{ end }} +
  • + {{ end }} +
+ +
+ +{{ partial "footer.html" . }} diff --git a/website/themes/natrium/layouts/index.html b/website/themes/natrium/layouts/index.html new file mode 100644 index 0000000..d71b3fa --- /dev/null +++ b/website/themes/natrium/layouts/index.html @@ -0,0 +1,20 @@ +{{ partial "header.html" . }} + +
+ +
+ {{ range (.Paginate ((where .Data.Pages "Type" "post").GroupByDate "2006")).PageGroups }} +

{{ .Key }}

+ {{ range .Pages }} + + {{ partial "list-item.html" . }} + + {{ end }} + {{ end }} +
+ + {{ partial "pagination.html" . }} + +
+ +{{ partial "footer.html" . }} diff --git a/website/themes/natrium/layouts/partials/footer.html b/website/themes/natrium/layouts/partials/footer.html new file mode 100644 index 0000000..0230966 --- /dev/null +++ b/website/themes/natrium/layouts/partials/footer.html @@ -0,0 +1,13 @@ + + + + diff --git a/website/themes/natrium/layouts/partials/head.html b/website/themes/natrium/layouts/partials/head.html new file mode 100644 index 0000000..b17415e --- /dev/null +++ b/website/themes/natrium/layouts/partials/head.html @@ -0,0 +1,31 @@ + + +{{ .Hugo.Generator }} + +{{ if eq .URL "/" }} +{{ .Title }} + + +{{ else }} +{{ .Title }} - {{ .Site.Title }} + +{{ end }} + +{{ if eq .URL "/" }} + +{{ else }} + {{ if .Description }} + + {{ end }} +{{ end }} + +{{ if .Keywords }} + +{{ end }} + +{{ if .RSSLink }} + +{{ end }} + + + diff --git a/website/themes/natrium/layouts/partials/header.html b/website/themes/natrium/layouts/partials/header.html new file mode 100644 index 0000000..6a3b55c --- /dev/null +++ b/website/themes/natrium/layouts/partials/header.html @@ -0,0 +1,10 @@ + + + + {{ partial "head.html" . }} + + +
+
+ {{ partial "nav.html" . }} +
diff --git a/website/themes/natrium/layouts/partials/list-item.html b/website/themes/natrium/layouts/partials/list-item.html new file mode 100644 index 0000000..245a80d --- /dev/null +++ b/website/themes/natrium/layouts/partials/list-item.html @@ -0,0 +1,6 @@ + diff --git a/website/themes/natrium/layouts/partials/nav.html b/website/themes/natrium/layouts/partials/nav.html new file mode 100644 index 0000000..607878c --- /dev/null +++ b/website/themes/natrium/layouts/partials/nav.html @@ -0,0 +1,14 @@ + diff --git a/website/themes/natrium/layouts/partials/pagination.html b/website/themes/natrium/layouts/partials/pagination.html new file mode 100644 index 0000000..d818c18 --- /dev/null +++ b/website/themes/natrium/layouts/partials/pagination.html @@ -0,0 +1,34 @@ +{{ $pag := $.Paginator }} +{{ if gt $pag.TotalPages 1 }} + + +{{ end }} diff --git a/website/themes/natrium/layouts/rss.xml b/website/themes/natrium/layouts/rss.xml new file mode 100644 index 0000000..4008f49 --- /dev/null +++ b/website/themes/natrium/layouts/rss.xml @@ -0,0 +1,28 @@ + + + {{ 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 .Data.Pages }} + {{ if eq .Section "post" }} + + {{ .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/website/themes/natrium/layouts/taxonomy/category.html b/website/themes/natrium/layouts/taxonomy/category.html new file mode 100644 index 0000000..d20298a --- /dev/null +++ b/website/themes/natrium/layouts/taxonomy/category.html @@ -0,0 +1,18 @@ +{{ partial "header.html" . }} + +
+ +
+

{{ .Title }}

+ {{ range .Paginator.Pages }} + + {{ partial "list-item.html" . }} + + {{ end }} +
+ + {{ partial "pagination.html" . }} + +
+ +{{ partial "footer.html" . }} diff --git a/website/themes/natrium/layouts/taxonomy/category.terms.html b/website/themes/natrium/layouts/taxonomy/category.terms.html new file mode 100644 index 0000000..d5ba7bc --- /dev/null +++ b/website/themes/natrium/layouts/taxonomy/category.terms.html @@ -0,0 +1,22 @@ +{{ partial "header.html" . }} + +
+ +
+

{{ i18n "categories" }}

+ {{ $data := .Data }} + {{ range $key, $value := .Data.Terms.Alphabetical }} + + {{ end }} +
+ +
+ +{{ partial "footer.html" . }} diff --git a/website/themes/natrium/layouts/taxonomy/tag.html b/website/themes/natrium/layouts/taxonomy/tag.html new file mode 100644 index 0000000..08eb524 --- /dev/null +++ b/website/themes/natrium/layouts/taxonomy/tag.html @@ -0,0 +1,18 @@ +{{ partial "header.html" . }} + +
+ +
+

{{ .Title }}

+ {{ range .Paginator.Pages }} + + {{ partial "list-item.html" . }} + + {{ end }} +
+ + {{ partial "pagination.html" . }} + +
+ +{{ partial "footer.html" . }} diff --git a/website/themes/natrium/layouts/taxonomy/tag.terms.html b/website/themes/natrium/layouts/taxonomy/tag.terms.html new file mode 100644 index 0000000..77a68c7 --- /dev/null +++ b/website/themes/natrium/layouts/taxonomy/tag.terms.html @@ -0,0 +1,31 @@ +{{ partial "header.html" . }} + +
+ +
+

{{ i18n "tags" }}

+ {{ if not (eq (len $.Site.Taxonomies.tags) 0) }} + {{ $fontUnit := "rem" }} + {{ $largestFontSize := 2.5 }} + {{ $smallestFontSize := 1.0 }} + {{ $fontSpread := sub $largestFontSize $smallestFontSize }} + {{ $max := add (len (index $.Site.Taxonomies.tags.ByCount 0).Pages) 1 }} + {{ $min := len (index $.Site.Taxonomies.tags.ByCount.Reverse 0).Pages }} + {{ $spread := sub $max $min }} + {{ $fontStep := div $fontSpread $spread }} +
    + {{ range $name, $taxonomy := $.Site.Taxonomies.tags }} + {{ $currentTagCount := len $taxonomy.Pages }} + {{ $currentFontSize := (add $smallestFontSize (mul (sub $currentTagCount $min) $fontStep) ) }} + {{ $count := len $taxonomy.Pages }} + {{ $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }} + {{ $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) }} +
  • {{ $name }}
  • + {{ end }} +
+ {{ end }} +
+ +
+ +{{ partial "footer.html" . }} -- cgit v1.3.1-26-gb76a