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