Merge pull request 'front page redesign & post filtering' (#63) from r/lumbung.space:main into main
Reviewed-on: #63
This commit is contained in:
parent
b196fc363b
commit
9d4cf8d394
@ -5,6 +5,7 @@ theme = "lumbung-theme"
|
||||
pluralizeListTitles = "false"
|
||||
paginate = 20
|
||||
|
||||
|
||||
[params]
|
||||
logo = "/img/logo.svg"
|
||||
favicon = "/img/favicon.ico"
|
||||
@ -25,5 +26,8 @@ paginate = 20
|
||||
source = "sources"
|
||||
timeline = "timelines"
|
||||
|
||||
|
||||
[permalinks]
|
||||
timelines = "/timeline/:slug/"
|
||||
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
{{- partial "news-ticker.html" . -}}
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
|
||||
<script src="{{ "js/hugotagsfilter-1.2.2.min.js" | relURL}}"></script>
|
||||
<script>
|
||||
function toggleDescription(id) {
|
||||
document.querySelector(id).classList.toggle("collapsed");
|
||||
@ -33,29 +35,84 @@
|
||||
if (document.querySelector('[aria-label="Previous"]')) {
|
||||
document.querySelector('[aria-label="Previous"]').parentElement.classList.add('previous-page-link')
|
||||
}
|
||||
// for toggling submenus in mobile navigation drawer
|
||||
let submenuLinks = document.querySelectorAll('.drawer .has-submenu');
|
||||
[...submenuLinks].forEach(submenuLink => {
|
||||
submenuLink.addEventListener('click', function() {
|
||||
submenuLink.querySelector('.submenu').classList.toggle('opened')
|
||||
})
|
||||
})
|
||||
|
||||
// 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");
|
||||
var rand = Math.floor(Math.random() * color.length);
|
||||
footer.classList.add(color[rand]);
|
||||
|
||||
// mobile menu
|
||||
document.getElementById("menu-button").onclick=function(){
|
||||
this.classList.toggle("active");
|
||||
document.getElementById("menu").classList.toggle("active");
|
||||
}
|
||||
|
||||
// mobile menu - submenu
|
||||
submenuLinks = document.querySelectorAll(".has-submenu");
|
||||
[...submenuLinks].forEach((t=>{
|
||||
t.addEventListener("click",(function(){t.querySelector(".submenu").classList.toggle("active")}))
|
||||
}));
|
||||
|
||||
// mobile mainfilter
|
||||
document.getElementById("filter-link").onclick=function(){document.getElementById("filter").classList.toggle("active")};
|
||||
|
||||
// mobile filter
|
||||
filterButtons=document.querySelectorAll(".filter-buttons");
|
||||
[...filterButtons].forEach((t=>{
|
||||
t.addEventListener("click",(function(){t.querySelector(".filter-buttons-dropdown").classList.toggle("active");
|
||||
t.querySelector(".filter-by").classList.toggle("active")}))
|
||||
}));
|
||||
|
||||
// load more cards
|
||||
document.getElementById("load-more").onclick=function(){
|
||||
document.getElementById('load-more-paginator').click();
|
||||
}
|
||||
|
||||
// filter config
|
||||
var htfConfig = {
|
||||
filters: [
|
||||
{
|
||||
name: 'tags',
|
||||
prefix: 'tag-',
|
||||
buttonClass: 'tag-button',
|
||||
allSelector: '#selectAllTags',
|
||||
attrName: 'data-tags',
|
||||
selectedPrefix: 'stags-',
|
||||
},
|
||||
{
|
||||
name: 'section',
|
||||
prefix: 'sect-',
|
||||
buttonClass: 'sect-button',
|
||||
allSelector: '#selectAllSections',
|
||||
attrName: 'data-section',
|
||||
selectedPrefix: 'ssect-',
|
||||
},
|
||||
{
|
||||
name: 'contributors',
|
||||
prefix: 'cont-',
|
||||
buttonClass: 'cont-button',
|
||||
allSelector: '#selectAllContributors',
|
||||
attrName: 'data-contributors',
|
||||
selectedPrefix: 'scont-',
|
||||
},
|
||||
{
|
||||
name: 'sources',
|
||||
prefix: 'src-',
|
||||
buttonClass: 'src-button',
|
||||
allSelector: '#selectAllSources',
|
||||
attrName: 'data-sources',
|
||||
selectedPrefix: 'ssrc-',
|
||||
}
|
||||
],
|
||||
showItemClass: "show-item",
|
||||
filterItemClass: "filter-item",
|
||||
activeButtonClass: "active",
|
||||
counterSelector: "selectedItemCount",
|
||||
populateCount: true,
|
||||
setDisabledButtonClass: "disable-button"
|
||||
}
|
||||
var htf = new HugoTagsFilter(htfConfig);
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
@ -2,47 +2,47 @@
|
||||
<main>
|
||||
<section class='entries'>
|
||||
<div class="h-feed">
|
||||
{{ 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) }}
|
||||
|
||||
<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 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 "partials/pen_card.html" . -}}
|
||||
{{ else }}
|
||||
|
||||
{{- partial "card.html" . -}}
|
||||
|
||||
{{- 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 }}
|
39
themes/lumbung-theme/layouts/events/list.html
Normal file
39
themes/lumbung-theme/layouts/events/list.html
Normal file
@ -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,32 +1,50 @@
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
<section class='entries'>
|
||||
<div class="h-feed">
|
||||
{{ range (.Paginate (.Site.RegularPages.GroupByDate "January 2006") 20 ).PageGroups }}
|
||||
|
||||
<span class="date-marker">{{ .Key }}</span>
|
||||
{{ range .Pages }}
|
||||
{{ if in .Params.categories "tv"}}
|
||||
<div class="h-feed">
|
||||
{{ $range := .Site.RegularPages }}
|
||||
{{ $paginator := .Paginate $range }}
|
||||
{{ $pageSize := $paginator.PageSize }}
|
||||
{{ $totalPostsToShow := mul $paginator.PageNumber $pageSize }}
|
||||
{{ range $index, $el := (first $totalPostsToShow .Site.RegularPages) }}
|
||||
|
||||
<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 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 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 }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<nav class="pagination-container">
|
||||
{{ 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>
|
||||
|
||||
<div class="lumbung-radio-player" onclick="window.open('https://lumbungradio.stationofcommons.org', 'Lumbung Radio', 'height=800,width=450')">
|
||||
<svg class="lumbung-radio-play-button" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7 4V20L20 12L7 4Z" fill="#CA14D4" stroke="#CA14D4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
@ -34,5 +52,8 @@
|
||||
<span>lumbung radio</span>
|
||||
<img src="/img/lumbung-radio-logo.png" alt="" height="30">
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</main>
|
||||
|
||||
{{ end }}
|
262
themes/lumbung-theme/layouts/page/filter.html
Normal file
262
themes/lumbung-theme/layouts/page/filter.html
Normal file
@ -0,0 +1,262 @@
|
||||
<!DOCTYPE html>
|
||||
<html{{ with .Site.LanguageCode }} lang="{{ . }}"{{ end }}>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="{{ "css/chroma.css" | relURL }}" />
|
||||
|
||||
<link rel="stylesheet" href="{{ "vendor/bare/css/bare.min.css" | relURL }}" />
|
||||
<style>
|
||||
/*** Important ***/
|
||||
.tf-filter-item {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button.active {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
button.disable-button {
|
||||
border-style: dashed;
|
||||
}
|
||||
|
||||
.show-item {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/*** Aesthetics ***/
|
||||
section {
|
||||
margin-top: 18px !important;
|
||||
}
|
||||
.tf-items-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.tf-item {
|
||||
width: 250px;
|
||||
margin: 8px;
|
||||
background: #fff;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .2);
|
||||
border-radius: 2px;
|
||||
margin-bottom: 2rem
|
||||
}
|
||||
|
||||
.chroma {
|
||||
overflow-x: auto;
|
||||
padding: 4px;
|
||||
|
||||
}
|
||||
|
||||
.panel {
|
||||
padding: 0 18px;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.2s ease-out;
|
||||
}
|
||||
|
||||
.acc:after {
|
||||
content: '\02795';
|
||||
color: #fff;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.acc.active:after {
|
||||
content: "\2796";
|
||||
}
|
||||
|
||||
.navbtn {
|
||||
padding: 0.5rem!important;
|
||||
font-size: 90%!important;
|
||||
|
||||
}
|
||||
.nava {
|
||||
text-transform: none;
|
||||
font-size: 90%!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
|
||||
{{ $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 }}
|
||||
|
||||
|
||||
<div class="tf-wrapper">
|
||||
<div class="tf-buttons-container flex-grow">
|
||||
<h4>Sections</h4>
|
||||
<button xx id="selectAllSections" onclick="htf.showAll('section')">
|
||||
All Sections
|
||||
</button>
|
||||
{{ range $sections }}
|
||||
<button xx class="sect-button" id="sect-{{ . | urlize }}" onclick="htf.checkFilter('{{ . | urlize }}', 'sect-')">
|
||||
{{ . | title }} <span id="ssect-{{ . | urlize }}"> -count-</span> | <span id="csect-{{ . | urlize }}"> -count-</span>
|
||||
</button>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
<h4>Authors</h4>
|
||||
<button xx id="selectAllAuthors" onclick="htf.showAll('authors')">
|
||||
All Authors
|
||||
</button>
|
||||
{{ range $.Scratch.Get "authors" }}
|
||||
<button xx class="auth-button" id="auth-{{ . | replaceRE "[.]" "_" | urlize }}" onclick="htf.checkFilter('{{ . | replaceRE "[.]" "_" | urlize }}', 'auth-')">
|
||||
{{ . }} <span id="sauth-{{ . | replaceRE "[.]" "_" | urlize }}"> -count-</span> | <span id="cauth-{{ . | 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 }}
|
||||
|
||||
|
||||
|
||||
<h4>Tags</h4>
|
||||
<button xx class="" id="selectAllTags" onclick="htf.showAll('tags')">
|
||||
All Tags
|
||||
</button>
|
||||
{{ range $tags }}
|
||||
{{ if .Term }}
|
||||
<button xx class="tag-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 }}
|
||||
|
||||
|
||||
<hr >
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<hr >
|
||||
<div><h2><span id="selectedItemCount"></span> Items</h2></div>
|
||||
<div class="tf-items-container">
|
||||
{{ 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 }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="{{ "vendor/htf/hugotagsfilter-1.2.2.min.js" | relURL}}"></script>
|
||||
<!--<script src="{{ "hugotagsfilter.js" | relURL}}"></script>-->
|
||||
<script>
|
||||
var htfConfig = {
|
||||
filters: [
|
||||
{
|
||||
name: 'tags',
|
||||
prefix: 'tag-',
|
||||
buttonClass: 'tag-button',
|
||||
allSelector: '#selectAllTags',
|
||||
attrName: 'data-tags',
|
||||
selectedPrefix: 'stags-',
|
||||
countPrefix: 'ctags-'
|
||||
},
|
||||
{
|
||||
name: 'section',
|
||||
prefix: 'sect-',
|
||||
buttonClass: 'sect-button',
|
||||
allSelector: '#selectAllSections',
|
||||
attrName: 'data-section',
|
||||
selectedPrefix: 'ssect-',
|
||||
countPrefix: 'csect-'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'authors',
|
||||
prefix: 'auth-',
|
||||
buttonClass: 'auth-button',
|
||||
allSelector: '#selectAllAuthors',
|
||||
attrName: 'data-authors',
|
||||
selectedPrefix: 'sauth-',
|
||||
countPrefix: 'cauth-'
|
||||
|
||||
}
|
||||
],
|
||||
showItemClass: "show-item",
|
||||
filterItemClass: "filter-item",
|
||||
activeButtonClass: "active",
|
||||
counterSelector: "selectedItemCount",
|
||||
populateCount: true,
|
||||
setDisabledButtonClass: "disable-button"
|
||||
}
|
||||
var htf = new HugoTagsFilter(htfConfig);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function toggleAcc(el) {
|
||||
el.classList.toggle("active")
|
||||
var panel = el.nextElementSibling;
|
||||
if (panel.style.maxHeight){
|
||||
panel.style.maxHeight = null;
|
||||
} else {
|
||||
panel.style.maxHeight = panel.scrollHeight + "px";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
39
themes/lumbung-theme/layouts/partials/book_card.html
Normal file
39
themes/lumbung-theme/layouts/partials/book_card.html
Normal file
@ -0,0 +1,39 @@
|
||||
<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>
|
||||
</div>
|
@ -1,5 +1,5 @@
|
||||
{{ $t := (time .Params.event_end) }}
|
||||
<div class='card calendar {{ if $t.Before now }}past{{end}}'>
|
||||
<div class='card calendar {{ if $t.Before now }}past{{end}} filter-item' data-section="{{ .Section }}" data-sources='{{- partial "data/sources.html" . -}}' data-contributors='{{- partial "data/contributors.html" . -}}' data-tags='{{- partial "data/tags.html" . -}}'>
|
||||
<div class='date tape-label'><span> {{ substr .Params.date 0 11}}</span></div>
|
||||
<article class="h-event calendar ">
|
||||
<header>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class='card'>
|
||||
<div class='card 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">
|
||||
<header>
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2>
|
||||
|
1
themes/lumbung-theme/layouts/partials/data/authors.html
Normal file
1
themes/lumbung-theme/layouts/partials/data/authors.html
Normal file
@ -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}}
|
1
themes/lumbung-theme/layouts/partials/data/sources.html
Normal file
1
themes/lumbung-theme/layouts/partials/data/sources.html
Normal file
@ -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}}
|
1
themes/lumbung-theme/layouts/partials/data/tags.html
Normal file
1
themes/lumbung-theme/layouts/partials/data/tags.html
Normal file
@ -0,0 +1 @@
|
||||
{{ with .Params.tags }}{{ range . }}{{ . | replaceRE "[.]" "_" | urlize }} {{ end }}{{ else }} tfuntagged{{ end }}
|
19
themes/lumbung-theme/layouts/partials/event_list_item.html
Normal file
19
themes/lumbung-theme/layouts/partials/event_list_item.html
Normal file
@ -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>
|
91
themes/lumbung-theme/layouts/partials/filter-nav.html
Normal file
91
themes/lumbung-theme/layouts/partials/filter-nav.html
Normal file
@ -0,0 +1,91 @@
|
||||
<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 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>
|
@ -1,7 +1,7 @@
|
||||
<footer id="footer">
|
||||
<div class="f-main">
|
||||
<div class="f-column">
|
||||
<a href="/"><img class="logo" src="/img/logo.svg" alt="lumbung.space"></a>
|
||||
<a href="/"><img class="logo" src="/img/logo-big.svg" alt="lumbung.space"></a>
|
||||
</div>
|
||||
<div class="f-column"><u>lumbung.space</u> 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.</div>
|
||||
<div class="f-column">
|
||||
|
@ -25,4 +25,5 @@
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
</head>
|
||||
|
@ -1,36 +1,26 @@
|
||||
<header id="top-menu">
|
||||
<div class="mobile-menu">
|
||||
<button class="hamburger" onclick="this.classList.toggle('opened'); document.querySelector('.drawer').classList.toggle('opened');">
|
||||
<svg width="30" fill="#3C3D3D" viewBox="0 0 50 40">
|
||||
<g>
|
||||
<path class="top" d="M0 8h50v3H0z"/>
|
||||
<path class="bottom" d="M0 28h50v3H0z"/>
|
||||
<path class="middle" d="M0 18h50v3H0z"/>
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
<a href="https://members.lumbung.space" id="login">login</a>
|
||||
</div>
|
||||
|
||||
<div class="header-row">
|
||||
<a href="/" class="home-link">
|
||||
<img class="logo" src="{{ .Site.Params.Logo }}" alt="{{ .Site.Title }}">
|
||||
<img class="logo" src="/img/logo.svg" alt="{{ .Site.Title }}">
|
||||
</a>
|
||||
|
||||
<nav class="menu">
|
||||
</div>
|
||||
</header>
|
||||
<div class="menu-row">
|
||||
<nav id="menu" class="menu">
|
||||
<a href="#"><img class="menu-dot" src="/img/black-dot.svg" alt="black dot"></a>
|
||||
<ul>
|
||||
<li><a href="/">home</a></li>
|
||||
<li><a href="/timeline/">harvest</a></li>
|
||||
{{/* <li><a href="/about/">about</a></li> */}}
|
||||
<li class="has-submenu">about
|
||||
<ul class="submenu">
|
||||
<li><a href="/about/">about us</a></li>
|
||||
<li><a href="/contributors/">contributors</a></li>
|
||||
<li><a href="/ls-contributors/">contributors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/calendar/">calendar</a></li>
|
||||
<li><a href="/events/">calendar</a></li>
|
||||
<li><a href="/tv/">tv</a></li>
|
||||
<li><a href="/social/">social</a></li>
|
||||
<li><a href="/pen/">pen</a></li>
|
||||
<li><a href="/sources/pen.lumbung.space/">pen</a></li>
|
||||
<li><a href="/shouts/">shouts</a></li>
|
||||
<li class="has-submenu">ekonomi
|
||||
<ul class="submenu">
|
||||
@ -40,30 +30,15 @@
|
||||
</li>
|
||||
<li><a href="https://books.lumbung.space">books</a></li>
|
||||
</ul>
|
||||
<div class="login-menu"><a href="https://members.lumbung.space">login</a></div>
|
||||
</nav>
|
||||
{{- partial "filter-nav.html" . -}}
|
||||
<div class="login"><a href="https://members.lumbung.space">login</a></div>
|
||||
|
||||
<aside class="drawer">
|
||||
<ul>
|
||||
<li><a href="/">home</a></li>
|
||||
<li><a href="/timeline/">harvest</a></li>
|
||||
<li class="has-submenu">about
|
||||
<ul class="submenu">
|
||||
<li><a href="/about/">about us</a></li>
|
||||
<li><a href="/contributors/">contributors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/calendar/">calendar</a></li>
|
||||
<li><a href="/tv/">tv</a></li>
|
||||
<li><a href="/social/">social</a></li>
|
||||
<li><a href="/pen/">pen</a></li>
|
||||
<li><a href="/shouts/">shouts</a></li>
|
||||
<li class="has-submenu">ekonomi
|
||||
<ul class="submenu">
|
||||
<li><a href="/tags/lumbungkiosproducts/">kios</a></li>
|
||||
<li><a href="/tags/lumbunggallery/">gallery</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://books.lumbung.space">books</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
</header>
|
||||
<div class="menu-button" id="menu-button">
|
||||
<div class="menu-button--line"></div>
|
||||
<div class="menu-button--line"></div>
|
||||
<div class="menu-button--line"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1,47 +0,0 @@
|
||||
<div class='network card {{ .Params.feed_name }}'>
|
||||
<article class="h-entry network">
|
||||
<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="network-source"><span class="from p-author">From {{ if .Params.authors }}<b>{{range .Params.authors}} <a href='{{ "/authors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> at {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ .Params.feed_name | urlize }}">{{ .Params.feed_name }}</a></span></div>
|
||||
|
||||
{{ 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"}}
|
||||
<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 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,4 +1,4 @@
|
||||
<div class='pen card {{ .Params.feed_name }}'>
|
||||
<div class='pen 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 pen">
|
||||
<header>
|
||||
<div class="pen-source"><span class="from p-author">From {{ if .Params.author }}<b>{{.Params.author}}</b> at {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ .Params.feed_name | urlize }}">{{ .Params.feed_name }}</a></span></div>
|
||||
|
@ -1,23 +1,26 @@
|
||||
<div class='shout card {{ .Params.feed_name }}'>
|
||||
<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}}
|
||||
<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>
|
||||
<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>
|
||||
|
||||
{{ 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}}
|
||||
<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"}}
|
||||
@ -25,25 +28,21 @@
|
||||
<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 }}
|
||||
{{ end }}
|
||||
<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 }}From {{range .Params.authors}}<b> <a href='{{ "/authors/" | 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 }}
|
||||
<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>
|
||||
</div>
|
||||
|
49
themes/lumbung-theme/layouts/partials/social_card.html
Normal file
49
themes/lumbung-theme/layouts/partials/social_card.html
Normal file
@ -0,0 +1,49 @@
|
||||
<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>
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<div class='video-box'>
|
||||
<div class='video-box filter-item' data-section="{{ .Section }}" data-sources='{{- partial "data/sources.html" . -}}' data-contributors='{{- partial "data/contributors.html" . -}}' data-tags='{{- partial "data/tags.html" . -}}'>
|
||||
<div class='video channel tape-label'><a href='{{ .Params.channel_url }}'> {{ .Params.video_channel }}</a></div>
|
||||
<div class='media' id='media-{{ .Params.uuid }}'>
|
||||
<span class='video-thumbnail' id='thumb-{{ .Params.uuid }}'
|
||||
|
16
themes/lumbung-theme/static/img/black-dot.svg
Normal file
16
themes/lumbung-theme/static/img/black-dot.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Ebene_2_00000008129498585359231740000016507919400411346327_"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 14.9 14.9"
|
||||
style="enable-background:new 0 0 14.9 14.9;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#333333;}
|
||||
</style>
|
||||
<g id="Layer_1">
|
||||
<g>
|
||||
<path class="st0" d="M11.8,1.9C11,0.7,9.7,0.1,8,0.3C7.2,0,6.4-0.1,5.6,0.2C3.3,1,1.7,2.6,0.6,4.7c-1.4,2.6-0.5,6.8,2.4,8.1
|
||||
c0,0,0.1,0,0.1,0c0.2,0.2,0.5,0.3,0.8,0.4c0.4,0.6,0.9,1.1,1.6,1.3c1.9,0.7,4.1,0.1,5.5-1.2c0.9-0.6,1.6-1.4,2-2.4
|
||||
c1-0.9,1.6-2.2,1.8-3.5C15.1,5.2,14.1,2.7,11.8,1.9L11.8,1.9z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 804 B |
21
themes/lumbung-theme/static/img/logo-big.svg
Normal file
21
themes/lumbung-theme/static/img/logo-big.svg
Normal file
@ -0,0 +1,21 @@
|
||||
<svg width="333" height="103" viewBox="0 0 333 103" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M62.0719 1.63379C60.1034 1.63379 58.9314 2.6408 58.9314 4.32484V42.4945C58.9314 46.3519 57.9699 49.2875 56.0753 51.2162C54.1921 53.1392 51.3418 54.1121 47.5982 54.1121C44.4577 54.1121 41.926 53.3782 40.0826 51.9274C37.659 50.0215 36.4358 46.8696 36.4358 42.5514V25.6826C36.4358 23.697 34.7745 22.9915 33.3465 22.9915C30.4506 22.9915 30.1377 24.8747 30.1377 25.6826V42.7107C30.1377 48.1668 31.6681 52.4167 34.6778 55.3524C37.6874 58.2824 42.0511 59.7673 47.6551 59.7673C53.3046 59.7673 57.6911 58.2937 60.695 55.3922C63.699 52.4736 65.2237 48.2123 65.2237 42.7164V4.32484C65.2237 2.61235 64.0745 1.63379 62.0719 1.63379Z" fill="#F04B1E"/>
|
||||
<path d="M329.596 12.7454C329.47 12.5917 329.328 12.5007 329.209 12.4268C329.146 12.3869 329.084 12.3471 329.055 12.3187C329.032 12.2902 328.981 12.1992 328.953 12.1423C328.873 12.0001 328.788 11.8351 328.64 11.7042C328.333 11.4368 327.883 11.1751 327.445 10.9191C327.297 10.8337 327.149 10.7484 327.007 10.6574C325.858 9.96328 324.14 9.17246 322.49 10.3217L322.41 10.3786L322.353 10.4583C321.756 11.323 321.682 12.5007 321.608 13.741C321.579 14.2303 321.545 14.7366 321.483 15.2373C321.426 15.6867 321.375 16.1874 321.323 16.7165C321.204 17.8828 321.073 19.2084 320.863 19.9139C320.828 20.0277 320.618 20.2041 320.453 20.3406C320.259 20.4999 320.06 20.6649 319.907 20.8811C319.81 21.0176 319.742 21.1599 319.679 21.3021C319.628 21.4102 319.582 21.5069 319.537 21.5752C319.4 21.7743 319.247 21.9279 319.082 22.0872C318.928 22.2351 318.775 22.3888 318.638 22.5765C318.382 22.9292 318.291 23.3389 318.206 23.6973C318.16 23.9078 318.115 24.1012 318.041 24.2833C317.944 24.5336 317.677 24.8522 317.506 25.0571C317.341 25.2562 317.159 25.5122 316.988 25.7625C316.834 25.9844 316.675 26.2063 316.578 26.3201C316.51 26.3997 316.391 26.4794 316.271 26.5704C316.072 26.7126 315.845 26.8719 315.668 27.1166C315.549 27.2816 315.48 27.4352 315.424 27.5604C315.372 27.6798 315.338 27.7481 315.293 27.7936C315.162 27.9245 314.968 28.0383 314.764 28.152C314.564 28.2658 314.36 28.3853 314.166 28.5446C314.041 28.6527 313.95 28.7608 313.876 28.8518C313.825 28.9144 313.779 28.9713 313.745 28.9941C313.7 29.0282 313.626 29.0623 313.54 29.1022C313.427 29.1591 313.29 29.2159 313.153 29.3127C312.92 29.472 312.744 29.6711 312.567 29.8645C312.465 29.9783 312.368 30.0921 312.266 30.1774C311.959 30.4505 311.64 30.7009 311.333 30.9455C310.923 31.2698 310.502 31.6055 310.115 31.9866C309.791 32.1346 309.438 32.1858 309.029 32.2427C308.733 32.2825 308.397 32.3337 308.039 32.4247C307.476 32.5726 306.747 32.8742 306.19 33.1928C305.41 33.6422 303.789 34.581 304.506 36.2081C304.921 37.1525 305.951 38.188 306.793 38.5237C307.123 38.6545 307.436 38.7114 307.732 38.7114C308.539 38.7114 309.228 38.3018 309.859 37.9263C310.297 37.6646 310.713 37.4199 311.134 37.3232C312.203 37.0729 313.432 36.7372 314.456 36.1285L314.53 36.083L314.587 36.0204C315.321 35.167 316.169 34.4274 316.988 33.7048C318.183 32.658 319.412 31.5713 320.396 30.0978C320.584 29.9783 320.732 29.8304 320.863 29.6938C321.005 29.5459 321.096 29.4663 321.175 29.4264C321.244 29.6085 321.158 29.8759 320.948 30.3993C320.8 30.7578 320.652 31.1219 320.618 31.5144C320.561 32.1687 320.868 32.8856 321.443 33.4374C321.995 33.9608 322.66 34.2169 323.269 34.1315L323.337 34.1201L323.4 34.0974C324.709 33.5683 324.777 31.9241 324.839 30.4733C324.873 29.6995 324.908 28.8973 325.112 28.3682C325.482 27.9302 325.738 27.3669 325.983 26.8264C326.256 26.2234 326.54 25.5975 326.933 25.3074L327.001 25.2562L327.052 25.1879C327.456 24.636 327.701 23.9021 327.934 23.191C327.968 23.0942 327.997 23.0032 328.031 22.9065C328.611 22.3546 328.975 21.5752 329.334 20.8242C329.533 20.4032 329.721 20.0049 329.926 19.6863L329.965 19.6294L329.988 19.5612C330.876 16.8246 330.722 14.1449 329.596 12.7454Z" fill="#F0D5C0"/>
|
||||
<path d="M301.735 27.9755C301.798 27.8105 301.866 27.6171 301.923 27.4066C302.111 26.7011 302.156 25.9558 302.207 25.2446C302.247 24.6529 302.281 24.1011 302.389 23.6004C302.475 23.1965 302.611 22.7868 302.753 22.3545C303.049 21.4555 303.379 20.4372 303.396 19.1741C303.635 18.736 303.834 18.2525 304.028 17.7859C304.227 17.308 304.415 16.8586 304.631 16.4603C305.291 16.0052 305.814 15.4135 306.315 14.8389C307.254 13.775 308.062 12.8476 309.598 12.9102C309.763 12.9159 309.95 12.9329 310.127 12.95C310.821 13.0183 311.691 13.1036 312.072 12.4209C312.562 11.5504 312.067 10.4467 310.741 9.46814C309.928 8.86507 308.904 8.41562 307.766 8.17098C307.555 8.12546 307.339 8.07426 307.123 8.02306C306.104 7.78979 305.052 7.54515 304.056 7.58498C303.482 7.60773 302.918 7.86944 302.372 8.11977C302.23 8.18805 302.082 8.25063 301.934 8.3189C301.746 8.39855 301.553 8.47251 301.365 8.54647C300.87 8.73991 300.409 8.91628 300.091 9.1723C299.681 9.50228 299.294 10.1167 298.953 10.6686C298.788 10.9303 298.634 11.1806 298.515 11.3342C297.957 12.0511 297.838 12.9102 297.707 13.8205C297.644 14.2586 297.582 14.7137 297.468 15.203C297.394 15.5102 297.314 15.8117 297.235 16.1019C297.024 16.8756 296.802 17.6778 296.774 18.6052C296.757 19.1002 296.785 19.6008 296.814 20.0844C296.854 20.7614 296.888 21.4043 296.808 22.0017C296.785 22.1895 296.711 22.4 296.637 22.6162C296.558 22.8437 296.472 23.0998 296.416 23.3785C296.29 24.0101 296.216 24.835 296.171 25.3926C296.154 25.6088 296.125 25.8306 296.097 26.0525C296.046 26.4849 296 26.8888 296.006 27.2188C296.023 27.8731 296.279 28.4307 296.507 28.9256C296.592 29.1191 296.677 29.2954 296.734 29.4604C296.865 29.8302 296.984 30.1943 297.104 30.5414C297.491 31.702 297.855 32.8001 298.469 33.7559C299.004 34.5922 300.074 36.2592 301.957 36.2592C302.128 36.2592 302.304 36.2478 302.492 36.2136L302.64 36.1909L302.753 36.0942C304.181 34.8937 303.482 33.3348 302.918 32.0832L302.827 31.8841C302.668 31.5256 302.475 31.1957 302.293 30.8771C301.866 30.1431 301.496 29.5059 301.559 28.6582C301.57 28.4307 301.644 28.2201 301.735 27.9755Z" fill="#F0D5C0"/>
|
||||
<path d="M324.708 40.6229C324.89 40.0539 325.118 39.3485 325.01 38.6601C324.97 38.4268 324.686 37.6758 324.441 37.3231C324.1 36.8395 323.343 36.2421 322.888 36.0999C322.359 35.9349 321.79 36.0145 321.289 36.3218C320.64 36.72 320.157 37.4824 320.02 38.3073C319.98 38.5406 319.992 38.7625 320.003 38.9787C320.009 39.1152 320.015 39.2404 320.009 39.3542C319.958 40.1393 319.833 40.9756 319.702 41.8518C319.531 42.9726 319.36 44.1275 319.355 45.2028C319.349 45.8741 319.531 46.4374 319.685 46.938C319.833 47.3989 319.958 47.8028 319.935 48.2409C319.918 48.605 319.833 48.9065 319.736 49.2308C319.645 49.538 319.554 49.8566 319.525 50.2265C319.474 50.858 319.656 51.4553 319.838 52.03C319.969 52.451 320.094 52.8435 320.123 53.2418C320.157 53.6685 320.168 54.1692 320.151 54.7779C320.077 57.5088 319.77 59.6309 319.355 60.3079C318.82 61.1784 318.501 61.7985 318.171 62.6406L318.086 62.7145C317.42 63.2835 316.846 63.7727 316.339 64.4725C315.952 65.0073 315.827 65.525 315.696 66.0712C315.611 66.4353 315.52 66.8165 315.338 67.2489C315.247 67.4708 315.071 67.6187 314.854 67.8065C314.729 67.9146 314.593 68.0283 314.468 68.1706C313.938 68.7395 313.187 69.6157 312.67 70.7251C312.163 71.0551 311.839 71.533 311.52 72.0052C311.327 72.284 311.151 72.5514 310.94 72.7619C310.536 73.1772 309.723 73.5527 309.063 73.8485C308.812 73.9623 308.573 74.0704 308.369 74.1785C308.312 74.2069 308.164 74.2866 308.078 74.3606C306.867 75.4188 306.758 77.5181 307.475 78.6844C307.777 79.1851 308.221 79.5151 308.642 79.8337C308.886 80.0157 309.114 80.1921 309.319 80.3912C309.341 80.4197 309.387 80.5107 309.415 80.5733C309.478 80.7098 309.552 80.8691 309.666 81.0057C309.797 81.1593 309.922 81.2617 310.024 81.3414C310.104 81.4039 310.155 81.4438 310.178 81.4779C310.246 81.5803 310.297 81.7112 310.309 81.8136L310.365 82.2687L310.826 82.2801C311.065 82.2858 311.395 82.3711 311.742 82.4678C312.197 82.593 312.687 82.7239 313.176 82.7239C313.421 82.7239 313.665 82.6897 313.899 82.6044C314.308 82.4565 314.49 82.0867 314.65 81.7624C314.724 81.6088 314.803 81.4551 314.906 81.3015C315.105 81.0171 315.383 80.7155 315.657 80.4254C315.913 80.1523 316.18 79.8678 316.396 79.5777C316.726 79.1282 316.971 78.5763 317.21 78.0415C317.403 77.5978 317.591 77.1768 317.79 76.898C317.91 76.733 318.131 76.5623 318.353 76.3973C318.649 76.1698 318.956 75.9422 319.144 75.6293C319.298 75.3733 319.366 75.0888 319.423 74.8385C319.457 74.6792 319.491 74.5312 319.542 74.4231C319.559 74.3833 319.633 74.2866 319.685 74.2183C319.764 74.1102 319.861 73.9851 319.935 73.8485C320.1 73.5527 320.254 73.1999 320.407 72.8586C320.612 72.4034 320.822 71.9312 321.016 71.6581C321.13 71.5045 321.283 71.3452 321.443 71.1859C321.756 70.8673 322.114 70.5146 322.279 70.0082C322.552 69.1548 322.558 68.364 322.563 67.6016C322.569 66.8051 322.569 66.0485 322.899 65.2975C322.996 65.0756 323.161 64.8765 323.331 64.666C323.525 64.4327 323.724 64.1937 323.855 63.8865C324.168 63.1697 324.39 62.1342 324.515 61.3889C324.748 60.0348 324.657 58.9254 324.572 57.9469C324.509 57.2129 324.452 56.5188 324.526 55.7849C324.566 55.4151 324.617 55.0453 324.668 54.6926C324.771 53.9871 324.873 53.2589 324.862 52.5193C324.851 51.7171 324.72 50.9547 324.594 50.2151C324.418 49.1796 324.259 48.2067 324.395 47.1713L324.401 47.1258V47.0803C324.39 46.847 324.378 46.6024 324.361 46.3406C324.276 44.85 324.162 42.8133 324.566 41.1577C324.589 40.987 324.646 40.8106 324.708 40.6229Z" fill="#F0D5C0"/>
|
||||
<path d="M187.409 66.8901C190.635 67.8232 193.889 67.6241 197.132 66.9982C202.167 66.0254 206.275 63.2831 210.155 60.1142C210.434 59.8866 210.633 59.4883 211.105 59.5566C211.304 60.0573 210.98 60.4669 210.855 60.8879C210.542 61.9347 210.365 62.9816 210.445 64.0739C210.593 66.0595 211.941 67.4306 213.921 67.5842C215.639 67.7208 217.198 67.2656 218.615 66.2985C220.76 64.8363 221.903 62.6801 222.688 60.2962C226.586 48.3885 230.471 36.475 234.369 24.5673C234.824 23.1677 235.182 21.7568 235.029 20.2662C234.841 18.3944 233.652 17.1825 231.774 16.9379C229.601 16.6534 227.667 17.2224 225.914 18.5195C223.695 20.1637 222.649 22.5248 221.801 25.0452C219.417 32.1511 217.358 39.3652 214.644 46.3574C213.591 49.0712 212.288 51.6314 210.024 53.5714C207.054 56.1146 203.76 57.9295 199.721 57.8498C196.165 57.7815 194.361 55.8472 194.424 52.2857C194.458 50.3854 194.805 48.525 195.38 46.7272C197.735 39.3709 200.13 32.026 202.503 24.6754C202.941 23.3213 203.362 21.9559 203.288 20.5051C203.197 18.6333 202.07 17.3191 200.25 16.9493C198.042 16.4998 196.057 17.0289 194.236 18.3033C191.995 19.8679 190.959 22.2176 190.146 24.6981C187.995 31.275 185.822 37.8405 183.717 44.4287C182.454 48.3771 180.974 52.2629 180.514 56.4389C179.95 61.4625 182.533 65.4849 187.409 66.8901Z" fill="#C2C2FF"/>
|
||||
<path d="M111.916 26.2914C111.927 27.5317 112.178 28.7776 111.706 30.0065C111.45 42.4718 111.222 54.9371 110.903 67.4024C110.869 68.7622 111.011 69.2913 112.559 69.2344C116.331 69.1036 120.114 69.1149 123.886 69.2287C125.314 69.2742 125.548 68.785 125.508 67.5049C125.337 62.265 125.189 57.0194 125.178 51.7796C125.144 36.8736 125.047 21.9618 125.451 7.05582C125.491 5.61642 125.121 5.22386 123.67 5.25799C118.868 5.35471 114.067 5.32057 109.27 5.27506C108.303 5.26368 107.763 5.42867 107.592 6.50395C106.141 15.6581 103.268 24.5163 101.914 33.6875C101.544 36.1795 101.106 38.6657 100.691 41.1974C100.139 40.9471 100.23 40.5204 100.19 40.1734C98.859 28.789 95.8096 17.7461 93.6305 6.52671C93.4769 5.74158 93.2664 5.27506 92.3163 5.28075C86.553 5.31488 80.7954 5.3092 75.0322 5.29213C74.2812 5.29213 74.1219 5.51401 74.1446 6.29345C74.2641 9.74687 74.321 13.2003 74.3153 16.6537C74.2869 33.7387 74.2527 50.8295 74.1503 67.9145C74.1446 68.9499 74.2925 69.2287 75.3052 69.2173C78.7587 69.1718 82.2178 69.1548 85.6769 69.2287C86.8375 69.2515 87.0821 68.8134 87.0139 67.7836C86.8773 65.7412 86.7863 63.6987 86.7465 61.6562C86.5473 51.7454 86.7977 41.8233 86.2401 31.9125C85.8305 30.0122 85.8931 28.0892 85.9443 25.7851C86.4848 26.5816 86.809 27.0538 86.6042 27.7251C88.7491 41.4307 92.5268 54.7665 95.599 68.2672C95.7811 69.0523 96.2192 69.3425 96.9588 69.206C98.7623 68.8646 100.719 69.957 102.398 68.6143C102.512 68.5232 102.472 68.2502 102.512 68.0624C105.572 54.7608 109.225 41.59 111.319 28.0722C111.199 27.4008 111.376 26.8205 111.916 26.2914Z" fill="#C2E4F2"/>
|
||||
<path d="M21.3406 71.9197L3.12338 66.9416C1.79208 66.5832 0.460779 66.219 0.142177 65.5193C-0.244696 64.6943 0.244585 63.3004 0.580255 62.0715L17.2443 1.05355C17.6084 -0.277749 18.1375 -0.340332 22.4102 0.825979C27.2518 2.15159 27.7866 2.40192 27.3713 3.92097L13.2162 55.7336C12.8806 56.9625 12.3458 58.5498 12.8806 59.2098C13.2788 59.6251 14.3882 60.0234 15.3384 60.2908L23.787 62.5949C25.0159 62.9306 24.9818 63.4313 23.8951 67.4252C22.6491 71.971 22.4785 72.2327 21.3406 71.9197Z" fill="#BCE1D1"/>
|
||||
<path d="M270.928 5.61072C263.793 5.61072 256.426 8.58054 252.739 15.1233L251.669 7.15821H239.187V68.9784H254.048V43.7747C254.048 38.5405 253.928 32.123 256.067 27.2472C258.087 22.7299 261.535 19.4016 266.769 19.4016C274.614 19.4016 276.993 23.7995 276.993 31.0534V68.9784H291.853V27.7251C291.853 14.8843 284.121 5.61072 270.928 5.61072Z" fill="#007F76"/>
|
||||
<path d="M163.035 39.3596C164.463 39.7295 165.208 40.4748 165.947 41.1632C166.687 41.9028 167.375 42.9667 167.751 43.7063C168.121 44.7645 168.121 45.8796 168.121 46.9947C168.121 47.7343 168.121 48.7982 167.751 49.9076C167.381 50.6473 166.693 51.7112 165.947 52.4508C165.208 53.1904 164.519 53.8788 163.035 54.2543C162.295 54.6241 160.861 54.9939 159.376 54.9939H143.054V38.6712H159.376C160.861 38.6143 162.346 38.6143 163.035 39.3596ZM143.111 17.5809H157.63C160.173 17.5809 161.976 17.9507 163.086 19.3844C164.514 20.4995 164.889 22.2974 164.889 24.1009C164.889 25.9044 164.519 27.3893 163.086 28.8173C162.028 30.2454 160.173 30.6208 157.63 30.6208H143.111V17.5809ZM164.15 10.6912C162.346 9.95155 159.803 9.57605 157.26 9.57605H138.764C137.336 9.57605 136.591 9.94586 135.475 10.6912C134.736 11.4308 134.417 12.4947 134.417 13.9796V58.6009C134.417 59.716 134.787 60.7743 135.475 61.5139C136.591 62.5721 137.279 62.9419 138.764 62.9419H158.745C161.288 62.9419 163.831 62.5721 166.374 61.8837C168.547 61.1441 170.351 59.7103 171.83 58.5952C173.634 57.537 174.743 55.6823 175.488 53.8788C176.547 52.0753 176.916 50.2775 176.916 47.7343C176.916 44.8214 175.858 41.9028 174.373 39.3596C172.57 36.8165 170.396 35.013 167.114 34.2734C169.287 33.2152 170.715 31.3605 171.83 29.5569C173.258 27.3836 173.634 25.2103 173.634 22.6672C173.634 20.4939 173.264 19.0089 172.576 17.5809C171.836 15.7774 170.772 14.2925 169.287 13.2343C167.751 12.1192 166.323 11.061 164.15 10.6912Z" fill="#F0D5C0"/>
|
||||
<g clip-path="url(#clip0_827_1780)">
|
||||
<path d="M289.439 82H240.693H23V102H290V82H289.439Z" stroke="#333333" stroke-width="2" stroke-miterlimit="10"/>
|
||||
<path d="M39.4355 87.6528C38.7921 86.7678 37.7627 86.2046 36.3955 86.3816C35.7843 86.1241 35.1087 86.0598 34.4331 86.3172C32.6316 86.9931 31.3287 88.2482 30.444 89.9379C29.3503 92.0137 30.0741 95.4413 32.3742 96.4711C32.4064 96.4872 32.4386 96.4872 32.4547 96.5033C32.6638 96.632 32.8729 96.7447 33.0981 96.8412C33.3876 97.3079 33.8219 97.6941 34.417 97.9194C35.9129 98.4826 37.7145 97.9838 38.8726 96.9056C39.6125 96.455 40.1594 95.747 40.4811 94.9263C41.2692 94.17 41.8 93.1079 41.9126 92.1264C42.1217 90.3241 41.2692 88.2804 39.4355 87.6528Z" fill="#333333"/>
|
||||
</g>
|
||||
<rect x="23" y="82" width="267" height="20" stroke="#333333" stroke-width="2"/>
|
||||
<defs>
|
||||
<clipPath id="clip0_827_1780">
|
||||
<rect x="23" y="82" width="267" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 15 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
221
themes/lumbung-theme/static/js/hugotagsfilter-1.2.2.min.js
vendored
Normal file
221
themes/lumbung-theme/static/js/hugotagsfilter-1.2.2.min.js
vendored
Normal file
@ -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]
|
||||
);
|
Loading…
Reference in New Issue
Block a user