forked from ruangrupa/lumbung.space
Merge pull request 'merge filter & frontpage redesign' (#1) from filter into main
Reviewed-on: #1main
commit
5a1766deec
@ -1,40 +1,48 @@ |
||||
{{ define "main" }} |
||||
<main> |
||||
<section class='entries'> |
||||
<div class="h-feed"> |
||||
{{ range where (.Paginator 13).Pages "Params.hidden" "ne" "true" }} |
||||
|
||||
{{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" . -}} |
||||
<div class="h-feed"> |
||||
{{ $range := where .Pages "Params.hidden" "ne" "true" }} |
||||
{{ $paginator := .Paginate $range }} |
||||
{{ $pageSize := $paginator.PageSize }} |
||||
{{ $totalPostsToShow := mul $paginator.PageNumber $pageSize }} |
||||
{{ range $index, $el := (first $totalPostsToShow $range) }} |
||||
|
||||
{{ else if eq .Section "publications"}} |
||||
{{- partial "book_card.html" . -}} |
||||
|
||||
{{ else if eq .Section "sounds"}} |
||||
{{- partial "sounds_card.html" . -}} |
||||
|
||||
{{ else }} |
||||
{{- partial "card.html" . -}} |
||||
|
||||
{{ end }} |
||||
<div class='post {{if eq .Section "tv"}}tv{{ end }}' {{ if eq $index (sub $totalPostsToShow $pageSize) }}id="newpage"{{ 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 "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 }} |
||||
</div> |
||||
{{ end }} |
||||
</div> |
||||
|
||||
<nav class="pagination"> |
||||
{{ template "_internal/pagination.html" . }} |
||||
</nav> |
||||
|
||||
<div class="page-nav"> |
||||
{{ if and (gt $paginator.TotalPages 1) ($paginator.HasNext) }} |
||||
<a id="load-more-paginator" class="nextpage" href="{{ $paginator.Next.URL }}#newpage">load more</a> |
||||
{{ end }} |
||||
</div> |
||||
</section> |
||||
</main> |
||||
{{ end }} |
||||
{{ end }} |
@ -0,0 +1,39 @@ |
||||
{{ define "main" }} |
||||
<main> |
||||
<section class='entries'> |
||||
|
||||
{{ $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 }} |
||||
<div class="upcoming event-list"> |
||||
<div class='tape-label'><span>upcoming events</span></div> |
||||
{{ range $upcoming}} |
||||
{{- partial "event_list_item.html" . -}} |
||||
{{end}} |
||||
</div> |
||||
{{end}} |
||||
{{ with $past }} |
||||
<div class="past event-list"> |
||||
<div class='tape-label'><span>past events</span></div> |
||||
{{ range $past }} |
||||
{{- partial "event_list_item.html" . -}} |
||||
{{ end }} |
||||
</div> |
||||
{{ end }} |
||||
|
||||
</section> |
||||
</main> |
||||
{{ end }} |
@ -1,39 +1,39 @@ |
||||
<div class='book card'> |
||||
<article class="h-entry book"> |
||||
<div class="tape-label book"><span><time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time></span><div></div></div> |
||||
|
||||
{{ $postPermalink := .Permalink}} |
||||
</header> |
||||
<div class='book card filter-item'> |
||||
<article class="h-entry book"> |
||||
<div class="tape-label book"><span><time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time></span><div></div></div> |
||||
|
||||
{{ $postPermalink := .Permalink}} |
||||
</header> |
||||
|
||||
{{ with (index (.Resources.ByType "image") 0) }} |
||||
{{ $height := add .Height 0.0}} |
||||
{{ $ratio := div $height .Width}} |
||||
{{ $thumb := .Fit "540x540 q80 webp"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{ else }} |
||||
<div class="p-summary"> |
||||
{{ end }} |
||||
<header> |
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url"> |
||||
{{.Title}}</a></h2> |
||||
</header> |
||||
<div class="summary-text"> |
||||
{{ .Summary }} |
||||
</div> |
||||
</div> |
||||
<div class="shout-source"></div> |
||||
|
||||
<footer class='post-footer'> |
||||
<div class='footer-metadata'> |
||||
<span class="from p-author">{{ if .Params.authors }}By {{range .Params.authors}}<b> <a href='{{ "/authors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> on{{ end }}</span> |
||||
|
||||
{{ if .Truncated }} |
||||
<div class="footer-filler"></div> |
||||
<div class='read-more'><a href="{{ .RelPermalink }}">Read Moreโฆ</a></div> |
||||
{{ end }} |
||||
</footer> |
||||
</article> |
||||
{{ with (index (.Resources.ByType "image") 0) }} |
||||
{{ $height := add .Height 0.0}} |
||||
{{ $ratio := div $height .Width}} |
||||
{{ $thumb := .Fit "540x540 q80 webp"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{ else }} |
||||
<div class="p-summary"> |
||||
{{ end }} |
||||
<header> |
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url"> |
||||
{{.Title}}</a></h2> |
||||
</header> |
||||
<div class="summary-text"> |
||||
{{ .Summary }} |
||||
</div> |
||||
</div> |
||||
<div class="shout-source"></div> |
||||
|
||||
<footer class='post-footer'> |
||||
<div class='footer-metadata'> |
||||
<span class="from p-author">{{ if .Params.authors }}By {{range .Params.authors}}<b> <a href='{{ "/authors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> on{{ end }}</span> |
||||
|
||||
{{ if .Truncated }} |
||||
<div class="footer-filler"></div> |
||||
<div class='read-more'><a href="{{ .RelPermalink }}">Read Moreโฆ</a></div> |
||||
{{ end }} |
||||
</footer> |
||||
</article> |
||||
</div> |
||||
|
@ -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}} |
@ -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}} |
@ -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}} |
@ -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}} |
@ -0,0 +1 @@ |
||||
{{ with .Params.tags }}{{ range . }}{{ . | replaceRE "[.]" "_" | urlize }} {{ end }}{{ else }} tfuntagged{{ end }} |
@ -0,0 +1,19 @@ |
||||
{{ $t := (time .Params.event_end) }} |
||||
<div class='event-list-item'> |
||||
<div class='date-start'><span> {{ substr .Params.event_begin 0 11}}</span></div> |
||||
<div class='title'><h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2></div> |
||||
<div class='time'> |
||||
<div class='start-scroller'> |
||||
<marquee behavior="scroll" direction="left"> |
||||
{{ .Params.localized_begin | markdownify }} |
||||
</marquee> |
||||
</div> |
||||
</div> |
||||
<div class='duration'>Duration: <b>{{ .Params.duration }}</b></div> |
||||
<div class='location'>{{ .Params.location | markdownify }}</div> |
||||
<input class='descr_button' type='checkbox' id='toggle-{{ .Params.uid }}'/> |
||||
<label class='calendar' for='toggle-{{ .Params.uid }}'>โ</label> |
||||
<div class='calendar description p-description' id='event-{{ .Params.uid }}'> |
||||
{{.Content}} |
||||
</div> |
||||
</div> |
@ -1,121 +1,91 @@ |
||||
<div class="filter-link"><svg class="filter-icon" enable-background="new 0 0 510.2 512" version="1.1" viewBox="0 0 510.2 512" xmlns="http://www.w3.org/2000/svg"><path d="m499.1 0c2.8 2.2 6.2 4 8.3 6.8 4.4 5.8 3.5 12.6-1.9 19.2-15.7 19.4-31.5 38.8-47.3 58.2-41.2 50.8-82.5 101.6-123.8 152.4-2 2.4-3.9 3.4-7.1 3.4-48.2-0.1-96.3-0.1-144.5 0-3.2 0-5.1-1-7.1-3.4-56.4-69.6-112.9-139.1-169.4-208.7-9.7-11.9-8.3-20.3 4.8-27.9h488z"/><path d="m206.1 512c-8.7-4-11.2-10.8-11.1-20.2 0.3-71.8 0.1-143.6 0.1-215.4v-6.2h120v5.5c0 57.6-0.1 115.3 0.1 172.9 0 8.7-3.3 14.4-11.1 18.2-29.9 14.6-59.6 29.6-89.4 44.4-0.3 0.1-0.4 0.5-0.6 0.7-2.7 0.1-5.3 0.1-8 0.1z"/></svg><span>Filter</span></div> |
||||
|
||||
{{ $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 }} |
||||
|
||||
{{ $.Scratch.Set "cats" (slice ) }} |
||||
{{ $.Scratch.Set "nocat" 0 }} |
||||
|
||||
{{ 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 }} |
||||
|
||||
|
||||
{{ $tags := $.Site.Taxonomies.tags.ByCount }} |
||||
|
||||
{{ $.Scratch.Set "untagged" 0 }} |
||||
{{ range $pages }} |
||||
{{ with .Params.tags }}{{ else }}{{ $.Scratch.Add "untagged" 1 }}{{ end }} |
||||
{{ end }} |
||||
|
||||
<div class="filter-buttons-container"> |
||||
<div class="filter-buttons-container-header"> |
||||
<div><span id="selectedItemCount"></span> Items</div> |
||||
<a href="" class="load-all">Load all Items</a> |
||||
</div> |
||||
<div class="filter-buttons"> |
||||
<button xx id="selectAllSections" onclick="htf.showAll('section')"> |
||||
All Sections |
||||
</button> |
||||
{{ range $sections }} |
||||
<button xx class="sect-button filter-button" id="sect-{{ . | urlize }}" onclick="htf.checkFilter('{{ . | urlize }}', 'sect-')"> |
||||
{{ . | title }} <span id="ssect-{{ . | urlize }}"> -count-</span> | <span id="csect-{{ . | urlize }}"> -count-</span> |
||||
</button> |
||||
<div class="filter" id="filter"> |
||||
<div class="filter-link" id="filter-link"><svg class="filter-icon" enable-background="new 0 0 510.2 512" version="1.1" viewBox="0 0 510.2 512" xmlns="http://www.w3.org/2000/svg"><path d="m499.1 0c2.8 2.2 6.2 4 8.3 6.8 4.4 5.8 3.5 12.6-1.9 19.2-15.7 19.4-31.5 38.8-47.3 58.2-41.2 50.8-82.5 101.6-123.8 152.4-2 2.4-3.9 3.4-7.1 3.4-48.2-0.1-96.3-0.1-144.5 0-3.2 0-5.1-1-7.1-3.4-56.4-69.6-112.9-139.1-169.4-208.7-9.7-11.9-8.3-20.3 4.8-27.9h488z"/><path d="m206.1 512c-8.7-4-11.2-10.8-11.1-20.2 0.3-71.8 0.1-143.6 0.1-215.4v-6.2h120v5.5c0 57.6-0.1 115.3 0.1 172.9 0 8.7-3.3 14.4-11.1 18.2-29.9 14.6-59.6 29.6-89.4 44.4-0.3 0.1-0.4 0.5-0.6 0.7-2.7 0.1-5.3 0.1-8 0.1z"/></svg><span>filter</span></div> |
||||
|
||||
{{ $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 }} |
||||
</div> |
||||
|
||||
<div class="filter-buttons"> |
||||
<button xx id="selectAllAuthors" onclick="htf.showAll('authors')"> |
||||
All Authors |
||||
</button> |
||||
|
||||
{{ range .Site.Taxonomies.authors }} |
||||
<button xx class="auth-button filter-button" id="auth-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}" onclick="htf.checkFilter('{{ .Page.Title | replaceRE "[.]" "_" | urlize }}', 'auth-')"> |
||||
{{ .Page.Title }} <span id="sauth-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}"> -count-</span> | <span id="cauth-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}"> -count-</span> |
||||
</button> |
||||
{{ end }} |
||||
|
||||
{{ if gt ( $.Scratch.Get "noAuthors") 0 }} |
||||
<button xx class="auth-button" id="auth-no-author" onclick="htf.checkFilter('no-author', 'auth-')"> |
||||
No Author <span id="sauth-no-author"> -count-</span> | <span id="cauth-no-author"> -count-</span> |
||||
</button> |
||||
{{ end }} |
||||
</div> |
||||
|
||||
<div class="filter-buttons"> |
||||
<button xx id="selectAllCats" onclick="htf.showAll('cats')"> |
||||
All Categories |
||||
</button> |
||||
|
||||
{{ range .Site.Taxonomies.categories }} |
||||
<button xx class="cat-button filter-button" id="cat-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}" onclick="htf.checkFilter('{{ .Page.Title | replaceRE "[.]" "_" | urlize }}', 'cat-')"> |
||||
{{ .Page.Title }} <span id="scat-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}"> -count-</span> | <span id="ccat-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}"> -count-</span> |
||||
</button> |
||||
{{ end }} |
||||
|
||||
{{ if gt ( $.Scratch.Get "nocat") 0 }} |
||||
<button xx class="cat-button" id="cat-no-cat" onclick="htf.checkFilter('no-cat', 'cat-')"> |
||||
No Categories <span id="scat-no-cat"> -count-</span> | <span id="ccat-no-cat"> -count-</span> |
||||
</button> |
||||
{{ end }} |
||||
<div class="filter-container"> |
||||
<div class="filter-information"> |
||||
<div><span id="selectedItemCount"></span> Cards</div> |
||||
<div id="load-more">load more cards</div> |
||||
</div> |
||||
<div class="filter-buttons-container"> |
||||
<div class="filter-buttons"> |
||||
<button class="filter-by"> |
||||
by sections |
||||
</button> |
||||
<div class="filter-buttons-dropdown"> |
||||
{{ range $sections }} |
||||
<button xx class="sect-button filter-button" id="sect-{{ . | urlize }}" onclick="htf.checkFilter('{{ . | urlize }}', 'sect-')"><svg enable-background="new 0 0 14.9 14.9" version="1.1" viewBox="-2 -2 18.9 18.9" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m11.8 1.9c-0.8-1.2-2.1-1.8-3.8-1.6-0.8-0.3-1.6-0.4-2.4-0.1-2.3 0.8-3.9 2.4-5 4.5-1.4 2.6-0.5 6.8 2.4 8.1h0.1c0.2 0.2 0.5 0.3 0.8 0.4 0.4 0.6 0.9 1.1 1.6 1.3 1.9 0.7 4.1 0.1 5.5-1.2 0.9-0.6 1.6-1.4 2-2.4 1-0.9 1.6-2.2 1.8-3.5 0.3-2.2-0.7-4.7-3-5.5z"/></svg> <span class="filter-title">{{ . | title }}</span> <span id="ssect-{{ . | urlize }}"></span> |
||||
</button> |
||||
{{ end }} |
||||
<button xx id="selectAllSections" class="filter-all" onclick="htf.showAll('section')"> |
||||
All Sections |
||||
</button> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="filter-buttons"> |
||||
<button class="filter-by"> |
||||
by contributors |
||||
</button> |
||||
<div class="filter-buttons-dropdown"> |
||||
{{ range .Site.Taxonomies.contributors }} |
||||
<button xx class="cont-button filter-button" id="cont-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}" onclick="htf.checkFilter('{{ .Page.Title | replaceRE "[.]" "_" | urlize }}', 'cont-')"><svg enable-background="new 0 0 14.9 14.9" version="1.1" viewBox="-2 -2 18.9 18.9" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m11.8 1.9c-0.8-1.2-2.1-1.8-3.8-1.6-0.8-0.3-1.6-0.4-2.4-0.1-2.3 0.8-3.9 2.4-5 4.5-1.4 2.6-0.5 6.8 2.4 8.1h0.1c0.2 0.2 0.5 0.3 0.8 0.4 0.4 0.6 0.9 1.1 1.6 1.3 1.9 0.7 4.1 0.1 5.5-1.2 0.9-0.6 1.6-1.4 2-2.4 1-0.9 1.6-2.2 1.8-3.5 0.3-2.2-0.7-4.7-3-5.5z"/></svg> <span class="filter-title">{{ .Page.Title }}</span> <span id="scont-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}"></span> |
||||
</button> |
||||
{{ end }} |
||||
|
||||
<button xx class="cont-button filter-button" id="cont-no-contributor" onclick="htf.checkFilter('no-contributor', 'cont-')"><svg enable-background="new 0 0 14.9 14.9" version="1.1" viewBox="-2 -2 18.9 18.9" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m11.8 1.9c-0.8-1.2-2.1-1.8-3.8-1.6-0.8-0.3-1.6-0.4-2.4-0.1-2.3 0.8-3.9 2.4-5 4.5-1.4 2.6-0.5 6.8 2.4 8.1h0.1c0.2 0.2 0.5 0.3 0.8 0.4 0.4 0.6 0.9 1.1 1.6 1.3 1.9 0.7 4.1 0.1 5.5-1.2 0.9-0.6 1.6-1.4 2-2.4 1-0.9 1.6-2.2 1.8-3.5 0.3-2.2-0.7-4.7-3-5.5z"/></svg> <span class="filter-title">No contributors</span><span id="scont-no-contributor"></span> |
||||
</button> |
||||
<button xx id="selectAllContributors" class="filter-all" onclick="htf.showAll('contributors')"> |
||||
All contributors |
||||
</button> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="filter-buttons"> |
||||
<button class="filter-by"> |
||||
by sources |
||||
</button> |
||||
<div class="filter-buttons-dropdown"> |
||||
{{ range .Site.Taxonomies.sources }} |
||||
<button xx class="src-button filter-button" id="src-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}" onclick="htf.checkFilter('{{ .Page.Title | replaceRE "[.]" "_" | urlize }}', 'src-')"><svg enable-background="new 0 0 14.9 14.9" version="1.1" viewBox="-2 -2 18.9 18.9" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m11.8 1.9c-0.8-1.2-2.1-1.8-3.8-1.6-0.8-0.3-1.6-0.4-2.4-0.1-2.3 0.8-3.9 2.4-5 4.5-1.4 2.6-0.5 6.8 2.4 8.1h0.1c0.2 0.2 0.5 0.3 0.8 0.4 0.4 0.6 0.9 1.1 1.6 1.3 1.9 0.7 4.1 0.1 5.5-1.2 0.9-0.6 1.6-1.4 2-2.4 1-0.9 1.6-2.2 1.8-3.5 0.3-2.2-0.7-4.7-3-5.5z"/></svg> <span class="filter-title">{{ .Page.Title }}</span> <span id="ssrc-{{ .Page.Title | replaceRE "[.]" "_" | urlize }}"></span> |
||||
</button> |
||||
{{ end }} |
||||
<button xx class="src-button filter-button" id="src-no-sources" onclick="htf.checkFilter('no-sources', 'src-')"><svg enable-background="new 0 0 14.9 14.9" version="1.1" viewBox="-2 -2 18.9 18.9" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m11.8 1.9c-0.8-1.2-2.1-1.8-3.8-1.6-0.8-0.3-1.6-0.4-2.4-0.1-2.3 0.8-3.9 2.4-5 4.5-1.4 2.6-0.5 6.8 2.4 8.1h0.1c0.2 0.2 0.5 0.3 0.8 0.4 0.4 0.6 0.9 1.1 1.6 1.3 1.9 0.7 4.1 0.1 5.5-1.2 0.9-0.6 1.6-1.4 2-2.4 1-0.9 1.6-2.2 1.8-3.5 0.3-2.2-0.7-4.7-3-5.5z"/></svg> <span class="filter-title">No sources</span> <span id="ssrc-no-sources"></span> |
||||
</button> |
||||
<button xx id="selectAllSources" class="filter-all" onclick="htf.showAll('sources')"> |
||||
All sources |
||||
</button> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="filter-buttons"> |
||||
<button class="filter-by"> |
||||
by tags |
||||
</button> |
||||
<div class="filter-buttons-dropdown"> |
||||
{{ range $tags }} |
||||
{{ if .Term }} |
||||
<button xx class="tag-button filter-button" id="tag-{{ .Term | replaceRE "[.]" "_" | urlize }}" onclick="htf.checkFilter('{{ .Term | replaceRE "[.]" "_" | urlize }}', 'tag-')"><svg enable-background="new 0 0 14.9 14.9" version="1.1" viewBox="-2 -2 18.9 18.9" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m11.8 1.9c-0.8-1.2-2.1-1.8-3.8-1.6-0.8-0.3-1.6-0.4-2.4-0.1-2.3 0.8-3.9 2.4-5 4.5-1.4 2.6-0.5 6.8 2.4 8.1h0.1c0.2 0.2 0.5 0.3 0.8 0.4 0.4 0.6 0.9 1.1 1.6 1.3 1.9 0.7 4.1 0.1 5.5-1.2 0.9-0.6 1.6-1.4 2-2.4 1-0.9 1.6-2.2 1.8-3.5 0.3-2.2-0.7-4.7-3-5.5z"/></svg> <span class="filter-title">{{.Term | humanize | title }}</span> |
||||
<span id="stags-{{ .Term | urlize }}"></span> |
||||
</button> |
||||
{{ end }} |
||||
{{ end }} |
||||
<button xx class="tag-button filter-button" id="tag-tfuntagged" onclick="htf.checkFilter('tfuntagged', 'tag-')"><svg enable-background="new 0 0 14.9 14.9" version="1.1" viewBox="-2 -2 18.9 18.9" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m11.8 1.9c-0.8-1.2-2.1-1.8-3.8-1.6-0.8-0.3-1.6-0.4-2.4-0.1-2.3 0.8-3.9 2.4-5 4.5-1.4 2.6-0.5 6.8 2.4 8.1h0.1c0.2 0.2 0.5 0.3 0.8 0.4 0.4 0.6 0.9 1.1 1.6 1.3 1.9 0.7 4.1 0.1 5.5-1.2 0.9-0.6 1.6-1.4 2-2.4 1-0.9 1.6-2.2 1.8-3.5 0.3-2.2-0.7-4.7-3-5.5z"/></svg> <span class="filter-title">Untagged</span> <span id="stags-tfuntagged"></span> |
||||
</button> |
||||
<button xx id="selectAllTags" class="filter-all" onclick="htf.showAll('tags')"> |
||||
All Tags |
||||
</button> |
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
<div class="filter-buttons"> |
||||
<button xx class="" id="selectAllTags" onclick="htf.showAll('tags')"> |
||||
All Tags |
||||
</button> |
||||
{{ range $tags }} |
||||
{{ if .Term }} |
||||
<button xx class="tag-button filter-button" id="tag-{{ .Term | replaceRE "[.]" "_" | urlize }}" onclick="htf.checkFilter('{{ .Term | replaceRE "[.]" "_" | urlize }}', 'tag-')"> |
||||
<span>{{.Term | humanize | title }}</span> |
||||
<span id="stags-{{ .Term | urlize }}"> -count-</span> | <span id="ctags-{{ .Term | urlize }}"> -count-</span> |
||||
</button> |
||||
{{ end }} |
||||
{{ end }} |
||||
{{ if gt ( $.Scratch.Get "untagged") 0 }} |
||||
<button xx class="tag-button" id="tag-tfuntagged" onclick="htf.checkFilter('tfuntagged', 'tag-')"> |
||||
Untagged <span id="stags-tfuntagged"> -count-</span> | <span id="ctags-tfuntagged"> -count-</span> |
||||
</button> |
||||
{{ end }} |
||||
</div> |
||||
</div> |
@ -1,48 +1,48 @@ |
||||
<div class='shout card {{ .Params.feed_name }}'> |
||||
<article class="h-entry shout"> |
||||
<header> |
||||
{{ $postPermalink := .Permalink}} |
||||
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time> |
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2> |
||||
</header> |
||||
|
||||
<div class="shout-source"><span class="from p-author">From {{ if .Params.contributors }}<b>{{range .Params.contributors}} <a href='{{ "/contributors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> at {{ end }}<a href="{{ "/sources/" | relLangURL }}{{ .Params.feed_name | urlize }}">{{ .Params.feed_name }}</a></span></div> |
||||
<div class='shout card {{ .Params.feed_name }} filter-item' data-section="{{ .Section }}" data-sources='{{- partial "data/sources.html" . -}}' data-contributors='{{- partial "data/contributors.html" . -}}' data-tags='{{- partial "data/tags.html" . -}}'> |
||||
<article class="h-entry shout"> |
||||
<header> |
||||
{{ $postPermalink := .Permalink}} |
||||
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time> |
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2> |
||||
</header> |
||||
|
||||
<div class="shout-source"><span class="from p-author">From {{ if .Params.contributors }}<b>{{range .Params.contributors}} <a href='{{ "/contributors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> at {{ end }}<a href="{{ "/sources/" | relLangURL }}{{ .Params.feed_name | urlize }}">{{ .Params.feed_name }}</a></span></div> |
||||
|
||||
{{ 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"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{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"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{ end }} |
||||
{{ else }} |
||||
<div class="p-summary"> |
||||
{{ end }} |
||||
<div class="summary-text"> |
||||
{{ .Summary }} |
||||
</div> |
||||
</div> |
||||
|
||||
<footer class='post-footer'> |
||||
<a href="{{ .RelPermalink }}"> |
||||
<svg width="11" height="11" viewBox="0 0 11 11" xmlns="http://www.w3.org/2000/svg"> |
||||
<path d="M10.2172 3.892C9.86979 3.02585 9.33722 2.34509 8.61023 1.77874C8.23826 1.49028 7.72957 1.04191 7.21547 0.839212C7.21382 0.703503 7.14487 0.575079 6.97767 0.503871C5.42624 -0.162284 3.69503 0.311299 2.52647 1.51482C1.94635 2.11223 1.51951 2.8478 1.21108 3.62501C0.914861 4.3676 0.507572 5.32483 0.948415 6.07996C1.00646 6.17836 1.09356 6.24193 1.1908 6.27306C1.2735 7.35573 1.57765 8.46801 2.37847 9.21874C3.2325 10.0162 4.43613 10.3053 5.5673 10.1773C6.72371 10.0468 7.96432 9.57061 8.8816 8.82474C9.01086 8.71974 9.1274 8.60844 9.23337 8.49296C9.27968 8.4924 9.32805 8.4875 9.37839 8.4718C11.3643 7.82491 10.8101 5.37347 10.2172 3.892Z" /> |
||||
</svg> |
||||
</a> |
||||
</footer> |
||||
</article> |
||||
{{ 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"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{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"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{ end }} |
||||
{{ else }} |
||||
<div class="p-summary"> |
||||
{{ end }} |
||||
<div class="summary-text"> |
||||
{{ .Summary }} |
||||
</div> |
||||
</div> |
||||
|
||||
<footer class='post-footer'> |
||||
<a href="{{ .RelPermalink }}"> |
||||
<svg width="11" height="11" viewBox="0 0 11 11" xmlns="http://www.w3.org/2000/svg"> |
||||
<path d="M10.2172 3.892C9.86979 3.02585 9.33722 2.34509 8.61023 1.77874C8.23826 1.49028 7.72957 1.04191 7.21547 0.839212C7.21382 0.703503 7.14487 0.575079 6.97767 0.503871C5.42624 -0.162284 3.69503 0.311299 2.52647 1.51482C1.94635 2.11223 1.51951 2.8478 1.21108 3.62501C0.914861 4.3676 0.507572 5.32483 0.948415 6.07996C1.00646 6.17836 1.09356 6.24193 1.1908 6.27306C1.2735 7.35573 1.57765 8.46801 2.37847 9.21874C3.2325 10.0162 4.43613 10.3053 5.5673 10.1773C6.72371 10.0468 7.96432 9.57061 8.8816 8.82474C9.01086 8.71974 9.1274 8.60844 9.23337 8.49296C9.27968 8.4924 9.32805 8.4875 9.37839 8.4718C11.3643 7.82491 10.8101 5.37347 10.2172 3.892Z" /> |
||||
</svg> |
||||
</a> |
||||
</footer> |
||||
</article> |
||||
</div> |
||||
|
@ -1,49 +1,49 @@ |
||||
<div class='social card {{ range .Params.tags }}{{ if or (eq . "lumbungkios") (eq . "lumbunggallery")}}{{.}}{{ end }}{{ end }}'> |
||||
<article class="h-entry social"> |
||||
<header> |
||||
{{ $postPermalink := .Permalink}} |
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url"> |
||||
{{ range $i, $e := .Params.tags -}} |
||||
{{- if $i -}} {{ end -}} |
||||
<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}'>#{{ $e | humanize | lower }}</a> |
||||
{{- end -}} |
||||
</a></h2> |
||||
</header> |
||||
<div class='social card {{ range .Params.tags }}{{ if or (eq . "lumbungkios") (eq . "lumbungkiosproducts")}}lumbungkios{{else if (eq . "lumbunggallery")}}{{.}}{{ end }}{{ end }} filter-item' data-section="{{ .Section }}" data-sources='{{- partial "data/sources.html" . -}}' data-contributors='{{- partial "data/contributors.html" . -}}' data-tags='{{- partial "data/tags.html" . -}}'> |
||||
<article class="h-entry social"> |
||||
<header> |
||||
{{ $postPermalink := .Permalink}} |
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url"> |
||||
{{ range $i, $e := .Params.tags -}} |
||||
{{- if $i -}} {{ end -}} |
||||
<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}'>#{{ $e | humanize | lower }}</a> |
||||
{{- end -}} |
||||
</a></h2> |
||||
</header> |
||||
|
||||
{{ with (index (.Resources.ByType "video") 0) }} |
||||
{{/* TODO this current logic does not suport video & image mixed */}} |
||||
<div class="p-summary"> |
||||
<video controls width="540px" preload="none" poster="{{ $postPermalink }}/thumbnail.png"> |
||||
<source src="{{.Permalink}}" type="video/mp4"> |
||||
</video> |
||||
{{ else}} |
||||
{{ with (index (.Resources.ByType "image") 0) }} |
||||
{{ $height := add .Height 0.0}} |
||||
{{ $ratio := div $height .Width}} |
||||
{{ $thumb := .Fit "540x540 q80 webp"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{ else }} |
||||
<div class="p-summary"> |
||||
{{ end }} |
||||
{{ end }} |
||||
<div class="summary-text"> |
||||
{{ .Summary }} |
||||
</div> |
||||
</div> |
||||
<div class="social-source"></div> |
||||
|
||||
<footer class='post-footer'> |
||||
<div class='footer-metadata'> |
||||
<span class="from p-author">{{ if .Params.contributors }}From {{range .Params.contributors}}<b> <a href='{{ "/contributors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> on{{ end }}</span> |
||||
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time> |
||||
</div> |
||||
{{ if .Truncated }} |
||||
<div class="footer-filler"></div> |
||||
<div class='read-more'><a href="{{ .RelPermalink }}">Read Moreโฆ</a></div> |
||||
{{ end }} |
||||
</footer> |
||||
</article> |
||||
{{ with (index (.Resources.ByType "video") 0) }} |
||||
{{/* TODO this current logic does not suport video & image mixed */}} |
||||
<div class="p-summary"> |
||||
<video controls width="540px" preload="none" poster="{{ $postPermalink }}/thumbnail.png"> |
||||
<source src="{{.Permalink}}" type="video/mp4"> |
||||
</video> |
||||
{{ else}} |
||||
{{ with (index (.Resources.ByType "image") 0) }} |
||||
{{ $height := add .Height 0.0}} |
||||
{{ $ratio := div $height .Width}} |
||||
{{ $thumb := .Fit "540x540 q80 webp"}} |
||||
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}"> |
||||
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a> |
||||
</div> |
||||
{{ else }} |
||||
<div class="p-summary"> |
||||
{{ end }} |
||||
{{ end }} |
||||
<div class="summary-text"> |
||||
{{ .Summary }} |
||||
</div> |
||||
</div> |
||||
<div class="social-source"></div> |
||||
|
||||
<footer class='post-footer'> |
||||
<div class='footer-metadata'> |
||||
<span class="from p-author">{{ if .Params.contributors }}From {{range .Params.contributors}}<b> <a href='{{ "/contributors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> on{{ end }}</span> |
||||
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time> |
||||
</div> |
||||
{{ if .Truncated }} |
||||
<div class="footer-filler"></div> |
||||
<div class='read-more'><a href="{{ .RelPermalink }}">Read Moreโฆ</a></div> |
||||
{{ end }} |
||||
</footer> |
||||
</article> |
||||
</div> |