aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/context-profile.html
blob: 609d0457d8500ceff034fb0c4b39ad0f184a4e00 (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
30
31
32
33
34
35
36
37
38
39
40
41
{{- $author := partial "function-authors-data.html" . -}}
{{- $description := or .Params.feed.description ($author.description | markdownify) -}}
{{- $name := or .Params.feed.name $author.name -}}
{{- $user := $author.user -}}

{{- $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 -}}
  {{- $user = "" -}}
{{- end -}}

<context-profile>
  <context-menu>
    <div>
      <aside>
      <figure>
        <a title="{{ $name }}" href="{{ $href }}">
          <picture>
            {{ partial "author-picture" . }}
          </picture>
        </a>
      </figure>
      </aside>
      <aside>
        <h2>{{ $name }}</h2>
        <p>{{ $user }}@{{ $host }}</p>
      </aside>
    </div>
    <p>{{ $description }}</p>
  </context-menu>
</context-profile>