aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta-handle.html
blob: 4ec23e47bec3ee5223f8ecdda3e4869a3a559c54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{{- $author := partial "function-authors-data.html" . -}}

{{- $host := (urls.Parse .Site.BaseURL).Host -}}
{{- $href := print .Site.BaseURL "/" $author.user "/#" -}}

{{- if not $host -}}
  {{- $host = "localhost" -}}
{{- end -}}

{{- $title := print $author.user "@" $host -}}

{{- with .Params.feed -}}
  {{- $host  = $.Params.feed.domain -}}
  {{- $href  = or $.Params.feed.home (print "http://" $.Params.feed.domain) -}}
  {{- $title = $.Params.feed.domain -}}
{{- end -}}

<micro-metadata-handle>
{{- /* This comment removes trailing newlines and white spaces. */ -}}
  <a
    title="{{ $title }}"
    href="{{ $href }}">
    {{- safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/at-sign.svg")) -}}
    <span>{{- $host -}}</span>
{{- /* This comment removes trailing newlines and white spaces. */ -}}
  </a>
{{- /* This comment removes trailing newlines and white spaces. */ -}}
</micro-metadata-handle>
{{- /* This comment removes trailing newlines and white spaces. */ -}}