diff --git a/themes/lumbung-theme/layouts/index.html b/themes/lumbung-theme/layouts/index.html index a5c69ec..263beb9 100644 --- a/themes/lumbung-theme/layouts/index.html +++ b/themes/lumbung-theme/layouts/index.html @@ -1,12 +1,16 @@ {{ define "main" }} +
-
-{{ range (.Paginate (.Site.RegularPages.GroupByDate "January 2006") 20 ).PageGroups }} - - {{ .Key }} - {{ range .Pages }} +
+ {{ $range := .Site.RegularPages }} + {{ $paginator := .Paginate $range }} + {{ $pageSize := $paginator.PageSize }} + {{ $totalPostsToShow := mul $paginator.PageNumber $pageSize }} + {{ range $index, $el := (first $totalPostsToShow .Site.RegularPages) }} + +
{{if eq .Section "tv"}} {{- partial "video_box.html" . -}} @@ -32,13 +36,17 @@ {{ else }} {{- partial "card.html" . -}} {{ end }} - - {{ end }} +
{{ end }}
- + + +
@@ -46,5 +54,7 @@ lumbung radio
+ +
{{ end }} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/card.html b/themes/lumbung-theme/layouts/partials/card.html index 9154a32..bffc5b2 100644 --- a/themes/lumbung-theme/layouts/partials/card.html +++ b/themes/lumbung-theme/layouts/partials/card.html @@ -1,4 +1,4 @@ -
+

{{ .Title }}

diff --git a/themes/lumbung-theme/layouts/partials/data/authors.html b/themes/lumbung-theme/layouts/partials/data/authors.html new file mode 100644 index 0000000..69be009 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/data/authors.html @@ -0,0 +1 @@ +{{ with .Params.authors }}{{ if eq ( printf "%T" . ) "string" }}{{ . | replaceRE "[.]" "_" | urlize }}{{ else if eq ( printf "%T" . ) "[]string" }}{{ range . }}{{ . | replaceRE "[.]" "_" | urlize }} {{end}}{{end}}{{else}}no-author{{end}} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/data/categories.html b/themes/lumbung-theme/layouts/partials/data/categories.html new file mode 100644 index 0000000..9303037 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/data/categories.html @@ -0,0 +1 @@ +{{ with .Params.categories }}{{ if eq ( printf "%T" . ) "string" }}{{ . | replaceRE "[.]" "_" | urlize }}{{ else if eq ( printf "%T" . ) "[]string" }}{{ range . }}{{ . | replaceRE "[.]" "_" | urlize }} {{end}}{{end}}{{else}}no-cat{{end}} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/data/tags.html b/themes/lumbung-theme/layouts/partials/data/tags.html new file mode 100644 index 0000000..6cb4851 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/data/tags.html @@ -0,0 +1 @@ +{{ with .Params.tags }}{{ range . }}{{ . | replaceRE "[.]" "_" | urlize }} {{ end }}{{ else }} tfuntagged{{ end }} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/filter-nav.html b/themes/lumbung-theme/layouts/partials/filter-nav.html index 10b8ac0..ef472c8 100644 --- a/themes/lumbung-theme/layouts/partials/filter-nav.html +++ b/themes/lumbung-theme/layouts/partials/filter-nav.html @@ -1,121 +1,90 @@ - +
+ -{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} -{{ $sections := .Site.Params.mainSections }} - -{{ $.Scratch.Set "authors" (slice ) }} -{{ $.Scratch.Set "noAuthors" 0 }} - -{{ range where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} - {{ with .Params.authors }} - {{ if eq ( printf "%T" . ) "[]string" }} - {{ if ( not ( in ($.Scratch.Get "authors") . ) ) }} - {{ $.Scratch.Add "authors" . }} - {{ end }} - {{ else if ( printf "%T" . ) "[]string" }} - {{ range . }} - {{ if ( not ( in ($.Scratch.Get "authors") . ) ) }} - {{ $.Scratch.Add "authors" . }} - {{ end }} - {{ end }} + {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} + {{ $sections := .Site.Params.mainSections }} + {{ $tags := $.Site.Taxonomies.tags.ByCount }} + {{ $.Scratch.Set "untagged" 0 }} + {{ range $pages }} + {{ with .Params.tags }}{{ else }}{{ $.Scratch.Add "untagged" 1 }}{{ end }} {{ end }} - {{ else }} - {{ $.Scratch.Add "noAuthors" 1 }} - {{ end }} -{{ end }} -{{ $.Scratch.Set "cats" (slice ) }} -{{ $.Scratch.Set "nocat" 0 }} +
+
+
Cards
+
+
+
+ +
+ {{ range $sections }} + + {{ end }} + +
+
-{{ range where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} - {{ with .Params.categories }} - {{ if eq ( printf "%T" . ) "[]string" }} - {{ if ( not ( in ($.Scratch.Get "cats") . ) ) }} - {{ $.Scratch.Add "cats" . }} - {{ end }} - - {{ end }} - {{ else }} - {{ $.Scratch.Add "nocat" 1 }} - {{ end }} -{{ end }} +
+ +
+ {{ range .Site.Taxonomies.authors }} + + {{ end }} + + +
+
-{{ $tags := $.Site.Taxonomies.tags.ByCount }} +
+ +
+ {{ range .Site.Taxonomies.categories }} + + {{ end }} + + +
+
-{{ $.Scratch.Set "untagged" 0 }} -{{ range $pages }} - {{ with .Params.tags }}{{ else }}{{ $.Scratch.Add "untagged" 1 }}{{ end }} -{{ end }} - -
-
-
Items
- Load all Items -
-
- - {{ range $sections }} - - {{ end }} +
+ +
+ {{ range $tags }} + {{ if .Term }} + + {{ end }} + {{ end }} + + +
+
+ +
-
- - - {{ range .Site.Taxonomies.authors }} - - {{ end }} - - {{ if gt ( $.Scratch.Get "noAuthors") 0 }} - - {{ end }} -
- -
- - - {{ range .Site.Taxonomies.categories }} - - {{ end }} - - {{ if gt ( $.Scratch.Get "nocat") 0 }} - - {{ end }} -
- -
- - {{ range $tags }} - {{ if .Term }} - - {{ end }} - {{ end }} - {{ if gt ( $.Scratch.Get "untagged") 0 }} - - {{ end }} -
\ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/footer.html b/themes/lumbung-theme/layouts/partials/footer.html index c8c9ced..0f6cf82 100644 --- a/themes/lumbung-theme/layouts/partials/footer.html +++ b/themes/lumbung-theme/layouts/partials/footer.html @@ -1,7 +1,7 @@
- +
lumbung.space is a social and publishing platform for sharing harvests by all members online. It is non-extractive, co governed by the users, and is built on open platforms.
@@ -18,4 +18,9 @@ -
\ No newline at end of file + + + + \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/header.html b/themes/lumbung-theme/layouts/partials/header.html index 23111b8..c586d2b 100644 --- a/themes/lumbung-theme/layouts/partials/header.html +++ b/themes/lumbung-theme/layouts/partials/header.html @@ -6,7 +6,7 @@
- -
- \ No newline at end of file + + diff --git a/themes/lumbung-theme/layouts/partials/pen_card.html b/themes/lumbung-theme/layouts/partials/pen_card.html index b1cac10..b542750 100644 --- a/themes/lumbung-theme/layouts/partials/pen_card.html +++ b/themes/lumbung-theme/layouts/partials/pen_card.html @@ -1,4 +1,4 @@ -
+
From {{ if .Params.contributors }}{{range .Params.contributors}} {{ . }} {{end}} at {{ end }}{{ .Params.feed_name }}
diff --git a/themes/lumbung-theme/layouts/partials/shout_card.html b/themes/lumbung-theme/layouts/partials/shout_card.html index 982cd21..9e77acc 100644 --- a/themes/lumbung-theme/layouts/partials/shout_card.html +++ b/themes/lumbung-theme/layouts/partials/shout_card.html @@ -1,4 +1,4 @@ -
+
{{ $postPermalink := .Permalink}} diff --git a/themes/lumbung-theme/layouts/partials/social_card.html b/themes/lumbung-theme/layouts/partials/social_card.html index d9c08d0..518baa5 100644 --- a/themes/lumbung-theme/layouts/partials/social_card.html +++ b/themes/lumbung-theme/layouts/partials/social_card.html @@ -1,4 +1,4 @@ -