119 lines
5.6 KiB
HTML
119 lines
5.6 KiB
HTML
{{- $pages := .Pages -}}
|
|
{{- if .IsHome -}}
|
|
{{- $pages = where .Site.RegularPages "Section" "in" .Site.MainSections -}}
|
|
{{- end -}}
|
|
{{- $paginator := .Paginate (where $pages "Params.displayinlist" "!=" false) -}}
|
|
<!DOCTYPE html>
|
|
<html lang="{{ .Site.Language.Locale }}" dir="{{ or .Site.Language.Direction "ltr" }}">
|
|
{{ partial "head.html" . }}
|
|
<body class="list-body home-body">
|
|
<a class="skip-link" href="#main-content">Skip to content</a>
|
|
{{ partial "nav-bar.html" . }}
|
|
<main id="main-content" class="site-main home-main" tabindex="-1">
|
|
{{ $profile := .Site.Params.profile | default dict }}
|
|
{{ if isset .Params "profile" }}
|
|
{{ $profile = .Params.profile | default dict }}
|
|
{{ end }}
|
|
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
|
|
<header class="home-hero side-padding">
|
|
<div class="home-hero-grid">
|
|
<div class="home-hero-copy">
|
|
{{ with (.Params.eyebrow | default "" | strings.TrimSpace) }}<p class="hero-eyebrow">{{ . | markdownify }}</p>{{ end }}
|
|
{{ with .Title }}<h1 class="home-hero-title">{{ . | markdownify }}</h1>{{ end }}
|
|
{{ with .Description }}<p class="home-hero-text">{{ . | markdownify }}</p>{{ end }}
|
|
{{ if or $profile.name $profile.jobtitle $profile.location }}
|
|
<div class="hero-signals" role="group" aria-label="Author details">
|
|
{{ with $profile.name }}
|
|
<span class="hero-signal">{{ . }}</span>
|
|
{{ end }}
|
|
{{ with $profile.jobtitle }}
|
|
{{ $briefcase := resources.Get "icons/briefcase.svg" }}
|
|
<span class="hero-signal">{{ with $briefcase }}<span class="hero-signal-icon" style="{{ printf "--signal-icon: url('%s');" .RelPermalink | safeCSS }}" aria-hidden="true"></span>{{ end }}{{ . }}</span>
|
|
{{ end }}
|
|
{{ with $profile.location }}
|
|
{{ $locationIcon := resources.Get "icons/map-marker-home.svg" }}
|
|
<span class="hero-signal">{{ with $locationIcon }}<span class="hero-signal-icon" style="{{ printf "--signal-icon: url('%s');" .RelPermalink | safeCSS }}" aria-hidden="true"></span>{{ end }}{{ . }}</span>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
{{ with $profile.headshotimage -}}
|
|
{{ $headshot := $.Resources.GetMatch . }}
|
|
{{ if not $headshot }}{{ $headshot = resources.GetMatch . }}{{ end }}
|
|
{{ with $headshot -}}
|
|
<div class="home-headshot-card">
|
|
{{ partial "responsive-image.html" (dict
|
|
"image" .
|
|
"class" "home-headshot"
|
|
"alt" $profile.headshotalt
|
|
"widths" (slice 272 544 816)
|
|
"sizes" "(min-width: 760px) clamp(240px, 27vw, 340px), 220px"
|
|
"loading" "eager"
|
|
) }}
|
|
</div>
|
|
{{ end }}
|
|
{{ end -}}
|
|
</div>
|
|
</header>
|
|
{{- end }}
|
|
{{ with .Content -}}
|
|
<section class="list-header-content side-padding">
|
|
{{ . }}
|
|
</section>
|
|
{{- end }}
|
|
<section id="writing" class="writing-section side-gutter" aria-labelledby="writing-title">
|
|
<div class="writing-layout">
|
|
<div class="writing-column">
|
|
<header class="section-header">
|
|
<h2 id="writing-title">{{ with .Params.writingtitle }}{{ . }}{{ else }}Recent Posts{{ end }}</h2>
|
|
{{ with .Params.writingsubtitle }}<p class="section-subtitle">{{ . }}</p>{{ end }}
|
|
</header>
|
|
<div class="post-list">
|
|
{{- range $paginator.Pages -}}
|
|
{{ .Render "li" }}
|
|
{{- end }}
|
|
</div>
|
|
{{ if or ($paginator.HasPrev) ($paginator.HasNext) -}}
|
|
<nav class="pagination-nav" aria-label="Writing pagination">
|
|
{{ if $paginator.HasPrev }}<a href="{{ $paginator.Prev.URL }}" class="pagination-newer pagination-text">← Newer Posts</a>{{ end }}
|
|
{{ if $paginator.HasNext }}<a href="{{ $paginator.Next.URL }}" class="pagination-older pagination-text">Older Posts →</a>{{ end }}
|
|
</nav>
|
|
{{- end }}
|
|
</div>
|
|
{{ $aboutLabel := or $profile.name .Site.Title }}
|
|
<aside class="home-about-rail" aria-label="{{ printf "About %s" $aboutLabel }}">
|
|
{{ with .Params.about }}
|
|
<section class="rail-section">
|
|
<h2 class="rail-label">Für Dich</h2>
|
|
<div class="rail-about">{{ . | markdownify }}</div>
|
|
</section>
|
|
{{ end }}
|
|
{{ with .Site.Taxonomies.categories }}
|
|
<section class="rail-section">
|
|
<h2 class="rail-label">Topics</h2>
|
|
<ul class="rail-topic-list">
|
|
{{ range $name, $taxonomy := . }}
|
|
{{ with $.Site.GetPage (printf "/categories/%s" ($name | urlize)) }}
|
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
|
{{ else }}
|
|
<li><a href="{{ printf "/categories/%s/" ($name | urlize) | relURL }}">{{ $name | title }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|
|
{{ end }}
|
|
{{ if .Site.Params.socials }}
|
|
<section class="rail-section">
|
|
<h2 class="rail-label">Connect</h2>
|
|
{{ partial "social-links.html" (dict "context" . "class" "rail-links") }}
|
|
</section>
|
|
{{ end }}
|
|
</aside>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
{{ partial "footer.html" . }}
|
|
{{ partial "scripts.html" . }}
|
|
</body>
|
|
</html>
|