diff --git a/config.toml b/config.toml index 826c181..1489f8a 100644 --- a/config.toml +++ b/config.toml @@ -3,6 +3,8 @@ languageCode = "en-gb" title = "lumbung.space" theme = "lumbung-theme" pluralizeListTitles = "false" +paginate = 20 + [params] logo = "/img/logo.svg" @@ -10,15 +12,22 @@ pluralizeListTitles = "false" description = 'a digital living room for the lumbung ekosistem' images = ['/img/logo.png'] title = 'lumbung dot space' + bundleCss = "/bundle.css" + bundleJs = "/bundle.js" + mainSections = ['social', 'shouts', 'events', 'tv', 'pen', 'pages'] [markup.goldmark.renderer] -unsafe = true + unsafe = true [taxonomies] author = "authors" + contributor = "contributors" tag = "tags" - category = "categories" + source = "sources" timeline = "timelines" + [permalinks] timelines = "/timeline/:slug/" + + diff --git a/content/contributors.md b/content/ls-contributors.md similarity index 100% rename from content/contributors.md rename to content/ls-contributors.md diff --git a/themes/lumbung-theme/layouts/_default/baseof.html b/themes/lumbung-theme/layouts/_default/baseof.html index 638faaa..007eb1a 100644 --- a/themes/lumbung-theme/layouts/_default/baseof.html +++ b/themes/lumbung-theme/layouts/_default/baseof.html @@ -11,6 +11,8 @@ {{- partial "news-ticker.html" . -}} {{- partial "footer.html" . -}} + + diff --git a/themes/lumbung-theme/layouts/_default/list.html b/themes/lumbung-theme/layouts/_default/list.html index e93d0c7..9178d35 100644 --- a/themes/lumbung-theme/layouts/_default/list.html +++ b/themes/lumbung-theme/layouts/_default/list.html @@ -1,48 +1,48 @@ {{ define "main" }}
-
- {{ range where (.Paginator 13).Pages "Params.hidden" "ne" "true" }} - - {{ if in .Params.categories "tv"}} +
+ {{ $range := where .Pages "Params.hidden" "ne" "true" }} + {{ $paginator := .Paginate $range }} + {{ $pageSize := $paginator.PageSize }} + {{ $totalPostsToShow := mul $paginator.PageNumber $pageSize }} + {{ range $index, $el := (first $totalPostsToShow $range) }} - {{- partial "video_box.html" . -}} +
+ {{if eq .Section "tv"}} + {{- partial "video_box.html" . -}} - {{ else if in .Params.categories "calendar" }} + {{ else if eq .Section "events" }} + {{- partial "partials/calendar_card.html" . -}} - {{- partial "calendar_card.html" . -}} + {{ else if eq .Section "shouts" }} + {{ if in .Params.sources "pen.lumbung.space" }} + {{- partial "partials/pen_card.html" . -}} + {{ else }} + {{- partial "partials/shout_card.html" . -}} + {{ end }} - {{ else if in .Params.categories "network" }} + {{ else if eq .Section "social" }} + {{- partial "partials/social_card.html" . -}} - {{- partial "network_card.html" . -}} + {{ else if eq .Section "publications"}} + {{- partial "partials/book_card.html" . -}} - {{ else if in .Params.categories "shouts" }} - - {{- partial "shout_card.html" . -}} - - {{ else if in .Params.categories "pen" }} - - {{- partial "pen_card.html" . -}} - - {{ else if in .Params.categories "book" }} - - {{- partial "book.html" . -}} - - {{ else if in .Params.categories "page" }} - - {{- partial "blank.html" . -}} - - {{ else }} - - {{- partial "card.html" . -}} - - {{ end }} + {{ else if eq .Section "sounds"}} + {{- partial "sounds_card.html" . -}} + {{ else }} + {{- partial "card.html" . -}} + {{ end }} +
{{ end }}
- - + + +
-{{ end }} +{{ end }} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/events/list.html b/themes/lumbung-theme/layouts/events/list.html new file mode 100644 index 0000000..739ad2c --- /dev/null +++ b/themes/lumbung-theme/layouts/events/list.html @@ -0,0 +1,39 @@ +{{ define "main" }} +
+
+ + {{ $now := (now.Format "060102" ) }} + + {{ $upcoming := slice }} + {{ $past := slice}} + + {{ range .Pages }} + {{ $t := (substr .Params.event_end 2 8) }} + {{ $time := ( replace $t "-" "") }} + {{ if ge $time $now }} + {{ $upcoming = $upcoming | append . }} + {{ else if gt $now $time }} + {{ $past = $past | append . }} + {{ end }} + {{ end }} + + {{ with $upcoming }} +
+
upcoming events
+ {{ range $upcoming}} + {{- partial "event_list_item.html" . -}} + {{end}} +
+ {{end}} + {{ with $past }} +
+
past events
+ {{ range $past }} + {{- partial "event_list_item.html" . -}} + {{ end }} +
+ {{ end }} + +
+
+{{ end }} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/index.html b/themes/lumbung-theme/layouts/index.html index 0f9408f..190ba06 100644 --- a/themes/lumbung-theme/layouts/index.html +++ b/themes/lumbung-theme/layouts/index.html @@ -1,32 +1,50 @@ {{ define "main" }}
-
-{{ range (.Paginate (.Site.RegularPages.GroupByDate "January 2006") 20 ).PageGroups }} + +
+ {{ $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" . -}} - {{ .Key }} - {{ range .Pages }} - {{ if in .Params.categories "tv"}} - {{- partial "video_box.html" . -}} - {{ else if in .Params.categories "calendar" }} - {{- partial "calendar_card.html" . -}} - {{ else if in .Params.categories "network" }} - {{- partial "network_card.html" . -}} - {{ else if in .Params.categories "pen" }} - {{- partial "pen_card.html" . -}} - {{ else if in .Params.categories "shouts" }} - {{- partial "shout_card.html" . -}} - {{ else if in .Params.categories "books.lumbung.space"}} - {{- partial "book_card.html" . -}} - {{ else }} - {{- partial "card.html" . -}} - {{ end }} - {{ end }} + {{ else if eq .Section "events" }} + {{- partial "partials/calendar_card.html" . -}} + + {{ else if eq .Section "shouts" }} + {{ if in .Params.sources "pen.lumbung.space" }} + {{- partial "partials/pen_card.html" . -}} + {{ else }} + {{- partial "partials/shout_card.html" . -}} + {{ end }} + + {{ else if eq .Section "social" }} + {{- partial "partials/social_card.html" . -}} + + {{ else if eq .Section "publications"}} + {{- partial "partials/book_card.html" . -}} + + {{ else if eq .Section "sounds"}} + {{- partial "sounds_card.html" . -}} + + {{ else }} + {{- partial "card.html" . -}} + {{ end }} +
{{ end }}
- + + +
@@ -34,5 +52,8 @@ lumbung radio
+ +
+ {{ end }} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/page/filter.html b/themes/lumbung-theme/layouts/page/filter.html new file mode 100644 index 0000000..af5f844 --- /dev/null +++ b/themes/lumbung-theme/layouts/page/filter.html @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + +
+ + +{{ $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 }} + {{ end }} + {{ else }} + {{ $.Scratch.Add "noAuthors" 1 }} + {{ end }} +{{ end }} + + +{{ $tags := $.Site.Taxonomies.tags.ByCount }} + +{{ $.Scratch.Set "untagged" 0 }} +{{ range $pages }} + {{ with .Params.tags }}{{ else }}{{ $.Scratch.Add "untagged" 1 }}{{ end }} +{{ end }} + + +
+
+

Sections

+ + {{ range $sections }} + + {{ end }} + + + +

Authors

+ + {{ range $.Scratch.Get "authors" }} + + {{ end }} + {{ if gt ( $.Scratch.Get "noAuthors") 0 }} + + {{ end }} + + + +

Tags

+ + {{ range $tags }} + {{ if .Term }} + + {{ end }} + {{ end }} + {{ if gt ( $.Scratch.Get "untagged") 0 }} + + {{ end }} + + +
+
+ + + +
+

Items

+
+ {{ range $pages.ByPublishDate.Reverse }} + {{ if in .Params.categories "tv"}} + {{- partial "video_box.html" . -}} +{{ else if in .Params.categories "calendar" }} + {{- partial "calendar_card.html" . -}} +{{ else if in .Params.categories "network" }} + {{- partial "network_card.html" . -}} +{{ else if in .Params.categories "pen" }} + {{- partial "pen_card.html" . -}} +{{ else if in .Params.categories "shouts" }} + {{- partial "shout_card.html" . -}} +{{ else if in .Params.categories "books.lumbung.space"}} +{{- partial "book_card.html" . -}} +{{ else }} + {{- partial "card.html" . -}} +{{ end }} + {{ end }} +
+ +
+ + + + + + +
+ + + + + diff --git a/themes/lumbung-theme/layouts/partials/book_card.html b/themes/lumbung-theme/layouts/partials/book_card.html new file mode 100644 index 0000000..2bd0975 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/book_card.html @@ -0,0 +1,39 @@ +
+
+
+ + {{ $postPermalink := .Permalink}} + + + {{ with (index (.Resources.ByType "image") 0) }} + {{ $height := add .Height 0.0}} + {{ $ratio := div $height .Width}} + {{ $thumb := .Fit "540x540 q80 webp"}} +
+
+ {{ .Title }} +
+ {{ else }} +
+ {{ end }} +
+

+ {{.Title}}

+
+
+ {{ .Summary }} +
+
+
+ +
+
+
+
diff --git a/themes/lumbung-theme/layouts/partials/calendar_card.html b/themes/lumbung-theme/layouts/partials/calendar_card.html index c41cfa9..3a20ffc 100644 --- a/themes/lumbung-theme/layouts/partials/calendar_card.html +++ b/themes/lumbung-theme/layouts/partials/calendar_card.html @@ -1,5 +1,5 @@ {{ $t := (time .Params.event_end) }} -
+
{{ substr .Params.date 0 11}}
diff --git a/themes/lumbung-theme/layouts/partials/card.html b/themes/lumbung-theme/layouts/partials/card.html index 9154a32..5cbaa86 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/contributors.html b/themes/lumbung-theme/layouts/partials/data/contributors.html new file mode 100644 index 0000000..20dce32 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/data/contributors.html @@ -0,0 +1 @@ +{{ with .Params.contributors }}{{ if eq ( printf "%T" . ) "string" }}{{ . | replaceRE "[.]" "_" | urlize }}{{ else if eq ( printf "%T" . ) "[]string" }}{{ range . }}{{ . | replaceRE "[.]" "_" | urlize }} {{end}}{{end}}{{else}}no-contributor{{end}} \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/data/sources.html b/themes/lumbung-theme/layouts/partials/data/sources.html new file mode 100644 index 0000000..d39e141 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/data/sources.html @@ -0,0 +1 @@ +{{ with .Params.sources }}{{ if eq ( printf "%T" . ) "string" }}{{ . | replaceRE "[.]" "_" | urlize }}{{ else if eq ( printf "%T" . ) "[]string" }}{{ range . }}{{ . | replaceRE "[.]" "_" | urlize }} {{end}}{{end}}{{else}}no-sources{{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/event_list_item.html b/themes/lumbung-theme/layouts/partials/event_list_item.html new file mode 100644 index 0000000..524ea99 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/event_list_item.html @@ -0,0 +1,19 @@ +{{ $t := (time .Params.event_end) }} +
+
{{ substr .Params.event_begin 0 11}}
+ +
+
+ + {{ .Params.localized_begin | markdownify }} + +
+
+
Duration: {{ .Params.duration }}
+
{{ .Params.location | markdownify }}
+ + +
+ {{.Content}} +
+
\ 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 new file mode 100644 index 0000000..373c62b --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/filter-nav.html @@ -0,0 +1,91 @@ +
+ + + {{ $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 }} + +
+
+
Cards
+
load more cards
+
+
+
+ +
+ {{ range $sections }} + + {{ end }} + +
+
+ +
+ +
+ {{ range .Site.Taxonomies.contributors }} + + {{ end }} + + + +
+
+ +
+ +
+ {{ range .Site.Taxonomies.sources }} + + {{ end }} + + +
+
+ +
+ +
+ {{ range $tags }} + {{ if .Term }} + + {{ end }} + {{ 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..c75a630 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.
diff --git a/themes/lumbung-theme/layouts/partials/head.html b/themes/lumbung-theme/layouts/partials/head.html index 38b375f..11ab989 100644 --- a/themes/lumbung-theme/layouts/partials/head.html +++ b/themes/lumbung-theme/layouts/partials/head.html @@ -25,4 +25,5 @@ {{ with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} + diff --git a/themes/lumbung-theme/layouts/partials/header.html b/themes/lumbung-theme/layouts/partials/header.html index 41f0da3..ba3b1a0 100644 --- a/themes/lumbung-theme/layouts/partials/header.html +++ b/themes/lumbung-theme/layouts/partials/header.html @@ -1,36 +1,26 @@
-
- - login + - - - - - -
+
+ + +
diff --git a/themes/lumbung-theme/layouts/partials/network_card.html b/themes/lumbung-theme/layouts/partials/network_card.html deleted file mode 100644 index dae6e92..0000000 --- a/themes/lumbung-theme/layouts/partials/network_card.html +++ /dev/null @@ -1,47 +0,0 @@ -
-
-
- {{ $postPermalink := .Permalink}} - -

{{ .Title }}

-
- -
From {{ if .Params.authors }}{{range .Params.authors}} {{ . }} {{end}} at {{ end }}{{ .Params.feed_name }}
- - {{ if .Params.featured_image }} - {{ $img := .Resources.GetMatch .Params.featured_image }} - {{ $height := add $img.Height 0.0}} - {{ $ratio := div $height $img.Width}} - {{ $thumb := $img.Fit "540x540 q80 webp"}} -
-
- {{ .Title }} -
- {{ else if (.Resources.ByType "image") }} - {{ with (index (.Resources.ByType "image") 0) }} - {{ $img := . }} - {{ $height := add .Height 0.0}} - {{ $ratio := div $height .Width}} - {{ $thumb := .Fit "540x540 q80 webp"}} -
-
- {{ .Title }} -
- {{ end }} - {{ else }} -
- {{ end }} -
- {{ .Summary }} -
-
- - -
-
diff --git a/themes/lumbung-theme/layouts/partials/pen_card.html b/themes/lumbung-theme/layouts/partials/pen_card.html index ef2b213..4accc6d 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.author }}{{.Params.author}} 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 625164e..c3ee38b 100644 --- a/themes/lumbung-theme/layouts/partials/shout_card.html +++ b/themes/lumbung-theme/layouts/partials/shout_card.html @@ -1,49 +1,48 @@ -
-
-
- {{ $postPermalink := .Permalink}} -

- {{ range $i, $e := .Params.tags -}} - {{- if $i -}} {{ end -}} - #{{ $e | humanize | lower }} - {{- end -}} -

-
+
+
+
+ {{ $postPermalink := .Permalink}} + +

{{ .Title }}

+
+ +
From {{ if .Params.contributors }}{{range .Params.contributors}} {{ . }} {{end}} at {{ end }}{{ .Params.feed_name }}
- {{ with (index (.Resources.ByType "video") 0) }} - {{/* TODO this current logic does not suport video & image mixed */}} -
- - {{ else}} - {{ with (index (.Resources.ByType "image") 0) }} - {{ $height := add .Height 0.0}} - {{ $ratio := div $height .Width}} - {{ $thumb := .Fit "540x540 q80 webp"}} -
-
- {{ .Title }} -
- {{ else }} -
- {{ end }} - {{ end }} -
- {{ .Summary }} -
-
-
- -
- - {{ if .Truncated }} - - - {{ end }} -
-
+ {{ if .Params.featured_image }} + {{ with $img := .Resources.GetMatch .Params.featured_image }} + {{ $height := add $img.Height 0.0}} + {{ $ratio := div $height $img.Width}} + {{ $thumb := $img.Fit "540x540 q80 webp"}} +
+
+ {{ .Title }} +
+ {{end}} + {{ else if (.Resources.ByType "image") }} + {{ with (index (.Resources.ByType "image") 0) }} + {{ $img := . }} + {{ $height := add .Height 0.0}} + {{ $ratio := div $height .Width}} + {{ $thumb := .Fit "540x540 q80 webp"}} +
+
+ {{ .Title }} +
+ {{ end }} + {{ else }} +
+ {{ end }} +
+ {{ .Summary }} +
+ + +
+
diff --git a/themes/lumbung-theme/layouts/partials/social_card.html b/themes/lumbung-theme/layouts/partials/social_card.html new file mode 100644 index 0000000..464150e --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/social_card.html @@ -0,0 +1,49 @@ + \ No newline at end of file diff --git a/themes/lumbung-theme/layouts/partials/video_box.html b/themes/lumbung-theme/layouts/partials/video_box.html index 54170a6..4a9f418 100644 --- a/themes/lumbung-theme/layouts/partials/video_box.html +++ b/themes/lumbung-theme/layouts/partials/video_box.html @@ -1,4 +1,4 @@ -
+
iframe { box-sizing: border-box; } +a { + color: #000; +} + .container { margin: 2em auto; max-width: 80%; + width: 100%; margin-bottom: 0; } @@ -122,15 +132,15 @@ body > iframe { max-width: 400px; } -.card:nth-child(even) { +.post:nth-child(even) { transform: rotate(-1deg); } -.card:nth-child(odd) { +.post:nth-child(odd) { transform: rotate(1deg); } -.card:nth-child(5) { +.post:nth-child(5) { transform: rotate(2deg); } @@ -159,37 +169,133 @@ body > iframe { /* base header & menu */ -#top-menu { - padding: 1.5rem 1rem 0; - display: grid; - grid-template-columns: 300px 1fr auto; - align-items: flex-start; +.header-row { + margin: 1.5rem; + display: flex; + justify-content: space-between; + align-items: center; } .home-link { - text-decoration: none; + display: block; + max-width: 700px; + width: 70%; + padding: 0; + margin: auto; } .logo { - width: 283px; - margin-top: 2rem; + display: block; + width: 100%; + height: auto; } -#top-menu a { +#top-menu .login-link { + background: #009d9b; + padding: 5px 30px; + color: #fff; + font-weight: 900; + position: absolute; + right: 1.5rem; +} + +.menu-row { + margin: 0 auto; + max-width: 80%; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + position: sticky; + top: 15px; + z-index: 99; + max-width: fit-content; +} + +.menu-row .menu .filter-link { + background: #333; + height: 100%; + display: flex; + align-items: center; + padding: 0.5rem 1.5rem; + color: #fff; + cursor: pointer; +} + +.filter-icon { + height: 14px; + width: auto; + display: block; + margin-right: 10px; +} + +.filter-icon path { + fill:#fff; +} + +.menu-button { + width: 30px; + height: 16px; + display: none; + flex-direction: column; + justify-content: space-between; + color: pointer; +} + +.menu-button--line { + width: 100%; + height: 2px; + background: #333; +} + +.menu { + border: 2px solid #333; + padding: 0 1rem; + display: flex; + align-items: center; + background: #fff; + position: relative; +} + +.menu-dot { + width: 10px; + height: 10px; + margin-right: 3rem; +} + +.menu ul { + list-style-type: none; + margin: 0 auto; + padding-left: 0; + display: flex; + justify-content: space-between; + text-transform: lowercase; +} + +.menu ul li { + margin-right: 1.5rem; + padding: 0.5rem 0; +} + +.menu ul li:last-child { + margin-right: 0; +} + +.menu-nav-item { + border-right: 2px solid var(--border-color); + padding: 0.5em; +} + +.menu a { text-decoration: none; color: #333; } -#top-menu a:hover, -#top-menu a:focus { +.menu a:hover, +.menu a:focus { color: black; } -#top-menu #login { - font-weight: bold; - margin-top: 8px; -} - #top-menu div { display: flex; } @@ -199,7 +305,7 @@ body > iframe { display: none; } -#top-menu input { +.menu input { border: none; border-bottom: 1px solid #333; margin-right: 2rem; @@ -207,8 +313,8 @@ body > iframe { margin-left: 5px; } -#top-menu input:focus, -#top-menu input:hover { +.menu input:focus, +.menu input:hover { outline: none; border-bottom: 1px solid #333; } @@ -222,27 +328,25 @@ body > iframe { display: none; } -.menu { - margin-top: 8px; +.login-menu { + display: none; } -.menu ul { - list-style-type: none; - margin: 0 auto; - padding-left: 3rem; +.menu-row .login { + height: 100%; display: flex; - justify-content: space-between; - text-transform: lowercase; - max-width: 1100px; + align-items: center; + border: 2px solid #333; + padding: 0 1.5rem; + background: #fff; } -.menu-nav-item { - border-right: 2px solid var(--border-color); - padding: 0.5em; +.login a { + text-decoration: none; } /* styles for "tools" dropdown menu */ -#top-menu ul.submenu { +.menu ul.submenu { flex-direction: column; margin-left: 0; position: absolute; @@ -257,6 +361,7 @@ body > iframe { .menu .submenu li { margin: 2px 0; + padding: 0; } .menu .has-submenu { @@ -272,49 +377,37 @@ body > iframe { visibility: visible; } -#top-menu .menu ul.submenu { - margin-left: 11px; - margin-top: 10px; - border: 1px solid ; +.menu ul.submenu { + margin-left: -0.5em; + margin-top: 8px; + border: 2px solid ; gap: 0.25em; padding: 0.5em; } -#top-menu a { - padding: 0 5px; -} - -#top-menu .menu .submenu a { +.menu .menu .submenu a { margin: 0; display: flex; } -#top-menu .drawer .submenu { +.menu .drawer .submenu { position: initial; display: none; } -#top-menu .drawer .submenu.opened { +.menu .drawer .submenu.opened { display: flex; } -#top-menu .drawer .submenu li { +.menu .drawer .submenu li { padding: 0; padding-top: 1em; } -#top-menu .drawer .opened .submenu { +.menu .drawer .opened .submenu { visibility: visible; } -.drawer .has-submenu { - padding-left: 1em; - margin-left: 5px; - color: #333; - display: flex; - flex-direction: column; -} - /*Article Summary Cards*/ @@ -405,9 +498,9 @@ footer.post-footer { } -/* network cards */ +/* shout cards */ -.card.network { +.card.shout { border: 2px solid var(--shouts-dark); background-color: var(--shouts-light); max-width: min-content; @@ -419,70 +512,70 @@ footer.post-footer { } -.h-entry.network header { +.h-entry.shout header { display: flex; flex-direction: column; } -.h-entry.network header h2 { +.h-entry.shout header h2 { padding: 0.2em 0.5em 0.5em 0.5em; margin: 0; border: none; } -.h-entry.network header h2:hover { +.h-entry.shout header h2:hover { cursor: pointer; } -.h-entry.network header h2 a { +.h-entry.shout header h2 a { text-decoration: none; color: var(--shouts-dark); } -.h-entry.network header time { +.h-entry.shout header time { text-align: right; padding: 0.6em 0.8em; font-size: 1rem; } -.network .header-metadata { +.shout .header-metadata { align-items: center; } -.network .header-metadata .dt-published { +.shout .header-metadata .dt-published { border-bottom: 2px solid var(--shouts-dark); } -.network .filler { +.shout .filler { min-height: 1rem; } -.network .author.p-author { +.shout .author.p-author { border-color: var(--shouts-dark); padding: 0.5em 1.2em 0.5em 1.2em; } -.network .p-summary { +.shout .p-summary { display: flex; } -.network .p-summary.portrait { +.shout .p-summary.portrait { /* flex-direction: row; */ } -.network .p-summary.landscape { +.shout .p-summary.landscape { flex-direction: column; } -.network .summary-image > img { +.shout .summary-image > img { display: inherit; } -.network .summary-text { +.shout .summary-text { font-size: 18px; } -div.network-source { +div.shout-source { padding: 1em; padding-right: 2em; width: fit-content; @@ -495,29 +588,28 @@ div.network-source { right: 1em; } -.network-source::before { - content: ""; +.shout-source .triangle { position: absolute; - right: -20px; + right: 0px; bottom: 0; - width: 0; - height: 0; - border-left: 20px solid var(--shouts-dark); - border-top: 23px solid transparent; - border-bottom: 23px solid transparent; + width: auto; + height: calc(100% + 0.5px); + top: -0.5px; + transform: translateX(calc(100% - 0.5px)); + fill: var(--shouts-dark); } -.network-source a { +.shout-source a { font-weight: bold; color: white; } -.network .footer-filler { +.shout .footer-filler { border-left: 2px solid var(--shouts-dark); border-top: none; } -.network footer.post-footer { +.shout footer.post-footer { border-top: 2px solid var(--shouts-dark); flex-flow: row; font-size: 0.9rem; @@ -526,17 +618,17 @@ div.network-source { padding: 1em; } -.network footer svg { +.shout footer svg { fill: var(--shouts-dark) } -.network .read-more { +.shout .read-more { border: none; border-left: 2px solid var(--shouts-dark); padding: 0.5em 1.2em 0.5em 1.2em; } -.network .footer-metadata { +.shout .footer-metadata { padding: 0.5em 1.2em 0.5em 1.2em; } @@ -667,9 +759,9 @@ div.pen-source { padding: 0.5em 1.2em 0.5em 1.2em; } -/* shouts cards */ +/* social / hashtag cards */ -.card.shout { +.card.social { border-color: steelblue; border: 2px solid; background-color: aliceblue; @@ -681,24 +773,24 @@ div.pen-source { color: steelblue; } -.card.shout h2 a { +.card.social h2 a { color: var(--social-dark); cursor: pointer; display: block; word-wrap: anywhere; } -.card .card.shout h2 a:hover { +.card .card.social h2 a:hover { border: none; text-decoration: none; } -.card.shout .post-footer { +.card.social .post-footer { background: var(--social-light); color: var(--social-dark); } -.card.shout .post-footer a{ +.card.social .post-footer a{ background: var(--social-light); color: var(--social-dark); text-decoration: underline; @@ -706,42 +798,42 @@ div.pen-source { /* gallery cards */ -.card.shout.lumbung-gallery { +.card.social.lumbunggallery, .card.social.lumbunggallery .post-footer a { border-color: var(--gallery-dark); background-color: var(--gallery-light); color: var(--gallery-dark); } -.card.shout.lumbung-gallery h2 a { +.card.social.lumbunggallery h2 a { color: var(--gallery-dark); } -.card.shout.lumbung-gallery .post-footer { +.card.social.lumbunggallery .post-footer { background: var(--gallery-light); color: var(--gallery-dark); border-top: 2px solid; } /* kios cards */ -.card.shout.lumbung-kios { +.card.social.lumbungkios { border-color: var(--kios-dark); background-color: var(--kios-light); color: var(--kios-dark); } -.card.shout.lumbung-kios h2 a { +.card.social.lumbungkios h2 a { color: var(--kios-dark); } -.card.shout.lumbung-kios .post-footer { +.card.social.lumbungkios .post-footer { background: var(--kios-light); color: var(--kios-dark); border-top: 2px solid; } -.card.shout.lumbung-kios .post-footer a { +.card.social.lumbungkios .post-footer a { background: none; color: var(--kios-dark); } @@ -1011,6 +1103,8 @@ li.page-item:after { z-index: -100; } + + /* Landingpage */ .welcome-text { text-align: center; @@ -1061,6 +1155,215 @@ li.page-item:after { margin-right: auto; } + +/* FILTER */ + +.filter-item, .card, .video-box { + display: none; +} + +.show-item { + display: block !important; +} + +.filter-container { + display: none; + background: #fff; + padding: 1.5rem; + border: 2px solid #333; + border-top: 0; + position: absolute; + left: 0; + z-index: 99; + width: 100%; + justify-content: space-between; +} + +.filter-information { + width: 15%; +} + +#load-more { + font-size: 0.8rem; + text-decoration: underline; + cursor: pointer; +} + +.filter-buttons-container { + align-items: center; + display: flex; + width: calc(85% - 30px); +} + +.filter-buttons-container-header { + display: flex; + margin-right: 20px; +} + +.filter-link { + height: 100%; + display: flex; + align-items: center; + background: #333; + color: #fff; + padding: calc(0.5rem + 2px) 1rem; + cursor: pointer; +} + +.filter-link:hover + .filter-container { + display: flex; +} + +.filter-container:hover { + display: flex; +} + +.filter-buttons-dropdown { + position: absolute; + top: 41px; + width: calc(100% + 2px); + left: -1px; + background: #fff; + max-height: 35vh; + min-height: 100%; + overflow-y: scroll; + overflow-x: hidden; + border: 1px solid #333; + border-top: 0; + display: none; +} + +.post.tv { + margin: auto; +} + +@media all and (min-width: 980px) { + .filter-buttons:hover .filter-buttons-dropdown { + display: block; + } + + .filter-buttons:hover { + display: block; + } +} + +.filter-buttons { + width: fit-content; + display: flex; + white-space: nowrap; + flex-direction: column; + position: relative; + border: 1px solid #333; + margin-right: 10px; + padding-right: 30px; + width: calc(25% - 7.5px); +} + +.filter-buttons:last-child { + margin-right: 0px; +} + +.filter-buttons > button { + height: 40px; +} + +.filter-by:after { + content:""; + width: 0; + height: 0; + border-style: solid; + border-width: 5px 5px 0 5px; + border-color: #333333 transparent transparent transparent; + position: absolute; + right: 0.5rem; +} + +.filter-buttons button { + display: flex; + align-items: center; + justify-content: space-between; + border: 0; + background: unset; + border-radius: 0; + width: 100%; + padding: 0.6rem; + cursor: pointer; + white-space: nowrap; + text-transform: lowercase; +} + +.filter-buttons-dropdown button { + border-bottom: 1px solid; +} + +.filter-buttons .filter-button { + padding: 0.6rem 0.6rem 0.6rem 1.6rem; +} + +.filter-button svg { + width: 10px; + position: absolute; + left: 0.6rem; +} + +.filter-button svg path { + fill: #3330; + stroke: #333; + stroke-width: 2px; +} + +.filter-button.active svg path { + fill: #333; +} + +.filter-title { + width: calc(100% - 20px); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: left; +} + +.filter-buttons-dropdown button:last-child { + border-bottom: 0; +} + +.filter-buttons .filter-button.active { + background: #c2c2ff; +} + +.disable-button { + display: none !important; +} + + .page-nav { + display: flex; + justify-content: center; + margin: 20px auto 50px; + } + + .nextpage { + padding: 15px; + position: relative; + color: #333; + text-decoration: none; + margin: 0px 20px; + font-size: 38px; + } + + .nextpage:after { + content: ""; + height: 50%; + width: 100%; + display: block; + border: 2px solid #333; + border-top: 0; + bottom: 0; + position: absolute; + left: 0; + } + + /* ### Timeline ### */ /* Timeline Tags */ @@ -1389,6 +1692,119 @@ a.timeline-url { } +/* EVENT LIST */ + +.event-list { + border: 2px solid var(--calendar-dark); + background-color: var(--calendar-light); + color: var(--calendar-dark); + margin: 1rem 0 4rem; +} + +.event-list .tape-label span { + background-color: var(--calendar-dark); +} + +.event-list-item { + border-top: 1px solid; + display: flex; + flex-wrap: wrap; +} + +.event-list-item-head { + display: flex; +} + +.event-list-item a { + color: var(--calendar-dark); +} + +.event-list-item .date-start, .event-list-item .title, .event-list-item .time, .event-list-item .duration, .event-list-item .location { + display: flex; + align-items: center; + border-right: 1px solid var(--calendar-dark); + padding: 0.8rem 0; + overflow: hidden; +} + +.event-list-item .date-start { + font-size: 1.2rem; + width: 110px; + padding-left: 0.4rem; + border-right: 0; +} + +.event-list-item .title { + width: calc(45% - 110px); + padding-left: 0.4rem; +} + +.event-list-item .p-name { + margin: 0; + font-size: 1.2rem; + padding: 0; + display: block; + width: 100%; +} + +.event-list-item .p-name a { + color: var(--calendar-dark); + text-decoration: none; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: calc(100% - 20px); + display: block; +} + +.event-list-item .time { + width: 20%; +} + +.event-list-item .time .start-scroller { + border-bottom: 0px; +} + +.event-list-item .duration { + width: 12.5%; + font-size: 0.8rem; + padding: 0.8rem 0.4rem; +} + +.event-list-item .duration b { + margin-left: 3px; +} + +.event-list-item .location { + min-width: unset; + width: 15%; + font-size: 0.8rem; + padding: 0.8rem 0.4rem; +} + +.event-list-item .button { + width: 7.5%; +} + +.event-list-item .calendar { + width: 7.5%; + display: flex; + align-items: center; + padding: 0.8rem 0.4rem; + cursor: pointer; +} + +.event-list-item .description { + display: none; + border-top: 1px solid; + font-size: 1.2rem; +} + +input:checked + label + .description { + display: block; + transition: ease .5s; + } + /* Page footer */ #footer { @@ -1441,6 +1857,8 @@ a.timeline-url { } .f-main .logo { + width: 280px; + max-height: unset; filter: brightness(0); max-width: 20vw; margin-top: 0; @@ -1546,6 +1964,10 @@ a.timeline-url { font-size: 1.8vw; vertical-align: top; } + + .menu-row { + font-size: 1.78vw; + } } @@ -1557,23 +1979,216 @@ a.timeline-url { } #top-menu { - grid-template-columns: 1fr; + width: 100%; } - .menu, - #login { - display: none; + .logo { + max-height: 50px; } /* menu styles */ + + .menu-row, #top-menu { + position: fixed !important; + z-index: 97; + } + + .menu-row { + z-index: 98; + width: fit-content; + margin-top: 3vw; + right: 5%; + } + + .menu { + display: none; + position: fixed; + left: 20px; + top: 80px; + width: calc(100vw - 40px); + overflow: scroll; + height: calc(100% - 90px); + padding: 0.5rem 1.5rem; + } + + .menu.active { + display: block; + } + + .menu ul { + margin: 0; + display: block; + } + + .menu-row .login { + display: none; + } + + .menu-button { + display: flex; + position: fixed; + left: 20px; + top: clamp(25px, 7vw, 35px); + } + + .menu ul.submenu { + margin-left: 0; + margin-top: 4px; + position: unset; + border: 0; + padding-left: 20px !important; + display: none; + } + + .menu .submenu li { + margin: 0; + padding: 0.5rem 0; + } + + .menu ul.submenu.active { + display: block; + visibility: visible; + } + + .login-menu { + display: block; + padding: 0.5rem 2rem; + background: #333; + transform: rotate(-3deg); + width: fit-content; + margin: 0.5rem 0 1rem; + } + + .login-menu a { + color: #fff !important; + } + + .menu-button--line{ + transition: all 0.3s ease-in-out; + } + + .menu-button.active { + -webkit-transition: all 0.3s ease-in-out; + -o-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; + transition-delay: 0s; + -webkit-transition-delay: 0.6s; + -o-transition-delay: 0.6s; + transition-delay: 0.6s; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + } + + .menu-button.active .menu-button--line:nth-child(1) { + -webkit-transform: translateY(8px); + -ms-transform: translateY(8px); + -o-transform: translateY(8px); + transform: translateY(8px); + -webkit-transition-delay: 0.3s; + -o-transition-delay: 0.3s; + transition-delay: 0.3s; + } + + .menu-button.active .menu-button--line:nth-child(2) { + width: 0px; + } + + .menu-button.active .menu-button--line:nth-child(3) { + -webkit-transform: translateY(-6px) rotate(90deg); + -ms-transform: translateY(-6px) rotate(90deg); + -o-transform: translateY(-6px) rotate(90deg); + transform: translateY(-6px) rotate(90deg); + -webkit-transition-delay: 0.3s; + -o-transition-delay: 0.3s; + transition-delay: 0.3s; + } + + .filter { + position: fixed; + right: 20px; + top: clamp(25px, 7vw, 35px); + } + + .filter-container { + flex-wrap: wrap; + border-top: 2px solid #333; + left: 20px; + width: calc(100vw - 40px); + position: fixed; + margin-top: 30px; + display: none !important; + } + + #filter.active .filter-container { + display: block !important; + } + + .filter-information { + width: 100%; + margin-bottom: 15px; + display: flex; + align-items: center; + justify-content: space-between; + } + + .filter-buttons-container { + display: block; + width: 100%; + } + + .filter-buttons-container.open { + display: block !important; + } + + .filter-buttons-dropdown { + z-index: 99; + } + + .filter-buttons { + margin-right: 0px; + margin-bottom: 10px; + width: 100%; + } + + .container { + padding-top: 60px; + } + + .filter-link { + background: unset; + padding: 0; + } + + .filter-link span { + display: none; + } + + .filter-icon { + height: 20px; + margin-right: 0; + } + + .filter-icon path { + fill: #333; + } + + .filter-buttons-dropdown.active { + display: block; + } + + .filter-by.active:after { + transform: rotate(180deg); + } + #top-menu div.mobile-menu { display: flex; justify-content: space-between; } - .mobile-menu #login { - display: inline-flex; - margin: 0 0 0 auto; + #top-menu .login-link { + display: none; } .hamburger { @@ -1671,6 +2286,38 @@ a.timeline-url { .f-main .logo { max-width: unset; } + + /* EVENT LIST */ + + .event-list .event-list-item:nth-child(2n) { + background: #c8efff; + } + + .event-list-item .date-start { + border-bottom: 1px solid; + } + + .event-list-item .title { + width: calc(100% - 110px); + border-bottom: 1px solid; + border-right: 0; + } + + .event-list-item .time { + width: 100%; + border-bottom: 1px solid; + border-right: 0; + padding: 0; + } + + .event-list-item .duration, .event-list-item .location { + width: 42%; + } + + .event-list-item .calendar { + width: 16%; + } + } /* mobile styles */ diff --git a/themes/lumbung-theme/static/img/black-dot.svg b/themes/lumbung-theme/static/img/black-dot.svg new file mode 100644 index 0000000..1cae633 --- /dev/null +++ b/themes/lumbung-theme/static/img/black-dot.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/themes/lumbung-theme/static/img/logo-big.svg b/themes/lumbung-theme/static/img/logo-big.svg new file mode 100644 index 0000000..9409ee3 --- /dev/null +++ b/themes/lumbung-theme/static/img/logo-big.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/lumbung-theme/static/img/logo.svg b/themes/lumbung-theme/static/img/logo.svg index 9409ee3..c60c548 100644 --- a/themes/lumbung-theme/static/img/logo.svg +++ b/themes/lumbung-theme/static/img/logo.svg @@ -1,21 +1,17 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/themes/lumbung-theme/static/js/hugotagsfilter-1.2.2.min.js b/themes/lumbung-theme/static/js/hugotagsfilter-1.2.2.min.js new file mode 100644 index 0000000..e89770b --- /dev/null +++ b/themes/lumbung-theme/static/js/hugotagsfilter-1.2.2.min.js @@ -0,0 +1,221 @@ +!(function l(r, a, o) { + function h(e, t) { + if (!a[e]) { + if (!r[e]) { + var s = "function" == typeof require && require; + if (!t && s) return s(e, !0); + if (u) return u(e, !0); + var i = new Error("Cannot find module '" + e + "'"); + throw ((i.code = "MODULE_NOT_FOUND"), i); + } + var n = (a[e] = { exports: {} }); + r[e][0].call( + n.exports, + function (t) { + return h(r[e][1][t] || t); + }, + n, + n.exports, + l, + r, + a, + o + ); + } + return a[e].exports; + } + for (var u = "function" == typeof require && require, t = 0; t < o.length; t++) h(o[t]); + return h; +})( + { + 1: [ + function (t, e, s) { + "use strict"; + var i = (function () { + function i(t, e) { + for (var s = 0; s < e.length; s++) { + var i = e[s]; + (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i); + } + } + return function (t, e, s) { + return e && i(t.prototype, e), s && i(t, s), t; + }; + })(); + /** + * @name 'Hugo Tags Filter' + * @version 1.2.2 + * @license MIT + * @author PointyFar + */ + var n = (function () { + function l(t) { + !(function (t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + })(this, l); + (this.FILTERS = + t && t.filters + ? t.filters + : [ + { name: "tag", prefix: "tft-", buttonClass: "tft-button", allSelector: "#tfSelectAllTags", attrName: "data-tags" }, + { name: "section", prefix: "tfs-", buttonClass: "tfs-button", allSelector: "#tfSelectAllSections", attrName: "data-section" }, + ]), + (this.showItemClass = t && t.showItemClass ? t.showItemClass : "tf-show"), + (this.activeButtonClass = t && t.activeButtonClass ? t.activeButtonClass : "active"), + (this.filterItemClass = t && t.filterItemClass ? t.filterItemClass : "tf-filter-item"), + (this.counterSelector = t && t.counterSelector ? t.counterSelector : "selectedItemCount"), + (this.populateCount = !(!t || !t.populateCount) && t.populateCount), + (this.setDisabledButtonClass = !(!t || !t.setDisabledButtonClass) && t.setDisabledButtonClass), + (this.filterItems = document.getElementsByClassName(this.filterItemClass)), + (this.selectedItemCount = 0), + (this.filterValues = {}); + for (var e = 0; e < this.FILTERS.length; e++) { + (this.FILTERS[e].buttonTotal = document.getElementsByClassName(this.FILTERS[e].buttonClass).length), (this.FILTERS[e].selected = []), (this.FILTERS[e].values = []); + var s = document.getElementsByClassName(this.FILTERS[e].buttonClass); + this.filterValues[this.FILTERS[e].name] = []; + for (var i = 0; i < s.length; i++) { + var n = s[i].id.replace(this.FILTERS[e].prefix, ""); + this.filterValues[this.FILTERS[e].name][n] = { count: 0, selected: 0 }; + } + } + this.showCheck(this.FILTERS[0].name, !0); + } + return ( + i(l, [ + { + key: "initFilterCount", + value: function (t, e) { + if (e) for (var s in t) for (var i = 0; i < this.filterItems.length; i++) for (var n = this.getAttrs(s, this.filterItems[i]), l = 0; l < n.length; l++) t[s][n[l]].count++, t[s][n[l]].selected++; + else { + var r = document.getElementsByClassName(this.showItemClass); + for (var s in t) for (var a in t[s]) t[s][a].selected = 0; + for (l = 0; l < r.length; l++) + for (s in t) { + n = this.getAttrs(s, r[l]); + for (var o = 0; o < n.length; o++) t[s][n[o]].selected++; + } + } + return t; + }, + }, + { + key: "populateCounters", + value: function (t) { + if (this.populateCount) + for (var e = 0; e < this.FILTERS.length; e++) { + var s = this.FILTERS[e].name, + i = this.FILTERS[e].countPrefix, + n = this.FILTERS[e].selectedPrefix; + if (i || n) + for (var l in t[s]) { + if (i) document.getElementById("" + i + l).textContent = t[s][l].count; + if (n) { + var r = document.getElementById("" + n + l); + (r.textContent = t[s][l].selected), + this.setDisabledButtonClass && + (0 == r.textContent + ? this.addClassIfMissing(document.getElementById(this.FILTERS[e].prefix + l), this.setDisabledButtonClass) + : this.delClassIfPresent(document.getElementById(this.FILTERS[e].prefix + l), this.setDisabledButtonClass)); + } + } + } + }, + }, + { + key: "getAttrs", + value: function (t, e) { + return e + .getAttribute("data-" + t) + .split(" ") + .filter(function (t) { + return 0 < t.length; + }); + }, + }, + { + key: "showAll", + value: function (t) { + for (var e = 0; e < this.FILTERS.length; e++) t ? this.FILTERS[e].name === t && (this.FILTERS[e].selected = []) : (this.FILTERS[e].selected = []); + this.showCheck(t); + }, + }, + { + key: "checkFilter", + value: function (t, e) { + for (var s = document.querySelector("#" + e + t), i = 0; i < this.FILTERS.length; i++) + this.FILTERS[i].prefix === e && + (0 <= this.FILTERS[i].selected.indexOf(t) + ? (this.FILTERS[i].selected.splice(t, 1), this.delClassIfPresent(s, this.activeButtonClass)) + : (this.FILTERS[i].selected.push(t), this.addClassIfMissing(s, this.activeButtonClass)), + this.delClassIfPresent(document.querySelector(this.FILTERS[i].allSelector), this.activeButtonClass), + this.showCheck(this.FILTERS[i].name)); + }, + }, + { + key: "showCheck", + value: function (t, e) { + for (var s = 0; s < this.FILTERS.length; s++) + if (this.FILTERS[s].name === t && (0 === this.FILTERS[s].selected.length || this.FILTERS[s].selected.length === this.FILTERS[s].buttonTotal)) { + for (var i = document.getElementsByClassName(this.FILTERS[s].buttonClass), n = 0; n < i.length; n++) this.delClassIfPresent(i[n], this.activeButtonClass); + this.addClassIfMissing(document.querySelector(this.FILTERS[s].allSelector), this.activeButtonClass); + } + for (s = this.selectedItemCount = 0; s < this.filterItems.length; s++) { + this.delClassIfPresent(this.filterItems[s], this.showItemClass); + var l = 0; + for (n = 0; n < this.FILTERS.length; n++) this.checkVisibility(this.FILTERS[n].selected, this.filterItems[s].getAttribute(this.FILTERS[n].attrName)) && l++; + l === this.FILTERS.length && (this.filterItems[s].classList.contains(this.showItemClass) || (this.selectedItemCount++, this.addClassIfMissing(this.filterItems[s], this.showItemClass))); + } + document.getElementById(this.counterSelector) && (document.getElementById(this.counterSelector).textContent = "" + this.selectedItemCount), this.checkButtonCounts(e); + }, + }, + { + key: "checkButtonCounts", + value: function (t) { + (this.filterValues = this.initFilterCount(this.filterValues, t)), this.populateCounters(this.filterValues); + }, + }, + { + key: "checkVisibility", + value: function (t, e) { + if (0 < t.length) { + for (var s = 0; s < t.length; s++) { + if ( + 0 <= + e + .split(" ") + .filter(function (t) { + return 0 < t.length; + }) + .indexOf(t[s]) + ) + return !0; + } + return !1; + } + return !0; + }, + }, + { + key: "addClassIfMissing", + value: function (t, e) { + t.classList.contains(e) || t.classList.add(e); + }, + }, + { + key: "delClassIfPresent", + value: function (t, e) { + t.classList.contains(e) && t.classList.remove(e); + }, + }, + ]), + l + ); + })(); + window.HugoTagsFilter = n; + }, + {}, + ], + }, + {}, + [1] +);