2020-02-13 18:30:33 +01:00
|
|
|
<div class="home-profile">
|
2020-02-16 19:19:55 +01: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 15:53:04 +01:00
|
|
|
{{- end -}}
|
2020-02-16 19:19:55 +01:00
|
|
|
{{- with $avatar -}}
|
2019-08-24 13:32:41 +02:00
|
|
|
<div class="home-avatar">
|
2020-03-19 05:35:37 +01:00
|
|
|
<a href="/posts" title="{{ T `home` }}">
|
|
|
|
{{- partial "plugin/image.html" (dict "src" . "alt" (T "home")) -}}
|
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
|
|
|
|
2020-02-16 19:19:55 +01:00
|
|
|
{{- with .Site.Params.home.profile.subtitle -}}
|
2020-03-16 18:03:08 +01:00
|
|
|
<h2 class="home-subtitle">
|
2020-02-16 19:19:55 +01:00
|
|
|
{{- if $.Site.Params.home.profile.typeit -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- $id := partial "function/id.html" (dict "content" . "scratch" $.Scratch) -}}
|
2020-02-27 13:14:40 +01:00
|
|
|
<div id="{{ $id }}" class="typeit"></div>
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
|
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
|
|
|
|
2020-03-16 18:03:08 +01:00
|
|
|
{{- if .Site.Params.home.profile.social -}}
|
2020-04-24 13:04:37 +02:00
|
|
|
<div class="social-links">
|
|
|
|
{{- $socialMap := resources.Get "data/social.yaml" | transform.Unmarshal -}}
|
|
|
|
{{- $socialArr := slice -}}
|
|
|
|
{{- range $key, $value := .Site.Params.social -}}
|
|
|
|
{{- $social := $key | lower | index $socialMap | default dict -}}
|
|
|
|
{{- if $value -}}
|
|
|
|
{{- if reflect.IsMap $value -}}
|
|
|
|
{{- $social = $value | merge $social -}}
|
|
|
|
{{- else if ne $value true -}}
|
|
|
|
{{- $social = dict "id" $value | merge $social -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if $social.icon.simpleicons -}}
|
|
|
|
{{- $prefix := ($.Scratch.Get "cdn" | default dict).simpleIconsPrefix -}}
|
|
|
|
{{- $social = dict "prefix" $prefix | dict "icon" | merge $social -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- $socialArr = $socialArr | append $social -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- range sort $socialArr "weight" -}}
|
|
|
|
{{- partial "plugin/social.html" . -}}
|
|
|
|
{{- end -}}
|
|
|
|
</div>
|
2020-03-16 18:03:08 +01:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- with .Site.Params.home.profile.disclaimer -}}
|
|
|
|
<h3 class="home-disclaimer">
|
|
|
|
{{- . | safeHTML -}}
|
|
|
|
</h3>
|
|
|
|
{{- end -}}
|
2019-08-10 21:26:03 +02:00
|
|
|
</div>
|