Skip to content

Commit 502a18f

Browse files
committed
tidy up blog pages a little bit
1 parent b5eb6e9 commit 502a18f

File tree

2 files changed

+40
-32
lines changed

2 files changed

+40
-32
lines changed

apps/svelte.dev/src/routes/blog/+page.svelte

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{#each data.posts as post}
2222
{#if !post.metadata.draft}
2323
<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 »">
2525
<h2>{post.metadata.title}</h2>
2626
<p>{post.metadata.description}</p>
2727
</a>
@@ -42,51 +42,59 @@
4242
4343
h2 {
4444
display: inline-block;
45-
margin: 3.2rem 0 0.4rem 0;
45+
/* margin: 3.2rem 0 0.4rem 0; */
4646
color: var(--sk-text-2);
4747
max-width: 18em;
4848
font-size: var(--sk-text-m);
4949
font-weight: 400;
5050
}
5151
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;
5754
58-
.post:first-child h2 {
59-
font-size: 4rem;
60-
font-weight: 400;
61-
color: var(--sk-text-2);
55+
&:first-child {
56+
margin: 0 0 2rem 0;
57+
padding: 0 0 4rem 0;
58+
59+
h2 {
60+
font-size: 4rem;
61+
font-weight: 400;
62+
color: var(--sk-text-2);
63+
}
64+
}
65+
66+
a {
67+
display: block;
68+
text-decoration: none;
69+
70+
&:hover h2 {
71+
text-decoration: underline;
72+
}
73+
}
74+
75+
p {
76+
font-size: var(--sk-text-s);
77+
max-width: 30em;
78+
color: var(--sk-text-3);
79+
margin: 0;
80+
}
6281
}
6382
6483
.post:where(:first-child, :nth-child(2))::before {
6584
content: 'Latest post • ' attr(data-pubdate);
66-
color: var(--sk-theme-3);
67-
font-family: var(--sk-font-heading);
85+
color: var(--sk-text-4);
86+
font-family: var(--sk-font-ui);
6887
font-size: var(--sk-text-xs);
6988
font-weight: 400;
70-
letter-spacing: 0.05em;
7189
text-transform: uppercase;
7290
}
7391
7492
.post:nth-child(2)::before {
7593
content: 'Older posts';
7694
}
7795
78-
.post p {
79-
font-size: var(--sk-text-s);
80-
max-width: 30em;
81-
color: var(--sk-text-3);
82-
}
83-
84-
.post > a {
85-
display: block;
86-
}
87-
88-
.posts a:hover,
96+
/* .posts a:hover,
8997
.posts a:hover > h2 {
9098
color: var(--sk-theme-3);
91-
}
99+
} */
92100
</style>

apps/svelte.dev/src/routes/blog/[slug]/+page.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
}
6363
6464
.byline {
65-
margin: 0 0 1rem 0;
66-
padding: 1.6rem 0 0 0;
67-
border-top: var(--sk-thick-border-width) solid #6767785b;
65+
margin: 0 0 4rem 0;
66+
padding: 1rem 0 0 0;
67+
font-family: var(--sk-font-ui);
6868
font-size: var(--sk-text-xs);
6969
text-transform: uppercase;
7070
}
@@ -78,7 +78,7 @@
7878
}
7979
8080
.post :global(figcaption) {
81-
color: var(--sk-theme-2);
81+
color: var(--sk-text-4);
8282
text-align: left;
8383
}
8484
@@ -90,7 +90,7 @@
9090
float: right;
9191
margin: 0 0 1em 1em;
9292
width: 16rem;
93-
color: var(--sk-theme-2);
93+
color: var(--sk-text-4);
9494
z-index: 2;
9595
}
9696
@@ -103,7 +103,7 @@
103103
height: 420px;
104104
margin: 2em 0;
105105
border-radius: var(--sk-border-radius);
106-
border: 0.8rem solid var(--sk-theme-2);
106+
border: 0.8rem solid var(--sk-theme-4);
107107
}
108108
109109
@media (min-width: 910px) {

0 commit comments

Comments
 (0)