squirrel/layouts/team/single.html

53 lines
No EOL
2.5 KiB
HTML

{{ define "main" }}
<div class="content">
<div class="teammember-header">
{{ with .Params.image }}
<img class="teammember-header-avatar" src="{{ . }}" alt="Avatar">
{{ end }}
<div>
<div class="teammember-header-title">
<h1 class="content-title">{{ .Params.name }}</h1>
<div class="teammember-header-social-media">
<span>
{{- range .Params.social}}
<a href="{{ .url }}"><i class="icon-{{ .type }}"></i></a>
{{- end}}
{{if .Params.mail}}
<a href="mailto:{{ .Params.mail }}"><i class="icon-at"></i></a>
{{end}}
</span>
</div>
<div class="divider"></div>
</div>
{{ with .Params.leaveDate }}
<p>Bis zum {{ . | time.Format "02.01.2006" }} bei uns tätig</p>
{{ end }}
</div>
</div>
{{ .Content }}
{{- $name := .Params.name }}
{{- $defaultimage := .Site.Params.defaultimage }}
<div class="cardList teammember-posts">
{{ with .Site.GetPage "/posts" }}
{{- range .RegularPages -}}
{{if eq .Params.author $name}}
<div class="card">
<a href="{{.Permalink}}">
<div class="cardContent">
{{ if .Params.image }}
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" alt="{{ .Params.image.alt }}" src="{{ .Params.image.url }}" />
{{ else }}
<img class="cardImage" src="{{ .Site.Params.defaultimage }}" alt="Default Image" />
{{ end }}
<div class="cardTitle">{{.Title}}</div>
<div class="cardDescription">{{ .Summary | safeHTML | truncate 320 }}</div>
<div class="cardDetail">{{.Date.Format "02.01.2006"}} | {{.ReadingTime}} Minuten</div>
</div>
</a>
</div>
{{end}}
{{ end }}
{{ end }}
</div>
</div>
{{ end }}