forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
c5739db3ff
commit
9322ea68b7
|
@ -9,3 +9,12 @@ copyright = "bunteshaus.de"
|
||||||
|
|
||||||
defaultContentLanguageInSubdir = true
|
defaultContentLanguageInSubdir = true
|
||||||
defaultContentLanguage = "de"
|
defaultContentLanguage = "de"
|
||||||
|
|
||||||
|
[related]
|
||||||
|
threshold = 10
|
||||||
|
includeNewer = true
|
||||||
|
toLower = true
|
||||||
|
|
||||||
|
[[related.indices]]
|
||||||
|
name = "tags"
|
||||||
|
weight = 90
|
||||||
|
|
|
@ -26,10 +26,12 @@ mainMenu = ['about','news','events']
|
||||||
searchSections = ['news']
|
searchSections = ['news']
|
||||||
|
|
||||||
# how long stays a featrued article on frontpage as featured (in weeks)
|
# how long stays a featrued article on frontpage as featured (in weeks)
|
||||||
featured_expire = "28"
|
featured_expire = "13"
|
||||||
|
|
||||||
placeholder = "/images/no_article_pic.png"
|
placeholder = "/images/no_article_pic.png"
|
||||||
|
|
||||||
|
items_per_list = 5
|
||||||
|
|
||||||
# data for your imprint and contact page
|
# data for your imprint and contact page
|
||||||
[imprintdata]
|
[imprintdata]
|
||||||
tel = "(+) 49 5141 907 927"
|
tel = "(+) 49 5141 907 927"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "Über uns"
|
title: "Über uns"
|
||||||
layout: "article_list"
|
layout: "gen_list"
|
||||||
---
|
---
|
||||||
Wir sind das Buntehaus, ein [soziokulturelles](/bunteshaus/soziokultur) Zentrum in Celle.
|
Wir sind das Buntehaus, ein [soziokulturelles](/bunteshaus/soziokultur) Zentrum in Celle.
|
||||||
Wir leben vom mitmachen und so.
|
Wir leben vom mitmachen und so.
|
||||||
|
|
|
@ -4,4 +4,12 @@
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
.twolists {
|
||||||
|
display: flex; flex-wrap: wrap; justify-content: space-around;
|
||||||
|
div {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,8 +89,52 @@ section, article, .article_footer, .sidebar {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.two-lists {
|
|
||||||
display: flex; flex-wrap: wrap; justify-content: space-around;
|
.twolists {
|
||||||
|
}
|
||||||
|
|
||||||
|
.gen_list {
|
||||||
|
a { text-decoration: none;
|
||||||
|
margin-bottom: 5rem;
|
||||||
|
&:hover {
|
||||||
|
.img {
|
||||||
|
height: 180px;
|
||||||
|
background-size: 110% auto;
|
||||||
|
background-position: top;
|
||||||
|
}
|
||||||
|
.img-only {
|
||||||
|
height: 360px;
|
||||||
|
background-size: 110% auto;
|
||||||
|
background-position: top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
margin-top: 0rem;
|
||||||
|
}
|
||||||
|
section {
|
||||||
|
margin-right: 1rem;
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
height: 140px;
|
||||||
|
background-size: 100% auto;
|
||||||
|
background-position: top;
|
||||||
|
transition: all .3s ease-in-out;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.img-only {
|
||||||
|
width: 100%;
|
||||||
|
height: 360px;
|
||||||
|
background-size: 100% auto;
|
||||||
|
background-position: top;
|
||||||
|
transition: all .2s ease-in-out;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
article {
|
article {
|
||||||
|
|
|
@ -106,4 +106,5 @@ article {
|
||||||
.index_section { max-width: 42%; }
|
.index_section { max-width: 42%; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
{{- $paginator := "" -}}
|
{{- $paginator := "" -}}
|
||||||
{{- $partial := .Layout -}}
|
{{- $partial := .Layout -}}
|
||||||
{{- $paginate := true -}}
|
{{- $paginate := true -}}
|
||||||
{{- if eq .Layout "article_list" -}}
|
{{- if eq .Layout "gen_list" -}}
|
||||||
{{ if eq .Section "events" }}
|
{{ if eq .Section "events" }}
|
||||||
{{- $pages = where $pages ".Params.when" "ne" nil -}}
|
{{- $pages = where $pages ".Params.when" "ne" nil -}}
|
||||||
{{ else if eq .Type "about" }}
|
{{ else if eq .Type "about" }}
|
||||||
{{- $pages = where $pages ".Params.about" "=" true -}}
|
{{- $pages = (where $pages ".Params.about" "=" true) -}}
|
||||||
{{ else if eq .Section "news" }}
|
{{ else if eq .Section "news" }}
|
||||||
{{- $pages = .Data.Pages -}}
|
{{- $pages = .Data.Pages -}}
|
||||||
{{ else if eq .Section "featured" }}
|
{{ else if eq .Section "featured" }}
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if eq .Kind "term" }}
|
{{ if eq .Kind "term" }}
|
||||||
{{- $pages = .Data.Pages -}}
|
{{- $pages = .Data.Pages -}}
|
||||||
{{ $partial = "article_list" }}
|
{{ $partial = "gen_list" }}
|
||||||
{{ else if eq .Kind "taxonomy" }}
|
{{ else if eq .Kind "taxonomy" }}
|
||||||
{{ $paginate = false }}
|
{{ $paginate = false }}
|
||||||
{{- $pages = .Data.Terms.ByCount -}}
|
{{- $pages = .Data.Terms.ByCount -}}
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
{{ $partial = string (printf "layout/%s" $partial) }}
|
{{ $partial = string (printf "layout/%s" $partial) }}
|
||||||
|
|
||||||
{{ partial $partial (dict "context" . "pages" $pages "amount" "5" "content" .Content "type" .Type "paginate" $paginate) }}
|
{{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "sidebar" }}
|
{{ define "sidebar" }}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
{{ $partial = printf "layout/%s" .Layout }}
|
{{ $partial = printf "layout/%s" .Layout }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<article>
|
<article>
|
||||||
|
|
||||||
{{ partial $partial (dict "context" . "pic" $pic "content" .Content "partial_before" $partial_before "type" "article") }}
|
{{ partial $partial (dict "context" . "pic" $pic "content" .Content "partial_before" $partial_before "type" "article") }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -44,6 +45,13 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $related := .Site.RegularPages.RelatedIndices . "tags" | first 5 }}
|
||||||
|
{{ if $related }}
|
||||||
|
<h3 class="align_menu">Related</h3>
|
||||||
|
{{ range $related }}
|
||||||
|
<div class="align_menu"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</aside>
|
</aside>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -4,13 +4,9 @@
|
||||||
|
|
||||||
{{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 $days) }}
|
{{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 $days) }}
|
||||||
|
|
||||||
{{ $featured = where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections }}
|
|
||||||
|
|
||||||
{{ $featured = $all | intersect $featured }}
|
{{ $featured = $all | intersect $featured }}
|
||||||
{{ $posts := $all | complement $featured }}
|
{{ $posts := $all | complement $featured }}
|
||||||
{{ if ne .Content "" }}
|
|
||||||
{{ partial "snippets/content" (dict "content" .Content) }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $news := "news" }}
|
{{ $news := "news" }}
|
||||||
{{ if i18n $news }}
|
{{ if i18n $news }}
|
||||||
{{ $news = i18n $news }}
|
{{ $news = i18n $news }}
|
||||||
|
@ -20,13 +16,13 @@
|
||||||
{{ $feat = i18n $feat }}
|
{{ $feat = i18n $feat }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="two-lists">
|
{{ if ne .Content "" }}
|
||||||
{{ if gt (len $featured) 1 }}
|
{{ partial "snippets/content" (dict "content" .Content) }}
|
||||||
{{ partial "layout/article_list" (dict "context" . "pages" $featured "amount" "1" "title" $feat "type" "index") }}
|
|
||||||
{{ end }}
|
|
||||||
{{ if gt (len $posts) 1 }}
|
|
||||||
{{ partial "layout/article_list" (dict "context" . "pages" $posts "amount" "3" "title" $news "type" "index") }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="twolists">
|
||||||
|
{{ partial "layout/gen_list" (dict "context" . "pages" $featured "title" $feat )}}
|
||||||
|
{{ partial "layout/gen_list" (dict "context" . "pages" $posts "title" $news "limit" "5" )}}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
63
themes/buha/layouts/partials/layout/gen_list.html
Normal file
63
themes/buha/layouts/partials/layout/gen_list.html
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
{{ $p := .pages }}
|
||||||
|
{{ if and (.limit) (not .paginate) }}
|
||||||
|
{{ $p = first .limit .pages }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $paginator := .pages }}
|
||||||
|
{{ if .paginate }}
|
||||||
|
{{ $paginator = .context.Paginate $p }}
|
||||||
|
{{ $p = $paginator.Pages }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if or .content (and (.paginate) (.content) (eq $paginator.PageNumber 1)) }}
|
||||||
|
{{ partial "snippets/content" (dict "content" .context.Content) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $p }}
|
||||||
|
<div class="gen_list">
|
||||||
|
{{ if .title }}<h2>{{ .title }}</h2>{{ end }}
|
||||||
|
{{ range $p }}
|
||||||
|
|
||||||
|
{{ $banner := slice }}
|
||||||
|
{{ $image := slice }}
|
||||||
|
{{ $images := slice }}
|
||||||
|
{{ if .Resources.GetMatch "banner*" }}
|
||||||
|
{{ $banner = slice (.Resources.GetMatch "banner*") }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Resources.ByType "image" }}
|
||||||
|
{{ $image = .Resources.ByType "image" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $images = complement $banner $image }}
|
||||||
|
{{ $image = (index (complement $banner $image) 0) }}
|
||||||
|
{{ $banner = (index $banner 0) }}
|
||||||
|
|
||||||
|
|
||||||
|
<a href="{{ .Permalink }}">
|
||||||
|
<section>
|
||||||
|
<h3>
|
||||||
|
{{ .Title }}
|
||||||
|
</h3>
|
||||||
|
{{ with .Resources.GetMatch $banner }}
|
||||||
|
<div class="img" style="background-image: url({{ .Permalink }})">
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Description }}
|
||||||
|
{{ .Description }}
|
||||||
|
{{ else if .Summary }}
|
||||||
|
<p>{{ .Summary }}</p>
|
||||||
|
{{ else if .Content }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ else if $image }}
|
||||||
|
{{ $i := (.Resources.GetMatch $image).Permalink }}
|
||||||
|
<div class="img-only" style="background-image: url({{ $i }})">
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .paginate }}
|
||||||
|
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
BIN
themes/buha/static/fonts/NanumGothic-Bold.ttf
Normal file
BIN
themes/buha/static/fonts/NanumGothic-Bold.ttf
Normal file
Binary file not shown.
BIN
themes/buha/static/fonts/NanumGothic-ExtraBold.ttf
Normal file
BIN
themes/buha/static/fonts/NanumGothic-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
themes/buha/static/fonts/NanumGothic-Regular.ttf
Normal file
BIN
themes/buha/static/fonts/NanumGothic-Regular.ttf
Normal file
Binary file not shown.
|
@ -11,7 +11,13 @@ function check_checkboxes(name) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function typeInTextarea(newText, el = document.getElementById('content')) {
|
||||||
|
const [start, end] = [el.selectionStart, el.selectionEnd];
|
||||||
|
el.setRangeText(newText, start, end);
|
||||||
|
}
|
||||||
|
|
||||||
function button(x) {
|
function button(x) {
|
||||||
|
const id = document.getElementById('content');
|
||||||
if (x == "url") {
|
if (x == "url") {
|
||||||
let url = prompt("Please enter URL", "https://wikipedia.org");
|
let url = prompt("Please enter URL", "https://wikipedia.org");
|
||||||
let desc = prompt("Description", "The free Encyclopedia");
|
let desc = prompt("Description", "The free Encyclopedia");
|
||||||
|
@ -19,7 +25,7 @@ function button(x) {
|
||||||
}
|
}
|
||||||
if (x == "headline") {
|
if (x == "headline") {
|
||||||
let headline = prompt("Headline", "Act One");
|
let headline = prompt("Headline", "Act One");
|
||||||
var out = "##" + headline + "\n\n";
|
var out = "\n## " + headline + "\n\n";
|
||||||
}
|
}
|
||||||
if (x == "pic") {
|
if (x == "pic") {
|
||||||
let desc = prompt("Description", "Wikipedia logo");
|
let desc = prompt("Description", "Wikipedia logo");
|
||||||
|
@ -28,7 +34,7 @@ function button(x) {
|
||||||
}
|
}
|
||||||
if (x == "bold") {
|
if (x == "bold") {
|
||||||
let bold = prompt("Bold", "");
|
let bold = prompt("Bold", "");
|
||||||
var out = "_" + bold + "_ ";
|
var out = "\*\*" + bold + "\*\* ";
|
||||||
}
|
}
|
||||||
if (x == "paragraph") {
|
if (x == "paragraph") {
|
||||||
var out = "\n\n";
|
var out = "\n\n";
|
||||||
|
@ -37,10 +43,13 @@ function button(x) {
|
||||||
var out = " \n";
|
var out = " \n";
|
||||||
}
|
}
|
||||||
if (x == "more") {
|
if (x == "more") {
|
||||||
var out = "\n\n<!--more-->\n\n";
|
var out = "\n<!--more-->\n\n";
|
||||||
}
|
}
|
||||||
if (out != null) {
|
if (out != null) {
|
||||||
document.getElementById('content').innerHTML += out;
|
typeInTextarea(out);
|
||||||
|
const end = id.value.length;
|
||||||
|
id.setSelectionRange(end, end);
|
||||||
|
id.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +225,7 @@ function showInput(e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const textarea = document.getElementById('result');
|
const textarea = document.getElementById('result');
|
||||||
var end = textarea.value.length;
|
var end = textarea.length;
|
||||||
textarea.focus();
|
textarea.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user