diff --git a/config.toml b/config.toml index 44eadc6..1e59e82 100644 --- a/config.toml +++ b/config.toml @@ -21,8 +21,9 @@ unsafe = true [taxonomies] author = "authors" + contributor = "contributors" tag = "tags" - category = "categories" + source = "sources" timeline = "timelines" [permalinks] 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..9e34d4e 100644 --- a/themes/lumbung-theme/layouts/_default/baseof.html +++ b/themes/lumbung-theme/layouts/_default/baseof.html @@ -41,16 +41,6 @@ }) }) - // add classes for styling lumbung kios and lumbung gallery cards - let cards = document.querySelectorAll('.shout.card'); - [...cards].forEach(card => { - if (card.querySelector('a[href="/tags/lumbungkios"]') || card.querySelector('a[href="/tags/lumbungkiosproducts"]')) { - card.classList.add('lumbung-kios') - } else if (card.querySelector('a[href="/tags/lumbunggallery"]')) { - card.classList.add('lumbung-gallery') - } - }) - // footer random color var color = ['orange','green','blue']; var footer = document.getElementById("footer"); diff --git a/themes/lumbung-theme/layouts/_default/list.html b/themes/lumbung-theme/layouts/_default/list.html index e93d0c7..3c45a28 100644 --- a/themes/lumbung-theme/layouts/_default/list.html +++ b/themes/lumbung-theme/layouts/_default/list.html @@ -4,40 +4,32 @@
{{ range where (.Paginator 13).Pages "Params.hidden" "ne" "true" }} - {{ if in .Params.categories "tv"}} - + {{if eq .Section "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 "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 if eq .Section "events" }} + {{- partial "partials/calendar_card.html" . -}} + + {{ else if eq .Section "shouts" }} + {{ if in .Params.sources "pen.lumbung.space" }} + {{- partial "pen_card.html" . -}} + {{ else }} + {{- partial "shout_card.html" . -}} + {{ end }} + + {{ else if eq .Section "social" }} + {{- partial "social_card.html" . -}} + + {{ else if eq .Section "publications"}} + {{- partial "book_card.html" . -}} + + {{ else if eq .Section "sounds"}} + {{- partial "sounds_card.html" . -}} + {{ else }} - {{- partial "card.html" . -}} - - {{ end }} - + + {{ end }} {{ end }}
diff --git a/themes/lumbung-theme/layouts/index.html b/themes/lumbung-theme/layouts/index.html index 0f9408f..a5c69ec 100644 --- a/themes/lumbung-theme/layouts/index.html +++ b/themes/lumbung-theme/layouts/index.html @@ -6,22 +6,34 @@ {{ .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 }} + + {{if eq .Section "tv"}} + {{- partial "video_box.html" . -}} + + {{ else if eq .Section "events" }} + {{- partial "partials/calendar_card.html" . -}} + + {{ else if eq .Section "shouts" }} + {{ if in .Params.sources "pen.lumbung.space" }} + {{- partial "pen_card.html" . -}} + {{ else }} + {{- partial "shout_card.html" . -}} + {{ end }} + + {{ else if eq .Section "social" }} + {{- partial "social_card.html" . -}} + + {{ else if eq .Section "publications"}} + {{- partial "book_card.html" . -}} + + {{ else if eq .Section "sounds"}} + {{- partial "sounds_card.html" . -}} + + {{ else }} + {{- partial "card.html" . -}} + {{ end }} + + {{ end }} {{ end }} - {{- partial "filter-nav.html" . -}} -
@@ -42,3 +39,4 @@
+ \ No newline at end of file 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..b1cac10 100644 --- a/themes/lumbung-theme/layouts/partials/pen_card.html +++ b/themes/lumbung-theme/layouts/partials/pen_card.html @@ -1,7 +1,7 @@
-
From {{ if .Params.author }}{{.Params.author}} at {{ end }}{{ .Params.feed_name }}
+
From {{ if .Params.contributors }}{{range .Params.contributors}} {{ . }} {{end}} at {{ end }}{{ .Params.feed_name }}
{{ $postPermalink := .Permalink}} diff --git a/themes/lumbung-theme/layouts/partials/shout_card.html b/themes/lumbung-theme/layouts/partials/shout_card.html index 625164e..982cd21 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 }} + {{ 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 }}
- {{ else }} -
- {{ end }} - {{ 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..d9c08d0 --- /dev/null +++ b/themes/lumbung-theme/layouts/partials/social_card.html @@ -0,0 +1,49 @@ +
+
+
+ {{ $postPermalink := .Permalink}} +

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

+
+ + {{ 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 }} +
+
+ + + +
+
diff --git a/themes/lumbung-theme/static/css/main.css b/themes/lumbung-theme/static/css/main.css index c2a807e..1cd9692 100644 --- a/themes/lumbung-theme/static/css/main.css +++ b/themes/lumbung-theme/static/css/main.css @@ -174,8 +174,9 @@ a { .home-link { display: block; max-width: 700px; - width: 70%; + width: 50%; padding: 0; + margin: auto; } .logo { @@ -184,7 +185,7 @@ a { height: auto; } -#top-menu .login-link { +.login-link { background: #009d9b; padding: 5px 30px; color: #fff; @@ -194,7 +195,6 @@ a { .menu-row { margin: 0 auto; max-width: 80%; - width: 100%; display: flex; justify-content: space-between; align-items: center; @@ -408,6 +408,7 @@ a { .h-entry header h2 a { text-decoration: none; color: var(--border-color); + word-wrap: anywhere; } .h-entry header .header-metadata { @@ -475,9 +476,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; @@ -489,70 +490,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; @@ -565,7 +566,7 @@ div.network-source { right: 1em; } -.network-source .triangle { +.shout-source .triangle { position: absolute; right: 0px; bottom: 0; @@ -576,17 +577,17 @@ div.network-source { 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; @@ -595,17 +596,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; } @@ -736,9 +737,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; @@ -750,24 +751,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; @@ -775,42 +776,42 @@ div.pen-source { /* gallery cards */ -.card.shout.lumbung-gallery { +.card.social.lumbunggallery { 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); } @@ -1084,7 +1085,7 @@ li.page-item:after { /* FILTER */ .filter-item, .card, .video-box { - display: none; +/* display: none;*/ } .show-item { @@ -1911,7 +1912,7 @@ a.timeline-url { /* card styles */ .card, - .card.network { + .card.shout { max-width: 83vw; }