mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00:00
refactor: site.params.avatar -> site.Params.features.avatar
BREAKING CHANGE See #2601
This commit is contained in:
1 parent
284560727c
commit
dba78beda6
4 files changed
+9
-9
No files matched your search
@@ -11,9 +11,9 @@
|
||||
{{ $profile_url = site.BaseURL }}
|
||||
{{ end }}
|
||||
{{ $avatar := ($author_page.Resources.ByType "image").GetMatch "*avatar*" }}
|
||||
{{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
|
||||
{{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }}
|
||||
<div class="media author-card content-widget-hr">
|
||||
{{ if and site.Params.avatar.gravatar $author_page.Params.email }}
|
||||
{{ if and site.Params.features.avatar.gravatar $author_page.Params.email }}
|
||||
{{if $profile_url}}<a href="{{$profile_url}}">{{end}}<img class="avatar mr-3 {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="https://s.gravatar.com/avatar/{{ md5 $author_page.Params.email }}?s=200" alt="{{$author_page.Title}}">{{if $profile_url}}</a>{{end}}
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "270x270 Center" }}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{end}}
|
||||
{{ $person := $person_page.Params }}
|
||||
{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }}
|
||||
{{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
|
||||
{{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }}
|
||||
|
||||
<div id="profile">
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
{{end}}
|
||||
{{ $person := $person_page.Params }}
|
||||
{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }}
|
||||
{{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
|
||||
{{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }}
|
||||
|
||||
<!-- About widget -->
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4">
|
||||
<div id="profile">
|
||||
|
||||
{{ if site.Params.avatar.gravatar }}
|
||||
{{ if site.Params.features.avatar.gravatar }}
|
||||
<img class="avatar {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="https://s.gravatar.com/avatar/{{ md5 $person.email }}?s=270')" alt="{{$person_page.Title}}">
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "270x270 Center" }}
|
||||
@@ -32,7 +32,7 @@
|
||||
{{ end }}
|
||||
|
||||
<div class="portrait-title">
|
||||
|
||||
|
||||
<h2>
|
||||
{{- if $person.name_pronunciation -}}
|
||||
<ruby>
|
||||
@@ -43,7 +43,7 @@
|
||||
{{- $person_page.Title -}}
|
||||
{{- end -}}
|
||||
</h2>
|
||||
|
||||
|
||||
{{ with $person.role }}<h3>{{ . | markdownify | emojify }}</h3>{{ end }}
|
||||
|
||||
{{ range $person.organizations }}
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
{{ end }}
|
||||
<div class="col-12 col-sm-auto people-person">
|
||||
{{ $src := "" }}
|
||||
{{ if site.Params.avatar.gravatar }}
|
||||
{{ if site.Params.features.avatar.gravatar }}
|
||||
{{ $src = printf "https://s.gravatar.com/avatar/%s?s=150" (md5 .Params.email) }}
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "270x270 Center" }}
|
||||
{{ $src = $avatar_image.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ if $src }}
|
||||
{{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
|
||||
{{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }}
|
||||
{{with $link}}<a href="{{.}}">{{end}}<img width="270" height="270" loading="lazy" class="avatar {{if eq $avatar_shape "square"}}avatar-square{{else}}avatar-circle{{end}}" src="{{ $src }}" alt="Avatar">{{if $link}}</a>{{end}}
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in new issue
Block a user