|
21 | 21 | {#each data.posts as post}
|
22 | 22 | {#if !post.metadata.draft}
|
23 | 23 | <article class="post" data-pubdate={post.date}>
|
24 |
| - <a class="no-underline" href="/{post.slug}" title="Read the article »"> |
| 24 | + <a href="/{post.slug}" title="Read the article »"> |
25 | 25 | <h2>{post.metadata.title}</h2>
|
26 | 26 | <p>{post.metadata.description}</p>
|
27 | 27 | </a>
|
|
42 | 42 |
|
43 | 43 | h2 {
|
44 | 44 | display: inline-block;
|
45 |
| - margin: 3.2rem 0 0.4rem 0; |
| 45 | + /* margin: 3.2rem 0 0.4rem 0; */ |
46 | 46 | color: var(--sk-text-2);
|
47 | 47 | max-width: 18em;
|
48 | 48 | font-size: var(--sk-text-m);
|
49 | 49 | font-weight: 400;
|
50 | 50 | }
|
51 | 51 |
|
52 |
| - .post:first-child { |
53 |
| - margin: 0 0 2rem 0; |
54 |
| - padding: 0 0 4rem 0; |
55 |
| - border-bottom: var(--sk-thick-border-width) solid #6767785b; /* based on --second */ |
56 |
| - } |
| 52 | + .post { |
| 53 | + margin: 2em 0; |
57 | 54 |
|
58 |
| - .post:first-child h2 { |
59 |
| - font-size: 4rem; |
60 |
| - font-weight: 400; |
61 |
| - color: var(--sk-text-2); |
62 |
| - } |
| 55 | + &:where(:first-child, :nth-child(2))::before { |
| 56 | + content: 'Latest post • ' attr(data-pubdate); |
| 57 | + color: var(--sk-text-4); |
| 58 | + font-family: var(--sk-font-ui); |
| 59 | + font-size: var(--sk-text-xs); |
| 60 | + font-weight: 400; |
| 61 | + text-transform: uppercase; |
| 62 | + } |
63 | 63 |
|
64 |
| - .post:where(:first-child, :nth-child(2))::before { |
65 |
| - content: 'Latest post • ' attr(data-pubdate); |
66 |
| - color: var(--sk-theme-3); |
67 |
| - font-family: var(--sk-font-heading); |
68 |
| - font-size: var(--sk-text-xs); |
69 |
| - font-weight: 400; |
70 |
| - letter-spacing: 0.05em; |
71 |
| - text-transform: uppercase; |
72 |
| - } |
| 64 | + &:nth-child(2)::before { |
| 65 | + content: 'Older posts'; |
| 66 | + } |
73 | 67 |
|
74 |
| - .post:nth-child(2)::before { |
75 |
| - content: 'Older posts'; |
76 |
| - } |
| 68 | + &:first-child { |
| 69 | + margin: 0 0 2rem 0; |
| 70 | + padding: 0 0 4rem 0; |
77 | 71 |
|
78 |
| - .post p { |
79 |
| - font-size: var(--sk-text-s); |
80 |
| - max-width: 30em; |
81 |
| - color: var(--sk-text-3); |
82 |
| - } |
| 72 | + h2 { |
| 73 | + font-size: 4rem; |
| 74 | + font-weight: 400; |
| 75 | + color: var(--sk-text-2); |
| 76 | + } |
| 77 | + } |
83 | 78 |
|
84 |
| - .post > a { |
85 |
| - display: block; |
86 |
| - } |
| 79 | + a { |
| 80 | + display: block; |
| 81 | + text-decoration: none; |
| 82 | +
|
| 83 | + &:hover h2 { |
| 84 | + text-decoration: underline; |
| 85 | + } |
| 86 | + } |
87 | 87 |
|
88 |
| - .posts a:hover, |
89 |
| - .posts a:hover > h2 { |
90 |
| - color: var(--sk-theme-3); |
| 88 | + p { |
| 89 | + font-size: var(--sk-text-s); |
| 90 | + color: var(--sk-text-3); |
| 91 | + margin: 0; |
| 92 | + } |
91 | 93 | }
|
92 | 94 | </style>
|
0 commit comments