aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/context-profile.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials/context-profile.html')
-rw-r--r--themes/default/layouts/partials/context-profile.html37
1 files changed, 18 insertions, 19 deletions
diff --git a/themes/default/layouts/partials/context-profile.html b/themes/default/layouts/partials/context-profile.html
index c64e4a2..5150128 100644
--- a/themes/default/layouts/partials/context-profile.html
+++ b/themes/default/layouts/partials/context-profile.html
@@ -1,35 +1,34 @@
-{{ $author := index .Site.Data ((or .Params.author .Site.Author.default.user) | default "default") }}
+{{- $author := partial "function-authors-data.html" . -}}
+{{- $description := or .Params.feed.description ($author.description | markdownify) -}}
+{{- $name := or .Params.feed.name $author.name -}}
+{{- $host := or (urls.Parse .Site.BaseURL).Host "localhost" -}}
+{{- $author := .Section -}}
+{{- $href := print ("" | absURL) "/" $author "/" -}}
+{{- $title := print $author "@" $host -}}
+
+{{- with .Params.feed -}}
+ {{- $host = $.Params.feed.domain -}}
+ {{- $href = or $.Params.feed.home (print "http://" $.Params.feed.domain) -}}
+ {{- $title = $.Params.feed.domain -}}
+{{- end -}}
<context-profile>
<context-menu>
<div>
<aside>
<figure>
- {{- with .Params.feed.name -}}
- <a title="{{ . }}" href="http://{{ $.Params.feed.domain }}">
- {{- else -}}
- <a title="{{ $author.name }}" href="{{ .Site.BaseURL }}/{{ $author.user }}/#">
- {{- end -}}
+ <a title="{{ $name }}" href="{{ $href }}">
<picture>
- {{ partial "author-picture" . }}
+ {{ partial "author-picture" . }}
</picture>
</a>
</figure>
</aside>
<aside>
- {{- with .Params.feed.name -}}
- <h2>{{ . }}</h2>
- <p>@{{ $.Params.feed.domain }}</p>
- {{- else -}}
- <h2>{{ $author.name }}</h2>
- <p>@{{ $author.user }}</p>
- {{- end -}}
+ <h2>{{ $name }}</h2>
+ <p>@{{ $host }}</p>
</aside>
</div>
- {{- with .Params.feed.description -}}
- <p>{{ . }}</p>
- {{- else -}}
- <p>{{- $author.description | markdownify -}}</p>
- {{- end -}}
+ <p>{{ $description }}</p>
</context-menu>
</context-profile>