mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-15 03:16:30 +01:00
34 lines
1.2 KiB
HTML
34 lines
1.2 KiB
HTML
<div class="home-profile">
|
|
{{- $avatar := "" -}}
|
|
{{- if .Site.Params.gravatar.email -}}
|
|
{{- $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) -}}
|
|
{{- else if .Site.Params.avatar -}}
|
|
{{- $avatar = .Site.Params.avatar -}}
|
|
{{- end -}}
|
|
{{- if $avatar -}}
|
|
<div class="home-avatar">
|
|
<a href="/posts">
|
|
<img src={{ $avatar | relURL }} alt="avatar" title="{{ T "home" }}">
|
|
</a>
|
|
</div>
|
|
{{- end -}}
|
|
|
|
{{- with .Site.Params.subtitle -}}
|
|
<h2 class="home-description">
|
|
{{- $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 -}}
|
|
</h2>
|
|
{{- end -}}
|
|
|
|
<div class="home-social-links">
|
|
{{- partial "home/social.html" . -}}
|
|
</div>
|
|
</div>
|