Browse Source

Restruction

master
Chris 4 years ago
parent
commit
10d0349955
  1. 10
      archetypes/tiles.md
  2. 4
      content/posts/DDO-Prototype/index.md
  3. 4
      content/posts/Exif-Spickzettel/index.md
  4. 4
      content/posts/Foto-Workflow/index.md
  5. 4
      content/posts/Pendel-Foto-Leinwand/index.md
  6. 4
      content/posts/RFduino-Implementation-of-DDO/index.md
  7. 4
      content/posts/dierundestunde-zu-guter-erst.md
  8. 4
      content/posts/fow-Foto-Workflow-Tool/index.md
  9. 3
      content/tags/dierundestunde/_index.md
  10. 7
      content/tags/kollegenrunde/_index.md
  11. 7
      content/tags/myequis/_index.md
  12. 8
      content/tags/pendel/_index.md
  13. 7
      content/tiles/die-runde-stunde.md
  14. 3
      content/tiles/kollegenrunde.md
  15. 3
      content/tiles/myequis.md
  16. 4
      content/tiles/pendel.md
  17. 104
      layouts/index.html
  18. 25
      layouts/partials/func/count_posts.html
  19. 29
      layouts/partials/tag-cover.html
  20. 56
      layouts/partials/tiles-cover.html
  21. 70
      layouts/tag/list.html
  22. 15
      static/style.css

10
archetypes/tiles.md

@ -0,0 +1,10 @@
+++
# A tile is shown on the main page. It represents and external website but can also have an
# blog posts. For this, it must have a corresponding tag.
# It's image is clickable to call external website.
title = "{{ replace .Name "-" " " | title }}"
correspondingTagName = "{{ lower .Name }}"
urlLink = "kollegen.uber.space/{{ lower .Name }}/"
cover = "img/{{ lower .Name }}-logo.png"
coverCredit = "Webseite {{ replace .Name "-" " " | title }}"
+++

4
content/posts/DDO-Prototype/index.md

@ -3,8 +3,8 @@ title = "DDO Prototype"
date = "2014-11-30"
author = false
cover = "skizze.jpg"
tags = ["programmierung"]
keywords = ["ddo"]
tags = ["ddo"]
keywords = ["programmierung"]
description = "DDO - Der Kilometerzähler im Arduion-Derivat."
showFullContent = false
readingTime = false

4
content/posts/Exif-Spickzettel/index.md

@ -3,8 +3,8 @@ title = "Exif Spickzettel"
date = "2017-08-09"
author = false
cover = "icon.jpg"
tags = ["linux"]
keywords = ["spickzettel", ""]
tags = ["spickzettel"]
keywords = ["linux", ""]
description = "Von häufig zu setzenden EXIF-Werte und GPS-Tooling"
showFullContent = false
readingTime = false

4
content/posts/Foto-Workflow/index.md

@ -3,8 +3,8 @@ title = "Foto-Workflow"
date = "2017-03-04"
author = false
cover = "icon.jpg"
tags = ["fotografie"]
keywords = ["fow", ""]
tags = ["fow"]
keywords = ["fotografie", ""]
description = "Terminal-basierter Workflow der digitalen Bildbearbeitung"
showFullContent = false
readingTime = false

4
content/posts/Pendel-Foto-Leinwand/index.md

@ -3,8 +3,8 @@ title = "Pendel Foto Leinwand"
date = "2018-05-24"
author = false
cover = "icon.png"
tags = ["fotografie"]
keywords = ["pendel"]
tags = ["pendel"]
keywords = ["fotografie"]
description = "Mit der Kamera unterwegs zur Arbeit und dann das Bild per Skript zum Plugin im Wordpress-Blog hochladen."
showFullContent = false
readingTime = false

4
content/posts/RFduino-Implementation-of-DDO/index.md

@ -3,8 +3,8 @@ title = "RFduino Implementation of DDO"
date = "2015-01-15"
author = false
cover = "icon.png"
tags = ["programmierung"]
keywords = ["ddo", "arduino"]
tags = ["ddo"]
keywords = ["programmierung"]
description = "Describes the Coding for the DDO hardware, based on a RFduino board."
showFullContent = false
readingTime = false

4
content/posts/drs-online.md → content/posts/dierundestunde-zu-guter-erst.md

@ -3,8 +3,8 @@ title = "Die Runde Stunde geht online"
date = "2022-02-05"
author = false
cover = ""
tags = ["fotografie"]
keywords = ["dierundestunde", "blog"]
tags = ["dierundestunde"]
keywords = ["fotografie"]
description = "Eine kurze Erläuterung zum Konzept der Website Die Runde Stunde."
showFullContent = false
readingTime = false

4
content/posts/fow-Foto-Workflow-Tool/index.md

@ -3,8 +3,8 @@ title = "Fow Foto Workflow Tool"
date = "2017-09-11"
author = false
cover = "icon.jpg"
tags = ["fotografie"]
keywords = ["fow", ""]
tags = ["fow"]
keywords = ["fotografie", ""]
description = "Ein Kommandozeilen-Tool für den digitalen Fotoprozess oder wie man auch bei mehreren Kameras und vielen Fotoprojekten den Überblick behält."
showFullContent = false
readingTime = false

3
content/tiles/drs.md → content/tags/dierundestunde/_index.md

@ -1,6 +1,7 @@
+++
title = "3 Die Runde Stunde"
title = "Die Runde Stunde"
urlLink = "kollegen.uber.space/dierundestunde/"
cover = "img/drs-logo.png"
coverCredit = "Besuche Die Runde Stunde"
description = "Unterwegs im R15"
+++

7
content/tags/kollegenrunde/_index.md

@ -0,0 +1,7 @@
+++
title = "Kollegenrunde"
urlLink = "kollegen.uber.space/kollegenrunde/"
cover = "img/kollegenrunde-logo.png"
coverCredit = "Webseite der Kollegenrunde"
description = "Der Kollege lädt ein"
+++

7
content/tags/myequis/_index.md

@ -0,0 +1,7 @@
+++
title = "My Equis"
urlLink = "kollegen.uber.space/japp/myequis"
cover = "img/myequis-logo.png"
coverCredit = "Besuche My Equis"
description = "In der Fahrrad-Werkstatt"
+++

8
content/tags/pendel/_index.md

@ -0,0 +1,8 @@
+++
title = "Pendel"
urlLink = "earls5.uber.space/pendel/"
cover = "img/pendel-logo.png"
coverCredit = "Pendel"
description = "Leinwand durch Raum und Zeit!"
+++

7
content/tiles/die-runde-stunde.md

@ -0,0 +1,7 @@
+++
title = "Die Runde Stunde"
correspondingTagName = "dierundestunde"
urlLink = "kollegen.uber.space/dierundestunde/"
cover = "img/drs-logo.png"
coverCredit = "Besuche Die Runde Stunde"
+++

3
content/tiles/kollegenrunde.md

@ -1,5 +1,6 @@
+++
title = "2 Kollegenrunde"
title = "Kollegenrunde"
correspondingTagName = "Kollegenrunde"
urlLink = "kollegen.uber.space/kollegenrunde/"
cover = "img/kollegenrunde-logo.png"
coverCredit = "Webseite der Kollegenrunde"

3
content/tiles/myequis.md

@ -1,5 +1,6 @@
+++
title = "3 My Equis"
title = "My Equis"
correspondingTagName = "myequis"
urlLink = "kollegen.uber.space/japp/myequis"
cover = "img/myequis-logo.png"
coverCredit = "Besuche My Equis"

4
content/tiles/pendel.md

@ -1,7 +1,9 @@
+++
title = "1 Pendel"
title = "Pendel"
correspondingTagName = "pendel"
urlLink = "earls5.uber.space/pendel/"
cover = "img/pendel-logo.png"
coverCredit = "Die Pendel-Website"
description = "Leinwand durch Raum und Zeit"
+++

104
layouts/index.html

@ -7,73 +7,63 @@
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
<div class="flex-container">
{{ range (where $PageContext.RegularPages "Type" "tiles") }}
{{ range where $PageContext.Site.RegularPages "Type" "tiles" }}
{{ $count := partial "func/count_posts.html" ( dict "context" . "term" .Params.CorrespondingTagName ) }}
<div class="flex-item-left">
{{ partial "tiles-cover.html" . }}
</div>
{{ end }}
</div>
{{ end }}
<figure >
<div class="posts">
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ range $paginator.Pages }}
<div class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
</span>
{{ with .Params.Author }}
<span class="post-author">:: {{ . }}</span>
{{ end }}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{if .Params.Cover }}
<!-- Cover image found -- found in tiles -->
<a href="https://{{ .Params.urlLink }}">
<img src="{{ .Params.Cover }}"
alt="{{ .Title | plainify | default " " }}"
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" /></a>
{{ else }}
{{ partial "cover.html" . }}
<!-- No cover image found -->
<a href="https://{{ .Params.urlLink }}">
{{ .Title | plainify | default " " }} </a>
{{ end }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary | markdownify }}
{{ if gt $count 0 }}
<figcaption class="transparentbackgroud post-meta">
<a href="tags/{{ .Params.CorrespondingTagName }}">
#{{ .Params.CorrespondingTagName | plainify }} <small>({{ $count }})</small> </a>
</figcaption >
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button"
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</figure>
</div>
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}
</div>
<div>
{{ range $.Site.Taxonomies.tags.ByCount }}
{{ $tag_name := .Name }}
{{ $has_tile := "false" }}
{{ range where $.Site.RegularPages "Type" "tiles" }}
{{ if eq .Params.correspondingTagName $tag_name }}
{{ $has_tile = "true" }}
{{ end }}
{{ end }}
{{ if eq $has_tile "false" }}
<span class=" post-meta">
<a href="/tags/{{ .Name }}"> #{{ .Name }} <small>({{ .Count }})</small></a>
</span>
<span>&nbsp;</span>
{{end}}
{{end}}
</div>
{{ end }}
{{ end }}

25
layouts/partials/func/count_posts.html

@ -0,0 +1,25 @@
<!-- Function to count number of posts for a given tag name -->
<!-- Example: Count posts with tag="ddo" -->
<!-- len={ { partial "count_posts.html" ( dict "context" $PageContext "term" "ddo" ) } } -->
{{$term := .term}}
{{$taxo := "tags"}}
{{ $ret := -1 }}
<!-- Get all posts-->
{{ $posts := where .context.Site.Pages "Type" "posts" }}
{{ $data := newScratch }}
<!-- (re)set the counter to 0 -->
{{ $data.Set "tagCounter" 0 }}
<!-- increment counter if post contains the current tag-->
{{ range $posts}}
{{ if in .Params.tags $term }}
{{ $data.Add "tagCounter" 1 }}
{{ end }}
{{ end }}
{{ $ret = $data.Get "tagCounter" }}
{{ return $ret }}

29
layouts/partials/tag-cover.html

@ -0,0 +1,29 @@
{{- $cover := false -}}
{{- $autoCover := default $.Site.Params.autoCover false }}
{{- if index .Params "cover" -}}
{{- if .Resources.GetMatch .Params.Cover }}
{{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}}
{{- else -}}
{{- $cover = absURL .Params.Cover -}}
{{- end -}}
{{- else if $.Site.Params.AutoCover -}}
{{- if (not .Params.Cover) -}}
{{- if .Resources.GetMatch "cover.*" -}}
{{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{ if .Params.urlLink }}
{{if $cover -}}
<!-- Cover image found -->
<div>
<a href="https://{{ .Params.urlLink }}" class="nodeco x post-meta">
<img src="{{ $cover }}" class="headerimage"
alt="{{ .Title | plainify | default " " }}"
title="{{ .Params.urlLink |plainify|default "Cover Image" }}" />
{{ .Params.urlLink }}
</a>
</div>
{{- end }}
{{- end }}

56
layouts/partials/tiles-cover.html

@ -1,25 +1,31 @@
{{- $cover := false -}}
{{- $autoCover := default $.Site.Params.autoCover false }}
{{- if index .Params "cover" -}}
{{- if .Resources.GetMatch .Params.Cover }}
{{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}}
{{- else -}}
{{- $cover = absURL .Params.Cover -}}
{{- end -}}
{{- else if $.Site.Params.AutoCover -}}
{{- if (not .Params.Cover) -}}
{{- if .Resources.GetMatch "cover.*" -}}
{{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{if $cover -}}
<!-- Cover image found -->
<a href="https://{{ .Params.urlLink }}">
<img src="{{ $cover }}"
alt="{{ .Title | plainify | default " " }}"
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" />
</a>
{{- end }}
{{ range where .Site.RegularPages "Type" "tiles" }}
{{ $count := partial "func/count_posts.html" ( dict "context" . "term" .Params.CorrespondingTagName ) }}
<figure >
{{if .Params.Cover }}
<!-- Cover image found -- found in tiles -->
<a href="https://{{ .Params.urlLink }}">
<img src="{{ .Params.Cover }}"
alt="{{ .Title | plainify | default " " }}"
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" /></a>
{{ else }}
<!-- No cover image found -->
<a href="https://{{ .Params.urlLink }}">
{{ .Title | plainify | default " " }} </a>
{{ end }}
<figcaption >
{{ if gt $count 0 }}
<a href="tags/{{ .Params.CorrespondingTagName }}">
#{{ .Params.CorrespondingTagName | plainify }} <small>({{ $count }})</small> </a>
{{ end }}
</figcaption >
</figure>
{{ end }}

70
layouts/tag/list.html

@ -0,0 +1,70 @@
{{ define "main" }}
<div class="post">
<div class="post-meta">
<div class="post-content">
{{ if .Description }}
{{ .Description | markdownify }}
{{ end }}
<h1 class="post-subtitle">{{ .Title | markdownify }}</h1>
</div>
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "tag-cover.html" . }}
<div class="posts">
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ range $paginator.Pages }}
<div class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
</span>
{{ with .Params.Author }}
<span class="post-author">:: {{ . }}</span>
{{ end }}
</div>
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary | markdownify }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button"
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</div>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}

15
static/style.css

@ -1,3 +1,4 @@
.flexing {
box-sizing: border-box;
}
@ -22,3 +23,17 @@
flex-direction: column;
}
}
.headerimage{
width: 100px;
}
.transparentbackgroud{
background: transparent;
}
.nodeco{
text-decoration: none;
}
Loading…
Cancel
Save