Skip to content

Commit 3f77707

Browse files
keithamuskoddsson
andcommitted
add authors to tutorials
Co-authored-by: Kristján Oddsson <[email protected]>
1 parent 29dac60 commit 3f77707

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

blog/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ title: Blog
1313
<p class="excerpt">{{ post.data.excerpt }}</p>
1414
<div class="author-block">
1515
{%- for author in post.data.authors %}
16-
<a href="/blog/by-author/{{ author | slugify }}" class="avatar">
16+
<a href="/tutorials/by-author/{{ author | slugify }}" class="avatar">
1717
<img src="/images/{{ author | slugify }}-avatar.jpg"
1818
alt="{{ author }} Avatar"
1919
loading="lazy"

css/tutorials.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,26 @@ main {
5454
& picture {
5555
margin-block-end: var(--size-4);
5656
}
57+
58+
.author-block {
59+
clear: both;
60+
margin-block: var(--size-3) var(--size-4);
61+
62+
& .avatar {
63+
float: inline-start;
64+
margin-inline-end: var(--size-3);
65+
66+
& + .avatar {
67+
margin-inline-start: calc(var(--size-7) * -1);
68+
}
69+
70+
& img {
71+
border-radius: var(--radius-round);
72+
border: var(--border-size-1) solid var(--surface-2);
73+
background: var(--surface-1);
74+
box-shadow: var(--shadow-3);
75+
}
76+
}
77+
}
78+
5779
}

tutorials/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ maintainable components, and best practices for working with Web Components.
1818
</a>
1919
<h3><a href="{{ page.url }}">{{ g }}</a></h3>
2020
<p>{{ page.data.excerpt }}</p>
21+
<div class="author-block">
22+
{%- for author in page.data.authors %}
23+
<a href="/blog/by-author/{{ author | slugify }}" class="avatar">
24+
<img src="/images/{{ author | slugify }}-avatar.jpg"
25+
alt="{{ author }} Avatar"
26+
loading="lazy"
27+
decoding="async"
28+
width="50"
29+
height="50">
30+
</a>
31+
{%- endfor %}
32+
{%- for author in page.data.authors %}
33+
<a href="/tutorials/by-author/{{ author | slugify }}">
34+
{{ author }}{% unless forloop.last %}, {% endunless %}
35+
</a>
36+
{%- endfor %}<br>
37+
</div>
2138
</li>
2239
{%- else %}
2340
<li>Collection empty</li>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"group": "Mastodon Toot Embed",
3-
"imageslug": "tutorials-mastodon-toot-embed"
3+
"imageslug": "tutorials-mastodon-toot-embed",
4+
"authors": ["Kristj\u00e1n Oddsson"]
45
}

0 commit comments

Comments
 (0)