squirrel/layouts/partials/team.html

45 lines
1.9 KiB
HTML
Raw Normal View History

{{- $team := .team }}
2022-06-27 16:09:44 +02:00
{{- $pages := .pages}}
{{- $defaultimage := .defaultimage}}
{{- $odd := .odd }}
2022-06-27 16:09:44 +02:00
{{- $id := "team"}}
{{if $team.id}}
{{- $id = $team.id}}
2022-06-27 16:09:44 +02:00
{{else if .id}}
{{- $id = .id }}
2022-06-27 16:09:44 +02:00
{{end}}
<div id="{{ $id }}" class="section {{if eq $odd 0}} section-even {{end}}">
2021-02-25 22:23:58 +01:00
<div class="section-content team">
{{ partial "components/title.html" $team.title }}
<div class="list">
{{- range first 4 ((where $pages "Params.leaveDate" "==" nil).ByParam "startDate") }}
2022-06-27 16:09:44 +02:00
<a href="{{.Permalink}}">
<div class="member">
2022-06-27 16:09:44 +02:00
{{ if .Params.image }}
{{- partial "components/image.html" (dict "style" "avatar" "url" .Params.image "alt" .Params.name) -}}
2022-06-27 16:09:44 +02:00
{{ else }}
{{- partial "components/image.html" (dict "style" "avatar" "url" $defaultimage "alt" "Placeholder") -}}
2022-06-27 16:09:44 +02:00
{{ end }}
<h1 class="teammember-title">{{ .Params.name }}</h1>
{{- range .Params.jobs }}
<p>{{ . }}</p>
{{- end }}
<div class="social-media">
<span>
{{- range .Params.social}}
{{ partial "components/icon.html" . }}
2022-06-27 16:09:44 +02:00
{{- end}}
{{ if .Params.mail }}
{{ $mailto := "mailto:{{ .Params.mail }}" }}
{{ partial "components/icon.html" (dict "type" "at" "url" $mailto) }}
{{ end }}
2022-06-27 16:09:44 +02:00
</span>
</div>
</div>
</a>
2021-02-25 22:23:58 +01:00
{{- end }}
</div>
{{ partial "components/button.html" (dict "type" "text block" "url" $team.id "text" ($team.more | default "More")) }}
2021-02-25 22:23:58 +01:00
</div>
</div>