Skip to content

Commit

Permalink
Updated submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
cmahnke committed Apr 20, 2021
1 parent d6868e4 commit 42e847a
Show file tree
Hide file tree
Showing 18 changed files with 303 additions and 38 deletions.
1 change: 1 addition & 0 deletions .atomignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
2 changes: 1 addition & 1 deletion blogs/blaufusstoelpel
2 changes: 1 addition & 1 deletion blogs/kinderbuecher
2 changes: 1 addition & 1 deletion blogs/schriftmuster
2 changes: 1 addition & 1 deletion blogs/vorsatzpapier
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ defaultcontentlanguage = "de"
suffixes = ["geojson", "gjson"]

[outputFormats]
[outputFormats.GEOJSON]
[outputFormats.geojson]
mediaType = "application/json"
isPlainText = true
isHTML = false
baseName = "map"
notAlternative = true

[outputFormats.IIIF]
[outputFormats.iiif]
mediaType = "application/json"
isPlainText = true
isHTML = false
Expand Down
1 change: 1 addition & 0 deletions content/archive/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
title: Archive
displayinlist: false
metaPage: true
layout: archive
---
This page chronologically lists all contributions from the Projektemacher.org blogs.
1 change: 1 addition & 0 deletions content/archive/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
title: Archiv
displayinlist: false
metaPage: true
layout: archive
---
Diese Seite listet chronologisch alle Beiträge der Projektemacher.org Blogs.
1 change: 1 addition & 0 deletions content/blog/_index.en.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
url: blogs
title: Blogs
layout: portfolio
---
External links will open in a new window. The flags indicate the languages ​​available, the ribbons the status of the blog.
3 changes: 2 additions & 1 deletion content/blog/_index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
url: blogs
title: Blogs
layout: portfolio
---
Externe Links werden in einem neuen Fenster geöffnet. Die Flaggen kennzeichnen die verfügbaren Sprachen, die Bändchen den Status des Blogs.
Externe Links werden in einem neuen Fenster geöffnet. Die Flaggen kennzeichnen die verfügbaren Sprachen, die Bändchen den Status des Blogs.
197 changes: 197 additions & 0 deletions layouts/_default/archive.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
{{ define "title" }}
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}}
{{- print ": " -}}
{{- end -}}

{{- .Title }} · {{ .Site.Title -}}
{{ end }}
{{ define "content" }}
<div class="content list">
<section class="container list">
<article class="archive">
<header>
<h1 class="title header">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}}
{{- print ": " -}}
{{- end -}}

{{- .Title -}}
</h1>
</header>
<div class="archive-description">{{ .Content }}</div>

<div class="archive-filter">
<h2 class="filter-header">{{ i18n "filter" }}</h2>
<div class="filter-list">
{{- $pages := where .Data.Pages "Section" "blog" -}}
{{- $pages = ($pages | lang.Merge (where .Sites.First.RegularPages "Section" "blog") ) -}}
{{- $pages = where $pages "Params.status" "ne" "planned" }}
{{- range $pages -}}
{{- $dir := split (string (path.Dir .Path)) "/" -}}
{{- $prefix := index $dir 1 -}}
<div class="filter">
<input type="checkbox" id="{{ $prefix }}-checkbox" data-filter="{{ $prefix }}" class="filter-checkbox" checked>
<span class="blog-filter"> {{ .Title }}</span>
</div>
{{- end -}}
<script type="text/javascript">
function filter (elem) {
var box;
if (elem.is('input')) {
box = elem;
} else {
box = elem.siblings('input:checkbox');
if (box.is(':checked')) {
box.prop('checked', false);
} else {
box.prop('checked', true);
}
}
var blog = box.data('filter');

$('.archive-content .' + blog).toggle();
$('.archive-content ul.month-section').each(function () {
var hide = true;
$(this).find('li').each(function () {
if ($(this).is(":visible")) {
hide = false;
}
});
if (hide) {
$(this).toggle();
}
});

/*
$('.archive-content ul.year-section').each(function () {
var hide = true;
$(this).find('ul.month-section').each(function () {
if ($(this).is(":visible")) {
hide = false;
}
});
if (hide) {
$(this).toggle();
$(this).prev('.year').toggle();
}
});
*/

/*
$('.archive-content .collapse').addClass('show');
*/
}

$('.archive-filter .filter').find('.blog-filter, .filter-checkbox:checked').on("click", function (e) {
filter($(this));
});
</script>
</div>
</div>
<hr class="archive-hr">
<div class="archive-content">
{{- $pages := where .Site.Pages "Section" "post" -}}

{{- .Scratch.Set "pages" $pages -}}
{{- $mainSite := .Sites.First -}}
{{- if ne $mainSite .Site -}}
{{- .Scratch.Set "pages" ($pages | lang.Merge (where $mainSite.Pages "Section" "post") ) -}}
{{- end -}}
{{- $pages = (.Scratch.Get "pages").Reverse -}}
{{/* Filter non post pages */}}
{{- $pages = where $pages "Params.displayinlist" "!=" false -}}
{{- $pages = where $pages "Params.displayInList" "!=" false -}}
{{- $pages = where $pages "Params.metaPage" "!=" true -}}
{{- $pages = where $pages "Date.IsZero" "==" false -}}

{{- $firstYear := (index (first 1 $pages) 0).Date.Year -}}
{{- $lastYear := (index (last 1 $pages) 0).Date.Year -}}
{{- if eq $firstYear 1 -}}
{{ warnf "%s" (index (first 1 $pages) 0) -}}
{{- warnf "Building archive for years %d to %d" $firstYear $lastYear -}}
{{- end -}}

{{- range (seq $firstYear $lastYear) -}}
{{ $year := . }}
{{- if len (where $pages ".Date.Year" "==" $year) -}}
<a class="year collapse-header" aria-expanded="false" data-toggle="collapse" aria-controls="collapse-{{ $year }}" href="#year-{{ $year }}">
<i class="fas fa-plus"></i>
<i class="fas fa-minus"></i>
<h2 class="year-header">{{ $year }}</h2>
</a>
<ul id="year-{{ $year }}" class="year-section collapse">
{{- $yearPages := where $pages ".Date.Year" "==" . -}}
{{- range (seq 1 12 ) -}}
{{- $month := . -}}
{{- if len (where $yearPages ".Date.Month" "==" $month) -}}
<li class="month-section">
<ul class="month-section month-{{ $month }}">
{{- $monthName := "" -}}
{{ if eq "de" $.Site.Language.Lang }}
{{ $monthName = (index $.Site.Data.months (printf "%d" $month)) }}
{{- else -}}
{{- $monthName = (dateFormat "January" (printf "2001-%02d-01" $month)) -}}
{{- end -}}

<span class="month">{{ $monthName }}</span>
{{- range (where $yearPages ".Date.Month" "==" $month) -}}

{{- $dir := split (string (path.Dir .Path)) "/" -}}

{{- $displayName := "" -}}
{{- $postLink := "" -}}
{{- $linkPrefix := "" -}}
{{- $prefix := index $dir 1 -}}
{{- $sectionHeading := printf "/%s" (delimit (slice "blog" $prefix) "/") -}}
{{- $blogPage := .Site.GetPage $sectionHeading -}}
{{- $displayName = printf "%s: " $blogPage.Title -}}
{{- if ($blogPage.Param "linkPrefix") -}}
{{ $linkPrefix = $blogPage.Param "linkPrefix" -}}
{{- else -}}
{{ $linkPrefix = $blogPage.Param "link" -}}
{{- end -}}
{{- $postLink = split (string .Path) "/" -}}

{{- if eq (len $dir) 2 -}}
{{- $postLink = last (sub (len $postLink) 0) $postLink -}}
{{ else }}
{{- $postLink = last (sub (len $postLink) 2) $postLink -}}
{{- end -}}
{{- $postLink = delimit $postLink "/" -}}
{{- $postLink = replaceRE "^(.*/)\\w*\\..*$" "$1" $postLink -}}
{{- $postLink = printf "%s%s" $linkPrefix $postLink -}}

{{- $openExternal := true -}}

<li class="archive-link {{ $prefix }}">
<div class="post-heading">
<span class="date">
{{- partial "date.html" (dict "date" .Date "language" $.Page.Language "months" $.Site.Data.months) -}}
</span>
<span class="link">
{{- $postTitle := "" -}}
{{- if eq .Title "" -}}
{{- $postTitle = (i18n "untitledPost") -}}
{{- else -}}
{{- $postTitle = .Title -}}
{{- end -}}
<a class="title" href="{{ $postLink }}" {{- if $openExternal -}}target="_blank"{{ else }}data-toggle="collapse"{{- end -}}>{{- $displayName }}{{ $postTitle -}}</a>
</span>
</div>
</li>
{{ end }}
</ul>
</li>
{{end }}
{{ end }}
</ul>
{{- end -}}
{{- end -}}
</div>
</article>
</section>
</div>

{{ end }}
20 changes: 1 addition & 19 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,17 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Language" content="{{ .Site.Language.Lang }}">

{{- if and (eq .Kind "page") (eq .Section "blog") -}}
{{- if and (.Params.link) (.Params.private) -}}
<meta http-equiv="refresh" content="0; URL={{ .Params.link }}">
{{- end -}}
{{- end -}}

{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<meta name="description" content="{{ .Description | default (.Summary | default .Site.Params.description ) }}">
<meta name="keywords" content="{{ (delimit .Keywords ",") | default .Site.Params.keywords }}">

{{- if hasPrefix .Page.Name "404" -}}
<meta http-equiv="refresh" content="15; URL={{ .Site.BaseURL }}">
{{- end -}}
{{ partial "html/head/meta.html" . }}

{{- template "_internal/opengraph.html" . -}}

{{/*
{{- if .Permalink -}}
<base href="{{ .Permalink }}">
{{- end -}}
*/}}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>

{{- if .Permalink -}}
Expand Down Expand Up @@ -107,12 +95,6 @@
{{ partial "footer.html" . }}
</main>

{{ template "_internal/google_analytics.html" . }}

{{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }}
{{- partial "analytics/fathom" . -}}
{{ end }}

</body>

</html>
82 changes: 82 additions & 0 deletions layouts/_default/portfolio.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{{ define "title" }}
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}}
{{- print ": " -}}
{{- end -}}

{{- .Title }} · {{ .Site.Title -}}
{{ end }}
{{ define "content" }}
<div class="content portfolio">
<section class="container page">
<article class="portfolio">
<header>
<h1 class="header">{{ .Title }}</h1>
</header>
<div class="blog-tiles">
{{ $pages := where .Data.Pages "Section" .Section }}
{{- .Scratch.Set "pages" $pages -}}
{{- $mainSite := .Sites.First -}}
{{- if ne $mainSite .Site -}}
{{- .Scratch.Set "pages" ($pages | lang.Merge (where $mainSite.RegularPages "Section" .Section) ) -}}
{{- end -}}
{{- $pages := .Scratch.Get "pages" -}}
{{- $sorted := $pages.ByParam "status" -}}

{{ range $sorted }}
<div class="blog">
{{- $link := "#" -}}
{{- if .Params.link -}}
{{- $link = .Params.link -}}
{{- end -}}
<a {{ if ne $link "#" -}} href="{{ $link }}"{{- end -}}>
{{ $status := .Params.status }}
{{ $lang := .Params.lang }}

{{- $screenshot := ((.GetPage .Path).Resources.ByType "image").GetMatch "screenshot" -}}
{{- $preview := $screenshot.Resize "400x Lanczos jpg" -}}
<div class="screenshot">
<div class="ribbon ribbon-top-right {{ $status }}">
{{- $statusString := (i18n $status | humanize) -}}
<span>{{ $statusString }}
{{- if and (eq $status "inactive") (.Params.yearsActive) -}}
<em class="yearsActive"> ({{.Params.yearsActive}})</em>
{{- end -}}
</span>
</div>
<img src="{{ $preview.RelPermalink }}" alt="Preview">
{{ $counter := 0 }}
{{- range $lang -}}
{{/*
<i class="fas fa-flag lang {{ . }}" title="{{ i18n . }}"></i>
*/}}
{{- $flagPos := "" -}}
{{- if gt $counter 0 -}}
{{- $flagPos = printf "left: calc(1.5em + (2.5em) * %d);" $counter -}}
{{- end -}}
<i class="lang {{ . }}" title="{{ i18n . }}" style="{{ $flagPos | safeCSS }}"></i>
{{- $counter = add $counter 1 -}}
{{- end -}}
</div>
<div class="tile">
<div class="blog-about">
<span class="blog-title">{{ .Title }}</span>
<span class="blog-description">
{{- .Description -}}
</span>
<span class="blog-content">
{{- replace .Content "<p></p>" "" | safeHTML -}}
</span>
</div>
</div>
</a>
</div>
{{- end -}}
</div>
<div class="portfolio-list-content">
{{ .Content }}
</div>
</article>
</section>
</div>
{{ end }}
7 changes: 1 addition & 6 deletions layouts/shortcodes/post-count.html
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
{{- $section := .Get "section" -}}
{{- $type := .Get "type" -}}

{{- $hangers := (where (where .Site.Pages "Section" $section) "Params.type" $type).Reverse -}}

{{- len $hangers -}}
{{/* This file is just a place holder, to avoid problems with mounted content from the 'blogs' directory */}}
Loading

0 comments on commit 42e847a

Please sign in to comment.