Extend Theme

This commit is contained in:
Hoernschen 2022-06-27 16:09:44 +02:00
parent 7239b2c45e
commit 0cf0202035
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
29 changed files with 802 additions and 169 deletions

View file

@ -1,33 +1,46 @@
{{- $team := .team }}
{{ $length := len $team.members }}
{{- $pages := .pages}}
{{- $defaultimage := .defaultimage}}
{{- $odd := .odd }}
<div id="{{ $team.id }}" class="section {{if eq $odd 0}} section-even {{end}}">
{{- $id := "team"}}
{{if $team.id}}
{{- $id := $team.id}}
{{else if .id}}
{{- $id := .id }}
{{end}}
<div id="{{ $id }}" class="section {{if eq $odd 0}} section-even {{end}}">
<div class="section-content team">
<div class="title">
<h1 class="content-title">{{ $team.title }}</h1>
<div class="divider"></div>
</div>
{{- range first 3 $team.members }}
<div class="teammember">
<img class="avatar" src="{{ .image }}" alt="Avatar">
<h1 class="teammember-title">{{ .name }}</h1>
{{- range .jobs }}
<p>{{ . }}</p>
<div class="team-list">
{{- range first 4 $pages.ByDate }}
<a href="{{.Permalink}}">
<div class="teammember">
{{ if .Params.image }}
<img class="avatar" src="{{ .Params.image }}" alt="Avatar">
{{ else }}
<img class="avatar" src="{{ $defaultimage }}" alt="Avatar">
{{ end }}
<h1 class="teammember-title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}
<p>{{ . }}</p>
{{- end }}
<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 }}
<div class="social-media">
<span>
{{- range .social}}
<a href="{{ .url }}"><i class="fab fa-{{ .type }}"></i></a>
{{- end}}
{{if .mail}}
<a href="mailto:{{ .mail }}"><i class="fas fa-at"></i></a>
{{end}}
</span>
</div>
</div>
{{- end }}
{{if gt $length 3}}
<div><a href="#"> > Weitere Teammitglieder < </a></div>
{{end}}
<div class="more-button"><a href="{{ $team.id }}"> {{ $team.moretext }} </a></div>
</div>
</div>