jlelse
/
Indieroad
Archived
1
Fork 0

Add back author avatar

This commit is contained in:
Jan-Lukas Else 2019-12-04 11:00:15 +01:00
parent 43acb7f604
commit 6e7b9bd081
2 changed files with 21 additions and 4 deletions

View File

@ -592,11 +592,23 @@ select {
/* Authorbox */ /* Authorbox */
.authorbox { .authorbox {
@include subarticle-element; @include subarticle-element;
@extend .clearfix;
line-height: 1.5; line-height: 1.5;
display: block; display: block;
@media screen and (max-width: $break1) { @media screen and (max-width: $break1) {
text-align: center; text-align: center;
} }
.author-avatar {
float: left;
margin: 0 25px 0 0;
height: 90px;
width: 90px;
@media screen and (max-width: $break1) {
display: inline-block;
float: none;
margin: 0 0 20px;
}
}
.author-header { .author-header {
margin-bottom: 10px; margin-bottom: 10px;
} }

View File

@ -1,16 +1,21 @@
{{- if .Param "authorbox" }} {{- if .Param "authorbox" }}
{{- with .Site.Author }} {{- with .Site.Author }}
<div class="authorbox p-author h-card"> <div class="authorbox p-author h-card">
{{- if .name }} {{ if .avatar }}
<figure class="author-avatar">
<img class="u-photo" alt="{{ .name }}" src="{{ .avatar | relURL }}">
</figure>
{{ end }}
{{ if .name }}
<div class="author-header"> <div class="author-header">
<span class="author-name">{{ T "authorbox_name" }} {{ if .link }}<a href="{{ .link }}" class="p-name u-url" rel="me">{{ .name }}</a>{{ else }}<span class="p-name">{{ .name }}</span>{{ end }}</span> <span class="author-name">{{ T "authorbox_name" }} {{ if .link }}<a href="{{ .link }}" class="p-name u-url" rel="me">{{ .name }}</a>{{ else }}<span class="p-name">{{ .name }}</span>{{ end }}</span>
</div> </div>
{{- end }} {{ end }}
{{- with .bio }} {{ with .bio }}
<div class="p-note"> <div class="p-note">
{{ . }} {{ . }}
</div> </div>
{{- end }} {{ end }}
</div> </div>
{{- end }} {{- end }}
{{- end }} {{- end }}