LoveIt/layouts/partials/home/profile.html

37 lines
1.3 KiB
HTML

{{- $scratch := .Scratch.Get "scratch" -}}
<div class="home-profile">
{{- $avatar := .Site.Params.home.profile.avatarURL -}}
{{- with .Site.Params.home.profile.gravatarEmail -}}
{{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" -}}
{{- end -}}
{{- with $avatar -}}
<div class="home-avatar">
<a href="/posts" title="{{ T `home` }}">
{{- partial "plugin/image.html" (dict "src" . "alt" (T "home")) -}}
</a>
</div>
{{- end -}}
{{- with .Site.Params.home.profile.subtitle -}}
<h2 class="home-subtitle">
{{- if $.Site.Params.home.profile.typeit -}}
{{- $id := partial "function/id.html" (dict "content" . "scratch" $scratch) -}}
<div id="{{ $id }}" class="typeit"></div>
{{- $scratch.SetInMap "typeitMap" $id (slice $id) -}}
{{- else -}}
{{- . -}}
{{- end -}}
</h2>
{{- end -}}
{{- if .Site.Params.home.profile.social -}}
{{- partial "plugin/social.html" (dict "social" .Site.Params.social "scratch" $scratch) -}}
{{- end -}}
{{- with .Site.Params.home.profile.disclaimer -}}
<h3 class="home-disclaimer">
{{- . | safeHTML -}}
</h3>
{{- end -}}
</div>