add: show multiple authors on blog article, add self link

This commit is contained in:
a 2024-06-06 02:56:49 -05:00
parent 76df0dca83
commit 425a2d42d9
6 changed files with 39 additions and 13 deletions

View file

@ -16,19 +16,25 @@ main.blog.single {
}
.h-card {
font-style: normal;
display: inline-block;
display: block;
margin-block: 0.5rem;
a {
display: grid;
grid-template-columns: auto 1fr;
gap: 0.5rem;
align-items: center;
text-decoration: none;
}
img.logo {
img.logo, .no-avatar {
width: 2rem;
height: 2rem;
border-radius: 100rem;
}
.no-avatar {
svg {
width: 100%;
height: 100%;
}
}
}
time.dt-published {
display: block;
@ -36,6 +42,10 @@ main.blog.single {
#TableOfContents > ul {
padding-left: 1rem;
}
a {
text-decoration: none;
color: inherit;
}
}
section.e-content {
display: grid;

View file

@ -10,9 +10,10 @@
}
a {
background: var(--color-highlight-weak);
color: inherit;
text-decoration: none;
font-family: monospace;
padding: 0.25rem;
padding: 0.5rem;
&:before {
content: '#';
}

View file

@ -7,5 +7,8 @@
color: var(--color-background);
padding-block-start: var(--padding-block, 2rem);
padding-bottom: calc(var(--nav-height, 4rem) + var(--padding-block, 2rem));
a {word-wrap: break-word;}
a {
word-wrap: break-word;
color: inherit;
}
}

View file

@ -16,7 +16,7 @@
@import "layouts/blog/list.scss";
@import "layouts/blog/single.scss";
@import "layouts/partials/list/h-entry.summary.scss";
@import "layouts/partials/page/tags-list.scss";
@import "layouts/taxonomy/category.scss";
@import "layouts/taxonomy/author.scss";

View file

@ -1,6 +1,16 @@
{{ with .GetTerms "authors" }}
{{ range . }}
<address class="p-author h-card author vcard">
<a href="{{ .Site.BaseURL }}" class="u-url u-uid url uid" rel="author">
<img class="u-photo u-logo photo logo" src="{{.Site.BaseURL}}images/people/avatar.png" width=16 height=16 alt="a">
<span class="p-name fn"><span class="p-given-name given-name">Abdullah</span> <span class="p-family-name family-name">Tarawneh</span></span>
<a href="{{ .Permalink }}" class="u-url u-uid url uid" rel="author">
{{ with .Resources.GetMatch "avatar" }}
<img class="u-photo u-logo photo logo" src="{{.Permalink }}" width=16 height=16 alt="">
{{ else }}
<div class="no-avatar">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><title>mdi:person</title><path fill="currentColor" d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4"/></svg>
</div>
{{ end }}
<span class="p-name fn">{{ .Title }}</span>
</a>
</address>
</address>
{{ end }}
{{ end }}

View file

@ -1,3 +1,5 @@
<time class="dt-published published" datetime="{{ .Date.Format " 2006-01-02T15:04:05-0700" }}">
{{ .Date.Format "Monday, 2006 January 2" }}
</time>
<a href="{{ .Permalink }}" class="u-url u-uid" rel="self">
<time class="dt-published published" datetime="{{ .Date.Format " 2006-01-02T15:04:05-0700" }}">
{{ .Date.Format "Monday, 2006 January 2" }}
</time>
</a>