site/themes/hugoplate/layouts/partials/components/author-card.html

44 lines
1.3 KiB
HTML
Executable file

<div
class="bg-theme-light dark:bg-darkmode-theme-light rounded p-8 text-center">
{{ $image:= .Params.image }}
{{ if $image }}
<a href="{{ .RelPermalink }}" class="logo-author">
{{ partial "image" (dict "Src" $image "Context" .Page "Alt" .Title "Class" "mx-auto mb-6 rounded" "size" "200x200") }}
</a>
{{ end }}
<h4 class="mb-3">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h4>
<div class="descriptif-author">
<p class="mb-4">
{{ .Description }}
</p>
</div>
<ul class="social-icons">
{{ if .Params.website }}
<li>
<a href="{{ .Params.website | safeURL }}" target="_blank" rel="noopener nofollow">
<span class="sr-only">Site internet</span>
<i class="fas fa-globe"></i>
</a>
</li>
{{ end }}
{{ if .Params.email }}
<li>
<a href="mailto:{{ .Params.email }}" target="_blank" rel="noopener nofollow">
<span class="sr-only">Courriel</span>
<i class="fas fa-envelope"></i>
</a>
</li>
{{ end }}
{{ range .Params.social }}
<li>
<a href="{{ .link | safeURL }}" target="_blank" rel="noopener nofollow">
<span class="sr-only">{{ .title }}</span>
<i class="{{ .icon }}"></i>
</a>
</li>
{{ end }}
</ul>
</div>