aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/author-card.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-12-09 19:30:14 -0500
committertdro <tdro@noreply.example.com>2022-12-09 19:30:14 -0500
commit4250104277590526146a45df8af48a34e0f3df8b (patch)
tree24a3adcc484d086d814eb3a3c50909b4b0867569 /themes/default/layouts/partials/author-card.html
parent782b736c14cc10adf7bff908717516f616018082 (diff)
downloadcanory-4250104277590526146a45df8af48a34e0f3df8b.tar.gz
canory-4250104277590526146a45df8af48a34e0f3df8b.tar.bz2
canory-4250104277590526146a45df8af48a34e0f3df8b.zip
themes/default/layouts/partials: Add user@host in select places
Diffstat (limited to 'themes/default/layouts/partials/author-card.html')
-rw-r--r--themes/default/layouts/partials/author-card.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html
index 97ec9c2..3da9ab2 100644
--- a/themes/default/layouts/partials/author-card.html
+++ b/themes/default/layouts/partials/author-card.html
@@ -1,6 +1,12 @@
{{- $profile := .Data.picture.profile -}}
{{- $file := not (urls.Parse $profile).Host -}}
+{{- $host := (urls.Parse ("" | absURL)).Host -}}
+
+{{- if not $host -}}
+ {{- $host = "localhost" -}}
+{{- end -}}
+
{{- if $file -}}
{{- $profile = print .Data.user "/" $profile -}}
{{- end -}}
@@ -49,8 +55,12 @@
</figure>
</micro-thumbnail>
<micro-header>
- <h2><b>{{ .Data.name }}</b></h2>
- <h3><a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#">@{{ .Data.user }}</a></h3>
+ <h2>
+ <b>{{ .Data.name }}</b>
+ </h2>
+ <h3>
+ <a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#">{{ .Data.user }}@{{ $host }}</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">