2022-07-01 11:39:37 +00:00
|
|
|
{{ define "opengraph" }}
|
2022-07-01 12:54:41 +00:00
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
2022-07-01 11:39:37 +00:00
|
|
|
<meta property="og:type" content="article" />
|
|
|
|
{{ with .Site.LanguageCode }}
|
|
|
|
<meta property="og:locale" content='{{ replace . "-" "_" }}' />
|
|
|
|
{{ end }}
|
|
|
|
<meta property="og:title" content="{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
2022-07-01 12:54:41 +00:00
|
|
|
<meta name="twitter:title" content="{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
2022-07-01 11:39:37 +00:00
|
|
|
<meta property="og:url" content="{{ .Permalink }}" />
|
|
|
|
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
|
|
|
{{ if .Params.image }}
|
|
|
|
<meta property="og:image" content="{{ .Params.image | absURL }}" />
|
2022-07-01 12:54:41 +00:00
|
|
|
<meta name="twitter:image" content="{{ .Params.image | absURL }}" />
|
2022-07-01 11:39:37 +00:00
|
|
|
{{ else }}
|
|
|
|
<meta property="og:image" content="{{ .Site.Params.logo | absURL }}" />
|
2022-07-01 12:54:41 +00:00
|
|
|
<meta name="twitter:image" content="{{ .Site.Params.logo | absURL }}" />
|
2022-07-01 11:39:37 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ if .Params.summary }}
|
|
|
|
<meta property="og:description" content="{{ .Params.summary }}" />
|
2022-07-01 12:54:41 +00:00
|
|
|
<meta name="twitter:description" content="{{ .Params.summary }}" />
|
2022-07-01 11:39:37 +00:00
|
|
|
{{ else if .Content }}
|
|
|
|
<meta property="og:description" content="{{ .Content | safeHTML | truncate 100 }}" />
|
2022-07-01 12:54:41 +00:00
|
|
|
<meta name="twitter:description" content="{{ .Params.summary }}" />
|
2022-07-01 11:39:37 +00:00
|
|
|
{{ else }}
|
|
|
|
<meta property="og:description" content="{{ .Site.Params.Description }}" />
|
2022-07-01 12:54:41 +00:00
|
|
|
<meta name="twitter:description" content="{{ .Params.summary }}" />
|
2022-07-01 11:39:37 +00:00
|
|
|
{{ end }}
|
|
|
|
<meta property="article:published_time" content='{{.Date.Format "2006-01-02"}}' />
|
|
|
|
{{ with .Params.author }}
|
|
|
|
<meta property="article:author" content="{{ . }}" />
|
|
|
|
{{ end }}
|
|
|
|
<meta property="article:section" content="Blog" />
|
|
|
|
{{ with .Params.tags }}
|
|
|
|
{{ range . }}
|
|
|
|
<meta property="article:tag" content="{{ . }}" />
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-07-01 12:54:41 +00:00
|
|
|
|
|
|
|
|
2022-07-01 11:39:37 +00:00
|
|
|
{{ end }}
|
|
|
|
|
2022-06-27 14:09:44 +00:00
|
|
|
{{ define "main" }}
|
|
|
|
{{ with .Params.image }}
|
2022-07-08 15:35:15 +00:00
|
|
|
<img class="coverimage {{ if eq .cover false }} noCover {{ end }}" alt="{{ .alt }}" src="{{ .url }}" />
|
2022-07-08 14:59:07 +00:00
|
|
|
{{ with .copyright }}
|
|
|
|
<div class="image-copyright">© {{ . }}</div>
|
|
|
|
{{ end }}
|
2022-06-27 14:09:44 +00:00
|
|
|
{{ end }}
|
|
|
|
<div class="content">
|
|
|
|
{{ with .Params.tags }}
|
|
|
|
<div id="tags">
|
|
|
|
{{ range . }}
|
|
|
|
<a href="{{ "tags" | absURL }}/{{ . | urlize }}/">#{{ . }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
<div class="title">
|
|
|
|
<h1 class="content-title">{{ .Title }}</h1>
|
|
|
|
<div class="post-detail">{{.Date.Format "02.01.2006"}} - ⏱ {{.ReadingTime}} Minuten</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
</div>
|
|
|
|
{{ .Content }}
|
|
|
|
{{- $author := .Params.author }}
|
|
|
|
{{ with .Site.GetPage "/team" }}
|
|
|
|
{{- range .RegularPages -}}
|
|
|
|
{{if eq .Params.name $author}}
|
|
|
|
<a href="{{.Permalink}}">
|
|
|
|
<div class="author">
|
|
|
|
{{ if .Params.image }}
|
2022-07-08 15:35:15 +00:00
|
|
|
<img class="avatar-small" src="{{ .Params.image }}" alt="{{ .Params.name }} Avatar">
|
2022-06-27 14:09:44 +00:00
|
|
|
{{ else }}
|
2022-07-08 15:35:15 +00:00
|
|
|
<img class="avatar-small" src="{{ $.Site.Params.defaultimage }}" alt="Default Avatar">
|
2022-06-27 14:09:44 +00:00
|
|
|
{{ end }}
|
|
|
|
<h4 class="author-title">{{ .Params.name }}</h4>
|
|
|
|
<div class="social-media">
|
|
|
|
<span>
|
|
|
|
{{- range .Params.social}}
|
|
|
|
<a href="{{ .url }}"><i class="fab fa-{{ .type }}"></i></a>
|
|
|
|
{{- end}}
|
|
|
|
{{if .Params.mail}}
|
|
|
|
<a href="mailto:{{ .Params.mail }}"><i class="fas fa-at"></i></a>
|
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|