LoveIt/layouts/partials/home/profile.html

38 lines
1.3 KiB
HTML
Raw Normal View History

2020-02-24 10:00:39 +01:00
{{- $scratch := .Scratch.Get "scratch" -}}
2020-02-13 18:30:33 +01:00
<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" -}}
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- with $avatar -}}
2019-08-24 13:32:41 +02:00
<div class="home-avatar">
<a href="/posts">
2020-02-27 13:14:40 +01:00
{{- partial "plugin/image.html" (dict "src_s" . "title" "avatar" "description" (T "home") "scratch" $scratch) -}}
2019-08-10 21:26:03 +02:00
</a>
</div>
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-10 21:26:03 +02:00
{{- with .Site.Params.home.profile.subtitle -}}
<h2 class="home-subtitle">
{{- if $.Site.Params.home.profile.typeit -}}
2020-02-27 13:14:40 +01:00
{{- $id := partial "function/id.html" (dict "content" . "scratch" $scratch) -}}
<div id="{{ $id }}" class="typeit"></div>
2020-02-24 10:00:39 +01:00
{{- $scratch.SetInMap "typeitMap" $id (slice $id) -}}
2020-01-31 15:53:04 +01:00
{{- else -}}
2020-02-24 10:00:39 +01:00
{{- . -}}
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-10 21:26:03 +02:00
</h2>
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-10 21:26:03 +02:00
{{- 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 -}}
2019-08-10 21:26:03 +02:00
</div>