Update typography and spacing
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
---
|
||||
import "../style/fonts.css";
|
||||
import "../style/global.css";
|
||||
|
||||
import { SITE_TITLE } from "../config";
|
||||
|
||||
@@ -32,7 +32,9 @@ const {
|
||||
)
|
||||
}
|
||||
<hr />
|
||||
<slot />
|
||||
<div class="blog-post">
|
||||
<slot />
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
<Tags tags={tags} />
|
||||
|
||||
47
src/style/fonts.css
Normal file
47
src/style/fonts.css
Normal file
@@ -0,0 +1,47 @@
|
||||
/* ia-writer-mono-latin-400-normal */
|
||||
@font-face {
|
||||
font-family: "iA Writer Mono";
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 400;
|
||||
src: url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-normal.woff2)
|
||||
format("woff2"),
|
||||
url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-normal.woff)
|
||||
format("woff");
|
||||
}
|
||||
|
||||
/* ia-writer-mono-latin-700-normal */
|
||||
@font-face {
|
||||
font-family: "iA Writer Mono";
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
font-weight: 700;
|
||||
src: url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-700-normal.woff2)
|
||||
format("woff2"),
|
||||
url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-700-normal.woff)
|
||||
format("woff");
|
||||
}
|
||||
|
||||
/* ia-writer-mono-latin-400-italic */
|
||||
@font-face {
|
||||
font-family: "iA Writer Mono";
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
font-weight: 400;
|
||||
src: url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-italic.woff2)
|
||||
format("woff2"),
|
||||
url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-italic.woff)
|
||||
format("woff");
|
||||
}
|
||||
|
||||
/* ia-writer-mono-latin-700-italic */
|
||||
@font-face {
|
||||
font-family: "iA Writer Mono";
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
font-weight: 700;
|
||||
src: url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-700-italic.woff2)
|
||||
format("woff2"),
|
||||
url(https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-700-italic.woff)
|
||||
format("woff");
|
||||
}
|
||||
@@ -23,18 +23,17 @@ html,
|
||||
body {
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
max-width: 650px;
|
||||
max-width: 65ch;
|
||||
background-color: #fff;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
line-height: 1.6;
|
||||
color: var(--black);
|
||||
}
|
||||
html,
|
||||
body,
|
||||
button,
|
||||
code {
|
||||
font-family: "Roboto Mono", monospace;
|
||||
font-family: "iA Writer Mono", monospace;
|
||||
}
|
||||
h1,
|
||||
strong,
|
||||
@@ -48,6 +47,7 @@ h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: var(--gray);
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
body.dark-mode,
|
||||
@@ -180,12 +180,10 @@ blockquote {
|
||||
|
||||
h1 {
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: 300;
|
||||
margin: 0 0 0.5em 0;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@@ -203,17 +201,32 @@ h3 {
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
article :not(.article-title) {
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.article-title {
|
||||
font-size: 2em;
|
||||
margin: 0.25em 0 0;
|
||||
}
|
||||
|
||||
ul li time {
|
||||
flex: 0 0 130px;
|
||||
.blog-post {
|
||||
font-size: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
|
||||
}
|
||||
|
||||
.blog-post > * + * {
|
||||
margin-block-start: 1em;
|
||||
}
|
||||
|
||||
time {
|
||||
font-style: italic;
|
||||
color: var(--gray);
|
||||
}
|
||||
|
||||
ul li time {
|
||||
flex: 0 0 130px;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
nav a:not(:last-child) {
|
||||
padding: 0;
|
||||
|
||||
Reference in New Issue
Block a user