forked from ruangrupa/lumbung.space
ack + repos
This commit is contained in:
0
lumbung-theme/layouts/404.html
Normal file
0
lumbung-theme/layouts/404.html
Normal file
@ -0,0 +1,2 @@
|
||||
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
||||
<img width = "{{- $image.Width -}}" height = "{{- $image.Height -}}" alt = "{{- .PlainText | htmlUnescape -}}" src = "{{- $image.RelPermalink -}}">
|
30
lumbung-theme/layouts/_default/baseof.html
Normal file
30
lumbung-theme/layouts/_default/baseof.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode | default "en" }}">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
<script>
|
||||
function toggleDescription(id){
|
||||
document.querySelector(id).classList.toggle("collapsed");
|
||||
}
|
||||
function loadPlayer(id, embed_path){
|
||||
media = document.querySelector('#media-'+ id)
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.src = embed_path + '?autoplay=1&title=0';
|
||||
iframe.width = 560;
|
||||
iframe.height = 315;
|
||||
iframe.frameBorder = 0;
|
||||
iframe.sandbox = "allow-same-origin allow-scripts allow-popups" ;
|
||||
media.appendChild(iframe);
|
||||
document.querySelector('#thumb-'+ id).remove();
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
36
lumbung-theme/layouts/_default/list.html
Normal file
36
lumbung-theme/layouts/_default/list.html
Normal file
@ -0,0 +1,36 @@
|
||||
{{ define "main" }}
|
||||
<section class='entries'>
|
||||
<div class="h-feed">
|
||||
{{ range (.Paginator 13).Pages }}
|
||||
|
||||
{{ if in .Params.categories "tv"}}
|
||||
|
||||
{{- partial "video_box.html" . -}}
|
||||
|
||||
{{ else if in .Params.categories "calendar" }}
|
||||
|
||||
{{- partial "calendar_card.html" . -}}
|
||||
|
||||
{{ else if in .Params.categories "network" }}
|
||||
|
||||
{{- partial "network_card.html" . -}}
|
||||
|
||||
{{ else if in .Params.categories "shouts" }}
|
||||
|
||||
{{- partial "shout_card.html" . -}}
|
||||
|
||||
{{ else }}
|
||||
|
||||
{{- partial "card.html" . -}}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<nav class="pagination">
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</nav>
|
||||
|
||||
</main>
|
||||
{{ end }}
|
16
lumbung-theme/layouts/_default/single.html
Normal file
16
lumbung-theme/layouts/_default/single.html
Normal file
@ -0,0 +1,16 @@
|
||||
{{ define "main" }}
|
||||
<main class="main">
|
||||
<article class="h-entry">
|
||||
<header>
|
||||
<h1 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h1>
|
||||
<p>
|
||||
Published by <a class="p-author" href="/about">{{ $.Param "author" }}</a>
|
||||
on <time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
|
||||
</p>
|
||||
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
37
lumbung-theme/layouts/index.html
Normal file
37
lumbung-theme/layouts/index.html
Normal file
@ -0,0 +1,37 @@
|
||||
{{ define "main" }}
|
||||
<section class='entries'>
|
||||
<div class="h-feed">
|
||||
{{ range (.Paginator 13).Pages }}
|
||||
|
||||
{{ if in .Params.categories "tv"}}
|
||||
|
||||
{{- partial "video_box.html" . -}}
|
||||
|
||||
{{ else if in .Params.categories "calendar" }}
|
||||
|
||||
{{- partial "calendar_card.html" . -}}
|
||||
|
||||
{{ else if in .Params.categories "network" }}
|
||||
|
||||
{{- partial "network_card.html" . -}}
|
||||
|
||||
{{ else if in .Params.categories "shouts" }}
|
||||
|
||||
{{- partial "shout_card.html" . -}}
|
||||
|
||||
{{ else }}
|
||||
|
||||
{{- partial "card.html" . -}}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<nav class="pagination">
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</nav>
|
||||
|
||||
</main>
|
||||
{{ end }}
|
||||
|
30
lumbung-theme/layouts/partials/calendar_card.html
Normal file
30
lumbung-theme/layouts/partials/calendar_card.html
Normal file
@ -0,0 +1,30 @@
|
||||
{{ $t := (time .Params.event_end) }}
|
||||
<div class='card calendar {{ if $t.Before now }}past{{end}}'>
|
||||
<article class="h-event calendar ">
|
||||
<header>
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2>
|
||||
</header>
|
||||
{{ range first 1 (.Resources.ByType "image") }}
|
||||
<div class='calendar-image-holder'><a href="{{ $.Permalink }}"> <img class="calendar-image" src="{{ .Permalink }}"></a></div>
|
||||
{{ end }}
|
||||
<div class='start-scroller'>
|
||||
<marquee behavior="scroll" direction="left">
|
||||
{{ .Params.localized_begin | markdownify }}
|
||||
</marquee>
|
||||
</div>
|
||||
<div class='calendar metadata'>
|
||||
<div class='calendar-duration'>Duration: <b>{{ .Params.duration }}</b></div>
|
||||
<input class='descr_button' type='checkbox' id='toggle-{{ .Params.uid }}'/>
|
||||
<label class='calendar' for='toggle-{{ .Params.uid }}'>↕</label>
|
||||
<div class='calendar-location p-location'>{{ .Params.location | markdownify }}</div>
|
||||
|
||||
<div class='calendar description p-description' id='event-{{ .Params.uid }}'>
|
||||
{{.Content}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
34
lumbung-theme/layouts/partials/card.html
Normal file
34
lumbung-theme/layouts/partials/card.html
Normal file
@ -0,0 +1,34 @@
|
||||
<div class='card'>
|
||||
<article class="h-entry">
|
||||
<header>
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2>
|
||||
<div class="header-metadata">
|
||||
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
|
||||
{{ if .Params.author }}
|
||||
<div class='author'>{{.Params.author}}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
|
||||
|
||||
<div class="p-summary {{if .Truncated}} truncated {{end}} {{if $img}} image {{end}}" >
|
||||
<div class="summary-text">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
{{ with $img }}
|
||||
{{ $thumb := .Resize "400x300"}}
|
||||
<div class="summary-image">
|
||||
<img src="{{ $thumb.Permalink }}" alt="{{ .Title }}">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if .Truncated }}
|
||||
<footer class='post-footer'>
|
||||
<div class='read-more'><a href="{{ .RelPermalink }}">Read More…</a></div>
|
||||
<div class='footer-filler'></div>
|
||||
</footer>
|
||||
{{ end }}
|
||||
|
||||
</article>
|
||||
</div>
|
5
lumbung-theme/layouts/partials/footer.html
Normal file
5
lumbung-theme/layouts/partials/footer.html
Normal file
@ -0,0 +1,5 @@
|
||||
<footer class="bar">
|
||||
<div>
|
||||
Imprint - Privacy Policy - Copyright
|
||||
</div>
|
||||
</footer>
|
29
lumbung-theme/layouts/partials/head.html
Normal file
29
lumbung-theme/layouts/partials/head.html
Normal file
@ -0,0 +1,29 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>{{ if .IsHome }} {{ .Site.Title }} {{ else }} {{ .Title }} | {{ .Site.Title }} {{ end }}</title>
|
||||
|
||||
{{- if or .Description .Site.Params.description }}
|
||||
<meta name="description" content="{{ .Description | default .Site.Params.description }}">
|
||||
{{- end }}
|
||||
{{- if or .Description .Site.Params.description }}
|
||||
<meta name="author" content='{{ .Site.Params.author }}'>
|
||||
{{- end }}
|
||||
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css">
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/video-box.css">
|
||||
<link media="print" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css">
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="icon" type="image/ico" href="{{ . | absURL }}">
|
||||
{{ end }}
|
||||
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
</head>
|
34
lumbung-theme/layouts/partials/header.html
Normal file
34
lumbung-theme/layouts/partials/header.html
Normal file
@ -0,0 +1,34 @@
|
||||
<header class="bar" id="top-menu">
|
||||
<h1 class="logo"><a href="/"><img src="{{ .Site.Params.logo }}" alt="{{ .Site.Title }}"/></a></h1>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
<details class="menu-dropdown">
|
||||
<summary class="menu-nav-item {{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
|
||||
<a href="#">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
</summary>
|
||||
<ul class="sub-menu">
|
||||
{{ range .Children }}
|
||||
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</details>
|
||||
{{ else }}
|
||||
<li class="menu-nav-item">
|
||||
<a href="{{ .URL }}">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
37
lumbung-theme/layouts/partials/network_card.html
Normal file
37
lumbung-theme/layouts/partials/network_card.html
Normal file
@ -0,0 +1,37 @@
|
||||
<div class='network card'>
|
||||
<article class="h-entry network">
|
||||
<header>
|
||||
{{ $postPermalink := .Permalink}}
|
||||
<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.author }}<b>{{.Params.author}}</b> at {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ .Params.feed_name | urlize }}">{{ .Params.feed_name }}</a></span></div>
|
||||
{{ with (index (.Resources.ByType "image") 0) }}
|
||||
{{ $height := add .Height 0.0}}
|
||||
{{ $ratio := div $height .Width}}
|
||||
{{ $thumb := .Fit "540x360"}}
|
||||
<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 }}
|
||||
<div class="summary-text">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class='post-footer'>
|
||||
<div class='footer-metadata'>
|
||||
<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>
|
36
lumbung-theme/layouts/partials/shout_card.html
Normal file
36
lumbung-theme/layouts/partials/shout_card.html
Normal file
@ -0,0 +1,36 @@
|
||||
<div class='shout card'>
|
||||
<article class="h-entry shout">
|
||||
<header>
|
||||
{{ $postPermalink := .Permalink}}
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2>
|
||||
</header>
|
||||
|
||||
{{ with (index (.Resources.ByType "image") 0) }}
|
||||
{{ $height := add .Height 0.0}}
|
||||
{{ $ratio := div $height .Width}}
|
||||
{{ $thumb := .Fit "540x360"}}
|
||||
<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 }}
|
||||
<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">From {{ if .Params.author }}<b>{{.Params.author}}</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>
|
37
lumbung-theme/layouts/partials/video_box.html
Normal file
37
lumbung-theme/layouts/partials/video_box.html
Normal file
@ -0,0 +1,37 @@
|
||||
<div class='video-box'>
|
||||
<div class='media' id='media-{{ .Params.uuid }}'>
|
||||
<span class='video-thumbnail' id='thumb-{{ .Params.uuid }}'
|
||||
href="https://tv.lumbung.space/videos/watch/{{ .Params.uuid }}"
|
||||
onclick="loadPlayer(
|
||||
'{{ .Params.uuid }}',
|
||||
'https://tv.lumbung.space/videos/embed/{{ .Params.uuid }}'
|
||||
)">
|
||||
<img src="{{.Site.BaseURL}}{{ .File.Dir }}{{ .Params.preview_image }}">
|
||||
|
||||
{{ if .Params.is_live}}
|
||||
<div class="video-thumbnail-duration-overlay">LIVE</div>
|
||||
{{ else }}
|
||||
<div class="video-thumbnail-duration-overlay">{{.Params.video_duration}}</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="play-overlay">
|
||||
<div class="play-icon"></div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class='video metadata'>
|
||||
<div class='title'>{{ .Title }}</div>
|
||||
<div class='video channel'><a href='{{ .Params.channel_url }}'> {{ .Params.video_channel }}</a></div>
|
||||
<input class='descr_button' type='checkbox' id='toggle-{{ .Params.uuid }}'/>
|
||||
<label class='video' for='toggle-{{ .Params.uuid }}'>↕</label>
|
||||
<div class='video date'> <a href='https://tv.lumbung.space/videos/watch/{{ .Params.uuid }}'> {{ .Date.Format "Jan 02, 2006" }}</a></div>
|
||||
<div class="description video" id='vid-{{ .Params.uuid }}'> {{ .Content }}
|
||||
<ul>
|
||||
{{ range (.GetTerms "categories") }}
|
||||
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user