Skip to content

Commit 382c613

Browse files
committed
restyle blog
1 parent c77ff63 commit 382c613

File tree

10 files changed

+64
-48
lines changed

10 files changed

+64
-48
lines changed

astro.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default defineConfig({
1111
remarkPlugins: [remarkToc, [remarkCollapse, { test: "Table of Contents" }]],
1212
shikiConfig: {
1313
themes: {
14-
light: "catppuccin-latte",
15-
dark: "catppuccin-frappe",
14+
light: "github-light-default",
15+
dark: "github-dark-default",
1616
},
1717
},
1818
},

src/components/Header.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
font-weight: 600;
5151
}
5252

53+
.logo:hover {
54+
color: var(--color-accent);
55+
}
56+
5357
.navbar__link {
5458
font-weight: 500;
5559
font-size: var(--font-lg);

src/components/Markdown.astro

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,24 @@
4242
}
4343

4444
.markdown pre {
45-
font-size: 0.9em;
45+
font-size: 0.95em;
4646
padding: var(--spacing-md);
4747
margin: var(--spacing-lg) 0;
48-
border-radius: 0.375em;
49-
border: 1px solid rgb(210, 208, 208);
5048
}
5149

5250
.markdown pre code {
53-
font-size: 0.9em;
51+
font-size: 0.95em;
5452
}
5553

5654
.markdown blockquote {
55+
background-color: var(--color-code);
56+
border-inline-start: 5px solid #dbdbdb;
57+
padding: var(--spacing-md);
58+
margin-bottom: var(--spacing-lg);
59+
margin-top: var(--spacing-lg);
60+
}
61+
62+
.markdown blockquote.info {
5763
border-top-right-radius: 0.375em;
5864
border-bottom-right-radius: 0.375rem;
5965
background-color: #60a5fa0d;
@@ -103,22 +109,18 @@
103109
.markdown p img {
104110
max-width: 850px;
105111
height: auto;
106-
border-radius: 0.375em;
112+
// border-radius: 0.375em;
107113
}
108114

109115
.markdown img {
110-
border-radius: 0.375em;
116+
// border-radius: 0.375em;
111117
}
112118

113119
@media (max-width: 768px) {
114120
.markdown__meta {
115121
gap: var(--spacing-xxs);
116122
}
117123

118-
.meta__icon {
119-
font-size: var(--font-md);
120-
}
121-
122124
.markdown p img {
123125
max-width: 100%;
124126
width: auto;

src/components/PostPreview.astro

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ const { title, date, desc, slug, time } = Astro.props;
44

55
<article class="preview">
66
<h3 class="preview__title">
7-
<a href={`writings/${slug}`}>
7+
<a href={`${import.meta.env.BASE_URL}/writings/${slug}`}>
88
{title}
99
</a>
1010
</h3>
1111

1212
<div class="preview__meta">
13-
<span>
14-
<i class="fa-solid fa-calendar-days"></i>
15-
</span>
1613
<span>{date}</span>
1714
<span>|</span>
1815
<span>{time}</span>
@@ -21,7 +18,7 @@ const { title, date, desc, slug, time } = Astro.props;
2118
{desc}
2219
</p>
2320
<p class="rm__link">
24-
<a href={`writings/${slug}`}>Read more</a>
21+
<a href={`${import.meta.env.BASE_URL}/writings/${slug}`}>Read more</a>
2522
</p>
2623
</article>
2724

src/content/writings/first-step-into-aws.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ isDraft: true
99

1010
## Table of Contents
1111

12-
### CLI
12+
## CLI
1313

1414
I have completely no idea about this. All I do is blindly copying and following the tutorials/docs. I don't understand what is
1515

@@ -26,7 +26,7 @@ Before we can use AWS CLI tool, we have to authenticate against AWS. There are s
2626

2727
**Setup SSO:**
2828

29-
```
29+
```bash
3030
aws configure sso
3131
```
3232

@@ -38,7 +38,7 @@ After filling all the informations, a file named `config` will be created inside
3838

3939
Checking the file, we can see:
4040

41-
```
41+
```bash
4242
[default]
4343
sso_session = your-sso-session
4444
sso_account_id = id
@@ -61,7 +61,7 @@ Useful resources:
6161
- https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
6262
- https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html#sso-configure-profile-token-auto-sso
6363

64-
### IAM
64+
## IAM
6565

6666
I understand like this:
6767

@@ -70,13 +70,13 @@ I understand like this:
7070
- There is identity-based policy which defines that policy can do which action to what resource and resourced-based policy which defines who can do which action to it.
7171
- Policy uses implicit DENY to all action, we can explicitly ALLOW or DENY. Explicit DENY is useful for example when we allow all but one specific identity.
7272

73-
### Lambda
73+
## Lambda
7474

7575
Integration
7676

7777
API Gateway
7878

79-
### OpenSearch Service
79+
## OpenSearch Service
8080

8181
Domain
8282

src/content/writings/my-first-note.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ export const GISCUS: GiscusProps = {
5353
5454
> [warning]
5555
> Highlights information that users should take into account, even when skimming.
56+
57+
Default blockquote
58+
59+
> Tip! You can get ISO 8601 datetime by running new Date().toISOString() in the console. Make sure you remove quotes though.
60+
61+
[Test](https://youtube.com)

src/content/writings/note-on-working-with-mqtt-mosquitto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Mosquitto MQTT broker will be hosted on docker container.
1616

1717
First prepare compose file:
1818

19-
```docker
19+
```yml
2020
services:
2121
mosquitto-broker:
2222
image: eclipse-mosquitto:2.0.21

src/layouts/Base.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Footer from "../components/Footer.astro";
1111
<head>
1212
<meta charset="UTF-8" />
1313
<meta name="viewport" content="width=device-width" />
14-
<link rel="icon" type="image/jpg" href={`${import.meta.env.BASE_URL}/favicon.jpg`} />
14+
<link rel="icon" type="image/jpg" href={`${import.meta.env.BASE_URL}/favicon.JPG`} />
1515
<meta name="generator" content={Astro.generator} />
1616
<title>Readme</title>
1717
<link
@@ -42,7 +42,7 @@ import Footer from "../components/Footer.astro";
4242
font-size: 1rem;
4343
line-height: 1.5;
4444
color: var(--color-text);
45-
letter-spacing: 0.1rem;
45+
// letter-spacing: 0.02rem;
4646
background-color: var(--color-background);
4747
}
4848
</style>

src/layouts/Post.astro

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ const { meta } = Astro.props;
2424
<div class="markdown">
2525
<h1 class="markdown__title">{meta.data.title}</h1>
2626
<div class="markdown__meta">
27-
<span class="meta__icon">
28-
<i class="fa-solid fa-calendar-days"></i>
29-
</span>
30-
<span>Written: </span>
27+
<span>Written at: </span>
3128
<span>{meta.data.date}</span>
3229
<span>|</span>
3330
<span>{meta.data.time}</span>
@@ -45,7 +42,12 @@ const { meta } = Astro.props;
4542
.markdown__title {
4643
margin-top: var(--spacing-lg);
4744
margin-bottom: var(--spacing-xs);
48-
font-size: var(--font-xl);
45+
font-size: var(--font-2xl);
46+
color: var(--color-accent);
47+
}
48+
49+
.markdown__title:hover {
50+
color: var(--color-text);
4951
}
5052

5153
.markdown__meta {
@@ -59,10 +61,6 @@ const { meta } = Astro.props;
5961
.markdown__desc {
6062
margin-bottom: var(--spacing-lg);
6163
}
62-
63-
.meta__icon {
64-
font-size: var(--font-lg);
65-
}
6664
</style>
6765

6866
<script define:vars={{notes}}>

src/styles/global.css

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
:root {
2-
--font-family: "Inter", serif;
3-
42
--color-background: #fff;
5-
--color-text: #1c1e21;
6-
--color-text-light: #6b7280;
3+
--color-text: #4a4a4a;
4+
--color-title: #363636;
75
--color-accent: #0189f4;
86
--color-line: #e5e7eb;
9-
--color-code: #f3f4f6;
7+
--color-code: #f5f5f5;
108

119
--width-desktop: 52rem;
1210
--width-tablet: 46rem;
@@ -32,11 +30,11 @@
3230
html[data-theme="dark"] {
3331
--color-background: #09090b; /* Slate-900 */
3432
--color-text: #f8fafc; /* Slate-50 */
35-
--color-text-light: #94a3b8; /* Slate-400 */
33+
--color-title: #f8fafc;
3634
--color-accent: #3b82f6; /* Blue-500 */
3735
--color-accent-hover: #60a5fa; /* Blue-400 */
3836
--color-line: #1e293b; /* Slate-800 */
39-
--color-code: #1e293b; /* Slate-800 */
37+
--color-code: #cecece; /* Slate-800 */
4038
}
4139

4240
*,
@@ -50,7 +48,7 @@ html[data-theme="dark"] {
5048
html,
5149
body {
5250
height: 100%;
53-
font-family: var(--font-family);
51+
font-family: 'Consolas', 'Courier New', monospace, sans-serif;
5452
font-size: var(--font-md);
5553
font-weight: 400;
5654
}
@@ -60,9 +58,21 @@ a {
6058
color: var(--color-text);
6159
}
6260

61+
p > a {
62+
color: var(--color-accent);
63+
}
64+
65+
p > a:hover {
66+
color: var(--color-accent-hover);
67+
}
68+
69+
h1, h2, h3, h4, h5, h6 {
70+
color: var(--color-title);
71+
}
72+
6373
.astro-code,
6474
.astro-code span {
65-
font-family: "IBM Plex Mono", monospace;
75+
background-color: var(--color-code) !important;
6676
}
6777

6878
html[data-theme="dark"] {
@@ -77,10 +87,9 @@ html[data-theme="dark"] {
7787
}
7888

7989
code:not(pre code) {
80-
border-radius: 0.25rem;
8190
background-color: var(--color-code);
8291
padding: 0.25rem;
83-
font-weight: 600;
84-
font-size: var(--font-xs);
85-
font-style: italic;
92+
font-weight: 500;
93+
font-size: var(--font-sm);
94+
color: #da1039;
8695
}

0 commit comments

Comments
 (0)