Welcome to mirror list, hosted at ThFree Co, Russian Federation.

author_card.html « partials « layouts - github.com/shaform/hugo-theme-den.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b527ca3789f90a67bb71179f39c6a318f46b493b (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
{{- with $author := index (.context.Site.Data.authors | default dict) .author -}}
  {{- $author_lang := index $author $.context.Site.Language.Lang | default $author -}}
  {{- $author_name := $author_lang.name.display | default $author.name.display | default $.author -}}
  {{- $author_desc := $author_lang.description | default $author.description | default $.author -}}
  {{- $author_image := $author_lang.image.url | default $author.image.url | default "images/blank-profile.png" -}}
  {{- $author_url := $author_lang.url | default $author.url -}}
  <div class="author-card">
    <div class="underline"></div>
    <div class="author-box">
      <div class="author-image">
        {{- with $author_url -}}
          <a href="{{ $author_url | relLangURL }}"><img src="{{ $author_image | relURL }}" alt="{{ $author_name }}" /></a>
        {{- else -}}
          <img src="{{ $author_image | relURL }}" />
        {{- end -}}
      </div>
      <div class="author-content">
      <p class="author-title">{{ i18n "author" }}</p>
      <p class="author-name">{{ $author_name }}</p>
      <p class="author-desc">{{ $author_desc | markdownify }}</p>
      </div>
    </div>
  </div>
{{- end -}}