diff options
author | tdro <tdro@noreply.example.com> | 2022-07-09 10:13:53 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-07-09 10:13:53 -0400 |
commit | 8e1256308c9c24fa45783a7c0be7ff74a33906ee (patch) | |
tree | b3c62a2f4eb6bfb0a0ac0c8e7563507a2677df6d /themes/default/layouts/partials/meta-handle.html | |
parent | 2b0c90bcf35d2a68a4ac4aabec6e9c04fd6e234f (diff) | |
download | canory-8e1256308c9c24fa45783a7c0be7ff74a33906ee.tar.gz canory-8e1256308c9c24fa45783a7c0be7ff74a33906ee.tar.bz2 canory-8e1256308c9c24fa45783a7c0be7ff74a33906ee.zip |
themes/default/layouts/partials/card-meta: Add icons
Dry up and normalize white spaces.
Diffstat (limited to 'themes/default/layouts/partials/meta-handle.html')
-rw-r--r-- | themes/default/layouts/partials/meta-handle.html | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/themes/default/layouts/partials/meta-handle.html b/themes/default/layouts/partials/meta-handle.html index ee7f975..459877a 100644 --- a/themes/default/layouts/partials/meta-handle.html +++ b/themes/default/layouts/partials/meta-handle.html @@ -1,13 +1,24 @@ -{{- with .Params.feed.domain -}} -<a - title="{{ . }}" - href="http://{{ . }}"> - @{{ . -}} -</a> +{{ $host := (urls.Parse .Site.BaseURL).Host -}} +{{- if (urls.Parse .Site.BaseURL).Host -}} + {{- $host = (urls.Parse .Site.BaseURL).Host -}} {{- else -}} -<a - title="{{ partial "author-user.html" . }}@{{ (urls.Parse .Site.BaseURL).Host }}" - href="{{ .Site.BaseURL }}/{{ partial "author-user.html" . }}/#"> - @{{ (urls.Parse .Site.BaseURL).Host -}} -</a> + {{- $host = "localhost" -}} {{- end -}} + +<micro-metadata-handle> + {{- safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/at-sign.svg")) -}} + {{- with .Params.feed.domain -}} + <a + title="{{ . }}" + href="http://{{ . }}"> + {{ . -}} + </a> + {{- else -}} + <a + title="{{ partial "author-user.html" . }}@{{ $host }}" + href="{{ .Site.BaseURL }}/{{ partial "author-user.html" . }}/#"> + {{- $host -}} + </a> + {{- end -}} +</micro-metadata-handle> +{{- /* This comment removes trailing newlines and white spaces. */ -}} |