~repos /website

#astro#js#html#css

git clone https://pyrossh.dev/repos/website.git

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


514cf1b5 pyrossh

2 months ago
improve font
src/components/Wrapper.astro CHANGED
@@ -5,8 +5,7 @@
5
5
  <style>
6
6
  div {
7
7
  flex: 1;
8
- width: calc(95ex - (1em * 2));
9
- /* width: calc(104ex - (1em * 2)); */
8
+ width: min(70ch, 100% - 4rem); /* To make the website more readable */
10
9
  margin-right: auto;
11
10
  margin-left: auto;
12
11
  padding-left: 1em;
src/layouts/Base.css CHANGED
@@ -26,16 +26,16 @@ body {
26
26
  flex: 1;
27
27
  background-color: var(--color-body-bg);
28
28
  color: var(--color-text);
29
- font-family: var(--font-roboto);
29
+ font-family: system-ui;
30
30
  text-rendering: optimizeLegibility;
31
31
  font-variant-ligatures: common-ligatures;
32
32
  font-kerning: normal;
33
- font-size: 14pt;
33
+ font-size: 1.25rem;
34
- line-height: 1.6;
34
+ line-height: 1.5;
35
35
  min-height: 100vh;
36
36
 
37
37
  @media (max-width: 720px) {
38
- font-size: 13pt;
38
+ font-size: 1.1rem;
39
39
  }
40
40
  }
41
41
 
src/pages/cv/index.astro CHANGED
@@ -249,6 +249,10 @@ import Layout from "@/layouts/Base.astro";
249
249
  </div>
250
250
  </Layout>
251
251
  <style>
252
+ p {
253
+ font-size: 1.1rem;
254
+ }
255
+
252
256
  b {
253
257
  font-weight: 600;
254
258
  }
@@ -259,6 +263,7 @@ import Layout from "@/layouts/Base.astro";
259
263
  }
260
264
 
261
265
  li {
266
+ font-size: 1.1rem;
262
267
  list-style-type: disc;
263
268
  list-style-position: outside;
264
269
  }
@@ -271,22 +276,25 @@ import Layout from "@/layouts/Base.astro";
271
276
  }
272
277
 
273
278
  h4 {
279
+ font-size: 1.1rem;
274
280
  font-weight: 600;
275
281
  margin-top: 0.5rem;
276
282
  }
277
283
 
278
284
  h5 {
285
+ font-size: 1.1rem;
279
286
  margin-top: 0.5rem;
280
287
  }
281
288
 
282
289
  h6 {
290
+ font-size: 1rem;
283
291
  font-weight: 600;
284
292
  margin-top: 0.5rem;
285
293
 
286
294
  span {
287
295
  font-family: sans-serif;
288
296
  font-weight: 400;
289
- font-size: 0.95rem;
297
+ font-size: 1rem;
290
298
  }
291
299
  }
292
300
  </style>
src/pages/index.astro CHANGED
@@ -12,7 +12,7 @@ import styles from "./index.module.css";
12
12
  <div class={styles.pageContainer}>
13
13
  <div>
14
14
  <h1 class={styles.title}>Hello!</h1>
15
- <p>
15
+ <p class={styles.description}>
16
16
  <a
17
17
  class={styles.linkUnderline}
18
18
  href="https://www.linkedin.com/in/pyrossh"
@@ -26,7 +26,7 @@ import styles from "./index.module.css";
26
26
  I like to build frameworks and automate common tasks to make it easier to
27
27
  develop applications.
28
28
  </p>
29
- <p>
29
+ <p class={styles.description}>
30
30
  I enjoy working on open-source projects, and during the last decade,
31
31
  I've created a number of projects that are widely used.
32
32
  </p>
src/pages/index.module.css CHANGED
@@ -1,5 +1,9 @@
1
+ .description {
2
+ font-size: 1.1rem;
3
+ }
4
+
1
5
  h2 {
2
- font-size: 16pt;
6
+ font-size: 1.4rem;
3
7
  font-weight: 600;
4
8
  }
5
9
 
@@ -79,7 +83,7 @@ section {
79
83
  padding: 0.5rem;
80
84
  background: var(--color-box-bg);
81
85
  color: var(--color-text);
82
- font-size: 0.95em;
86
+ font-size: 0.95rem;
83
87
 
84
88
  a {
85
89
  color: var(--color-card-link);
@@ -105,7 +109,7 @@ section {
105
109
  grid-template-columns: auto auto auto;
106
110
  text-align: center;
107
111
  margin-top: 1rem;
108
- font-size: 0.95em;
112
+ font-size: 1.1rem;
109
113
 
110
114
  li {
111
115
  background-color: var(--color-box-bg);
@@ -127,7 +131,7 @@ section {
127
131
  align-items: baseline;
128
132
  padding: 0.25rem;
129
133
  background-color: var(--color-box-bg);
130
- font-size: 0.95em;
134
+ font-size: 1.1rem;
131
135
 
132
136
  @media (max-width: 720px) {
133
137
  flex-direction: column;
@@ -167,6 +171,7 @@ section {
167
171
  align-items: center;
168
172
  background-color: var(--color-box-bg);
169
173
  padding: 0.25rem;
174
+ font-size: 1rem;
170
175
 
171
176
  a {
172
177
  display: flex;
@@ -176,7 +181,6 @@ section {
176
181
  text-align: left;
177
182
  margin-left: 0.25rem;
178
183
  margin-right: 0.25rem;
179
- font-size: 0.9em;
180
184
 
181
185
  div {
182
186
  flex: 1;
src/pages/posts/[...slug].astro CHANGED
@@ -32,7 +32,7 @@ const { Content } = await render(Astro.props);
32
32
  article {
33
33
  h1 {
34
34
  text-align: left;
35
- font-size: 27pt;
35
+ font-size: 1.8rem;
36
36
  font-weight: bold;
37
37
  line-height: 1;
38
38
  margin-top: 0.5rem;
@@ -40,6 +40,7 @@ const { Content } = await render(Astro.props);
40
40
  }
41
41
 
42
42
  time {
43
+ font-size: 1.1rem;
43
44
  text-align: left;
44
45
  color: rgb(var(--gray));
45
46
  }
@@ -49,22 +50,25 @@ const { Content } = await render(Astro.props);
49
50
  }
50
51
 
51
52
  h2 {
53
+ font-size: 1.1rem;
52
- font-weight: 700;
54
+ font-weight: 500;
53
55
  }
54
56
 
55
57
  h3 {
56
- font-size: 1.3rem;
58
+ font-size: 1.25rem;
57
59
  font-weight: 700;
58
60
  margin-top: 0.5rem;
59
61
  margin-bottom: 0.1rem;
60
62
  }
61
63
 
62
64
  p {
65
+ font-size: 1.1rem;
63
66
  padding-bottom: 1rem;
64
67
  }
65
68
 
66
69
  p,
67
70
  li {
71
+ font-size: 1.1rem;
68
72
  code {
69
73
  color: var(--color-code-fg);
70
74
  background-color: var(--color-box-bg);
src/pages/posts/index.astro CHANGED
@@ -38,7 +38,7 @@ const posts = (await getCollection("content")).sort(
38
38
 
39
39
  .posts-title {
40
40
  font-weight: 700;
41
- font-size: 1.875rem;
41
+ font-size: 1.8rem;
42
42
  line-height: 2.25rem;
43
43
  }
44
44
 
@@ -58,6 +58,7 @@ const posts = (await getCollection("content")).sort(
58
58
  }
59
59
 
60
60
  .post-list-item a {
61
+ font-size: 1.1rem;
61
62
  color: var(--color-post-link);
62
63
  text-decoration-line: underline;
63
64
  text-underline-offset: 4px;
@@ -71,7 +72,7 @@ const posts = (await getCollection("content")).sort(
71
72
  }
72
73
 
73
74
  .post-list-item time {
74
- font-size: 12pt;
75
+ font-size: 1.1rem;
75
76
  }
76
77
 
77
78
  .post-list-item__content {
src/pages/repos/[...slug]/index.module.css CHANGED
@@ -137,7 +137,7 @@ h5 {
137
137
  }
138
138
 
139
139
  pre {
140
- /* background: $pre-background; */
140
+ background: var(--color-box-bg);
141
141
  padding: 0.25rem;
142
142
  }
143
143