diff options
author | tdro <tdro@noreply.example.com> | 2022-08-28 00:20:56 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-08-28 00:20:56 -0400 |
commit | e37d3d3649c4931e552af3999f30dd67a901b2dc (patch) | |
tree | 1e0a1c4b6da9bb15c621b9e973c2c497411fdbac | |
parent | e6a617328c3b34ab831767645a63893f6bae92c2 (diff) | |
download | canory-e37d3d3649c4931e552af3999f30dd67a901b2dc.tar.gz canory-e37d3d3649c4931e552af3999f30dd67a901b2dc.tar.bz2 canory-e37d3d3649c4931e552af3999f30dd67a901b2dc.zip |
themes/default/layouts/partials/author-card: Picture may be copied from remote
-rw-r--r-- | themes/default/layouts/partials/author-card.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html index 953f833..557abdd 100644 --- a/themes/default/layouts/partials/author-card.html +++ b/themes/default/layouts/partials/author-card.html @@ -1,8 +1,13 @@ {{- $profile := .Data.picture.profile -}} +{{- $file := not (urls.Parse $profile).Host -}} + +{{- if $file -}} + {{- $profile = print .Data.user "/" $profile -}} +{{- end -}} {{- $image := partial "function-caches-images.html" (dict - "Source" (print .Data.user "/" $profile) + "Source" $profile "Fit" "160x160" "Target" (print (partial "function-paths.html" "media") "/" .Data.user "/") "Copy" (print (partial "function-paths.html" "media") "/" .Data.user "/" (path.Base $profile)) @@ -43,14 +48,11 @@ </a> </figure> </micro-thumbnail> - <micro-header> <h2><b>{{ .Data.name }}</b></h2> <h3><a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#">@{{ .Data.user }}</a></h3> </micro-header> - <p>{{ .Data.description | markdownify | plainify | htmlUnescape | truncate 60 "..." }}</p> - <a title="Follow with RSS Reader" href="{{ "" | absURL }}/{{ .Data.user }}/rss.xml"> {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/rss.svg")) }} <span>Follow</span> |