Init this site
This commit is contained in:
0
themes/lumbung-theme/layouts/404.html
Normal file
0
themes/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
themes/lumbung-theme/layouts/_default/baseof.html
Normal file
30
themes/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>
|
||||
|
||||
23
themes/lumbung-theme/layouts/_default/list.html
Normal file
23
themes/lumbung-theme/layouts/_default/list.html
Normal file
@ -0,0 +1,23 @@
|
||||
{{ define "main" }}
|
||||
<section class="entries">
|
||||
<div class="h-feed">
|
||||
{{ range .Pages }}
|
||||
<div class='card'>
|
||||
<article class="h-entry">
|
||||
<header>
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2>
|
||||
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
|
||||
</header>
|
||||
{{ if .Truncated }}
|
||||
<div class="p-summary truncated">
|
||||
{{ .Summary }}
|
||||
<p><a href="{{ .RelPermalink }}">Read More…</a></p>
|
||||
{{ else }}
|
||||
<div class="p-summary">
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
16
themes/lumbung-theme/layouts/_default/single.html
Normal file
16
themes/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 }}
|
||||
29
themes/lumbung-theme/layouts/index.html
Normal file
29
themes/lumbung-theme/layouts/index.html
Normal file
@ -0,0 +1,29 @@
|
||||
{{ define "main" }}
|
||||
<section class='entries'>
|
||||
<div class="h-feed">
|
||||
{{ range (.Paginator 10).Pages }}
|
||||
|
||||
{{ if in .Params.category "tv"}}
|
||||
|
||||
{{- partial "video_box.html" . -}}
|
||||
|
||||
{{ else if in .Params.category "calendar" }}
|
||||
|
||||
{{- partial "calendar_card.html" . -}}
|
||||
|
||||
{{ else }}
|
||||
|
||||
{{- partial "card.html" . -}}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<nav class="pagination">
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</nav>
|
||||
|
||||
</main>
|
||||
{{ end }}
|
||||
|
||||
25
themes/lumbung-theme/layouts/partials/calendar_card.html
Normal file
25
themes/lumbung-theme/layouts/partials/calendar_card.html
Normal file
@ -0,0 +1,25 @@
|
||||
<div class='card calendar'>
|
||||
<article class="h-entry calendar">
|
||||
<header>
|
||||
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2>
|
||||
<div class='header-filler'></div>
|
||||
</header>
|
||||
<div class='start-scroller'>
|
||||
<marquee behavior="scroll" direction="left">
|
||||
{{ .Params.localized_begin | markdownify }}
|
||||
</marquee>
|
||||
</div>
|
||||
<div class='calendar metadata'>
|
||||
<div class='calendar-duration'>{{ .Params.duration }}</div>
|
||||
<input class='descr_button' type='checkbox' id='toggle-{{ .Params.uid }}'/>
|
||||
<label class='calendar' for='toggle-{{ .Params.uid }}'>↕</label>
|
||||
<div class='calendar-location'>{{ .Params.location | markdownify }}</div>
|
||||
<div class='calendar description' id='event-{{ .Params.uid }}'>
|
||||
{{.Content}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
34
themes/lumbung-theme/layouts/partials/card.html
Normal file
34
themes/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
themes/lumbung-theme/layouts/partials/footer.html
Normal file
5
themes/lumbung-theme/layouts/partials/footer.html
Normal file
@ -0,0 +1,5 @@
|
||||
<footer class="bar">
|
||||
<div>
|
||||
Imprint - Privacy Policy - Copyright
|
||||
</div>
|
||||
</footer>
|
||||
25
themes/lumbung-theme/layouts/partials/head.html
Normal file
25
themes/lumbung-theme/layouts/partials/head.html
Normal file
@ -0,0 +1,25 @@
|
||||
<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 }}
|
||||
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css">
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/video-box.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>
|
||||
12
themes/lumbung-theme/layouts/partials/header.html
Normal file
12
themes/lumbung-theme/layouts/partials/header.html
Normal file
@ -0,0 +1,12 @@
|
||||
<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>
|
||||
{{ with .Site.Menus.main }}
|
||||
{{ range . }}
|
||||
<li class="menu-nav-item"> <a href="{{ .URL | relURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
26
themes/lumbung-theme/layouts/partials/video_box.html
Normal file
26
themes/lumbung-theme/layouts/partials/video_box.html
Normal file
@ -0,0 +1,26 @@
|
||||
<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 }}">
|
||||
|
||||
<div class="video-thumbnail-duration-overlay">{{.Params.video_duration}}</div>
|
||||
<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 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user