LoveIt/layouts/partials/home/profile.html

33 lines
1.1 KiB
HTML
Raw Normal View History

2019-08-24 13:32:41 +02:00
<div class="home-intro">
2019-08-10 21:26:03 +02:00
{{ $avatar := "" }}
{{ if .Site.Params.gravatar.email }}
2019-08-10 21:26:03 +02:00
{{ $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) }}
{{ else if .Site.Params.avatar }}
2019-08-11 19:36:19 +02:00
{{ $avatar = .Site.Params.avatar }}
2019-08-10 21:26:03 +02:00
{{ end }}
{{ if $avatar }}
2019-08-24 13:32:41 +02:00
<div class="home-avatar">
<a href="/posts">
<img src={{ $avatar | relURL }} alt="avatar">
2019-08-10 21:26:03 +02:00
</a>
</div>
{{ end }}
{{ with .Site.Params.subtitle }}
2019-08-24 13:32:41 +02:00
<h2 class="home-description">
2019-08-10 21:26:03 +02:00
{{ $id := md5 . | printf "tp-%s" }}
<div id={{ printf "r%s" $id }} hidden=true>{{ . | safeHTML }}</div>
<div id={{ $id }} class="typeit"></div>
{{ with $.Scratch.Get "typeitMap" }}
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) }}
{{ else }}
{{ $.Scratch.Set "typeitMap" (dict $id (slice $id)) }}
{{ end }}
2019-08-10 21:26:03 +02:00
</h2>
{{ end }}
2019-08-24 13:32:41 +02:00
<div class="home-social-links">
2019-08-11 19:36:19 +02:00
{{ partial "home/social.html" . }}
2019-08-10 21:26:03 +02:00
</div>
</div>