astro-blog-kit 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/BlogCard.astro +13 -13
- package/components/BlogList/CardsLayout.astro +32 -32
- package/components/BlogList/FeaturedLayout.astro +9 -9
- package/components/BlogList/GridLayout.astro +4 -4
- package/components/BlogList/MagazineLayout.astro +5 -5
- package/components/BlogList.astro +8 -8
- package/components/BlogPost.astro +107 -107
- package/components/Pagination.astro +13 -13
- package/integration.ts +21 -28
- package/package.json +1 -1
- package/templates/blog-index.astro.template +2 -2
- package/templates/blog-page.astro.template +2 -2
- package/templates/blog-slug.astro.template +2 -2
|
@@ -82,15 +82,15 @@ const isList = variant === "list";
|
|
|
82
82
|
|
|
83
83
|
<style>
|
|
84
84
|
.blog-card {
|
|
85
|
-
border: 2px solid var(--
|
|
86
|
-
background-color: var(--
|
|
85
|
+
border: 2px solid var(--bk-gray-200);
|
|
86
|
+
background-color: var(--bk-white);
|
|
87
87
|
overflow: hidden;
|
|
88
88
|
transition: transform 0.3s ease, border-color 0.3s ease;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.blog-card:hover {
|
|
92
92
|
transform: translateY(-4px);
|
|
93
|
-
border-color: var(--
|
|
93
|
+
border-color: var(--bk-yellow);
|
|
94
94
|
border-bottom-width: 4px;
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -111,7 +111,7 @@ const isList = variant === "list";
|
|
|
111
111
|
position: relative;
|
|
112
112
|
width: 100%;
|
|
113
113
|
aspect-ratio: 16 / 9;
|
|
114
|
-
background-color: var(--
|
|
114
|
+
background-color: var(--bk-gray-100);
|
|
115
115
|
overflow: hidden;
|
|
116
116
|
flex-shrink: 0;
|
|
117
117
|
}
|
|
@@ -147,8 +147,8 @@ const isList = variant === "list";
|
|
|
147
147
|
display: flex;
|
|
148
148
|
align-items: center;
|
|
149
149
|
justify-content: center;
|
|
150
|
-
color: var(--
|
|
151
|
-
background-color: var(--
|
|
150
|
+
color: var(--bk-gray-300);
|
|
151
|
+
background-color: var(--bk-gray-100);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.blog-card__overlay {
|
|
@@ -162,8 +162,8 @@ const isList = variant === "list";
|
|
|
162
162
|
position: absolute;
|
|
163
163
|
top: 1rem;
|
|
164
164
|
left: 1rem;
|
|
165
|
-
background-color: var(--
|
|
166
|
-
color: var(--
|
|
165
|
+
background-color: var(--bk-yellow);
|
|
166
|
+
color: var(--bk-black);
|
|
167
167
|
font-size: 0.65rem;
|
|
168
168
|
font-weight: 700;
|
|
169
169
|
text-transform: uppercase;
|
|
@@ -190,14 +190,14 @@ const isList = variant === "list";
|
|
|
190
190
|
font-weight: 700;
|
|
191
191
|
text-transform: uppercase;
|
|
192
192
|
letter-spacing: 0.12em;
|
|
193
|
-
color: var(--
|
|
193
|
+
color: var(--bk-gray-400);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.blog-card__title {
|
|
197
|
-
font-family: var(--font-heading);
|
|
197
|
+
font-family: var(--bk-font-heading);
|
|
198
198
|
font-size: 1.5rem;
|
|
199
199
|
font-weight: 700;
|
|
200
|
-
color: var(--
|
|
200
|
+
color: var(--bk-black);
|
|
201
201
|
line-height: 1.05;
|
|
202
202
|
text-transform: uppercase;
|
|
203
203
|
margin: 0;
|
|
@@ -214,7 +214,7 @@ const isList = variant === "list";
|
|
|
214
214
|
|
|
215
215
|
.blog-card__excerpt {
|
|
216
216
|
font-size: 0.9rem;
|
|
217
|
-
color: var(--
|
|
217
|
+
color: var(--bk-gray-600);
|
|
218
218
|
line-height: 1.65;
|
|
219
219
|
display: -webkit-box;
|
|
220
220
|
-webkit-line-clamp: 3;
|
|
@@ -232,7 +232,7 @@ const isList = variant === "list";
|
|
|
232
232
|
padding-top: 0.75rem;
|
|
233
233
|
font-size: 0.875rem;
|
|
234
234
|
font-weight: 700;
|
|
235
|
-
color: var(--
|
|
235
|
+
color: var(--bk-black);
|
|
236
236
|
display: inline-block;
|
|
237
237
|
transition: transform 0.2s ease;
|
|
238
238
|
}
|
|
@@ -8,18 +8,18 @@ interface Props extends BlogListProps {}
|
|
|
8
8
|
const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
<div class="cards">
|
|
11
|
+
<div class="bk-cards">
|
|
12
12
|
{posts.map((post: BlogPost) => {
|
|
13
13
|
const imgUrl = getFeaturedImageUrl(post);
|
|
14
14
|
return (
|
|
15
|
-
<article class="card">
|
|
16
|
-
<a href={`${blogBase}${post.slug}/`} class="card__link">
|
|
15
|
+
<article class="bk-card">
|
|
16
|
+
<a href={`${blogBase}${post.slug}/`} class="bk-card__link">
|
|
17
17
|
<div
|
|
18
|
-
class="card__bg"
|
|
18
|
+
class="bk-card__bg"
|
|
19
19
|
style={imgUrl ? `background-image: url('${imgUrl}')` : ""}
|
|
20
20
|
>
|
|
21
21
|
{!imgUrl && (
|
|
22
|
-
<div class="card__no-image">
|
|
22
|
+
<div class="bk-card__no-image">
|
|
23
23
|
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
24
24
|
<rect x="3" y="3" width="18" height="18" rx="2"/>
|
|
25
25
|
<circle cx="8.5" cy="8.5" r="1.5"/>
|
|
@@ -27,18 +27,18 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
27
27
|
</svg>
|
|
28
28
|
</div>
|
|
29
29
|
)}
|
|
30
|
-
<div class="card__overlay" />
|
|
31
|
-
<div class="card__content">
|
|
32
|
-
<time class="card__date">
|
|
30
|
+
<div class="bk-card__overlay" />
|
|
31
|
+
<div class="bk-card__content">
|
|
32
|
+
<time class="bk-card__date">
|
|
33
33
|
{new Date(post.date).toLocaleDateString(dateLocale, {
|
|
34
34
|
year: "numeric",
|
|
35
35
|
month: "long",
|
|
36
36
|
day: "numeric",
|
|
37
37
|
})}
|
|
38
38
|
</time>
|
|
39
|
-
<h2 class="card__title" set:html={post.title.rendered} />
|
|
40
|
-
<div class="card__excerpt" set:html={post.excerpt.rendered} />
|
|
41
|
-
<span class="card__cta">{t.blog.btncta} →</span>
|
|
39
|
+
<h2 class="bk-card__title" set:html={post.title.rendered} />
|
|
40
|
+
<div class="bk-card__excerpt" set:html={post.excerpt.rendered} />
|
|
41
|
+
<span class="bk-card__cta">{t.blog.btncta} →</span>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
44
|
</a>
|
|
@@ -48,7 +48,7 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
<style>
|
|
51
|
-
.cards {
|
|
51
|
+
.bk-cards {
|
|
52
52
|
display: grid;
|
|
53
53
|
grid-template-columns: 1fr;
|
|
54
54
|
gap: 1.5rem;
|
|
@@ -56,55 +56,55 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
@media (min-width: 640px) {
|
|
59
|
-
.cards {
|
|
59
|
+
.bk-cards {
|
|
60
60
|
grid-template-columns: repeat(2, 1fr);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
@media (min-width: 1024px) {
|
|
65
|
-
.cards {
|
|
65
|
+
.bk-cards {
|
|
66
66
|
grid-template-columns: repeat(3, 1fr);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.card {
|
|
70
|
+
.bk-card {
|
|
71
71
|
border-radius: 12px;
|
|
72
72
|
overflow: hidden;
|
|
73
73
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.card:hover {
|
|
76
|
+
.bk-card:hover {
|
|
77
77
|
transform: translateY(-6px);
|
|
78
78
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.card__link {
|
|
81
|
+
.bk-card__link {
|
|
82
82
|
display: block;
|
|
83
83
|
height: 100%;
|
|
84
84
|
text-decoration: none;
|
|
85
85
|
color: inherit;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.card__bg {
|
|
88
|
+
.bk-card__bg {
|
|
89
89
|
position: relative;
|
|
90
90
|
height: 380px;
|
|
91
|
-
background-color: var(--
|
|
91
|
+
background-color: var(--bk-surface);
|
|
92
92
|
background-size: cover;
|
|
93
93
|
background-position: center;
|
|
94
94
|
display: flex;
|
|
95
95
|
align-items: flex-end;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.card__no-image {
|
|
98
|
+
.bk-card__no-image {
|
|
99
99
|
position: absolute;
|
|
100
100
|
inset: 0;
|
|
101
101
|
display: flex;
|
|
102
102
|
align-items: center;
|
|
103
103
|
justify-content: center;
|
|
104
|
-
color: var(--color-muted);
|
|
104
|
+
color: var(--bk-color-muted);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.card__overlay {
|
|
107
|
+
.bk-card__overlay {
|
|
108
108
|
position: absolute;
|
|
109
109
|
inset: 0;
|
|
110
110
|
background: linear-gradient(
|
|
@@ -116,7 +116,7 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
116
116
|
border-radius: 12px;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.card__content {
|
|
119
|
+
.bk-card__content {
|
|
120
120
|
position: relative;
|
|
121
121
|
z-index: 1;
|
|
122
122
|
padding: 1.75rem;
|
|
@@ -126,17 +126,17 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
126
126
|
width: 100%;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.card__date {
|
|
129
|
+
.bk-card__date {
|
|
130
130
|
font-size: 0.7rem;
|
|
131
131
|
font-weight: 700;
|
|
132
132
|
text-transform: uppercase;
|
|
133
133
|
letter-spacing: 0.12em;
|
|
134
134
|
color: rgba(255, 255, 255, 0.7);
|
|
135
|
-
font-family: var(--font-mono);
|
|
135
|
+
font-family: var(--bk-font-mono);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.card__title {
|
|
139
|
-
font-family: var(--font-heading);
|
|
138
|
+
.bk-card__title {
|
|
139
|
+
font-family: var(--bk-font-heading);
|
|
140
140
|
font-size: 1.25rem;
|
|
141
141
|
font-weight: 700;
|
|
142
142
|
color: #ffffff;
|
|
@@ -144,7 +144,7 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
144
144
|
margin: 0;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.card__excerpt {
|
|
147
|
+
.bk-card__excerpt {
|
|
148
148
|
font-size: 0.85rem;
|
|
149
149
|
color: rgba(255, 255, 255, 0.75);
|
|
150
150
|
line-height: 1.5;
|
|
@@ -154,20 +154,20 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
154
154
|
overflow: hidden;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.card__excerpt :global(p) {
|
|
157
|
+
.bk-card__excerpt :global(p) {
|
|
158
158
|
margin: 0;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
.card__cta {
|
|
161
|
+
.bk-card__cta {
|
|
162
162
|
font-size: 0.8rem;
|
|
163
163
|
font-weight: 700;
|
|
164
|
-
color: var(--color-accent);
|
|
164
|
+
color: var(--bk-color-accent);
|
|
165
165
|
display: inline-block;
|
|
166
166
|
margin-top: 0.5rem;
|
|
167
167
|
transition: transform 0.2s ease;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
.card:hover .card__cta {
|
|
170
|
+
.bk-card:hover .bk-card__cta {
|
|
171
171
|
transform: translateX(4px);
|
|
172
172
|
}
|
|
173
173
|
</style>
|
|
@@ -11,10 +11,10 @@ const featured = posts[0] as BlogPost | undefined;
|
|
|
11
11
|
const rest = posts.slice(1) as BlogPost[];
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<div class="featured">
|
|
14
|
+
<div class="bk-featured">
|
|
15
15
|
|
|
16
16
|
{featured && (
|
|
17
|
-
<div class="featured__hero">
|
|
17
|
+
<div class="bk-featured__hero">
|
|
18
18
|
<BlogCard
|
|
19
19
|
post={featured}
|
|
20
20
|
blogBase={blogBase}
|
|
@@ -26,7 +26,7 @@ const rest = posts.slice(1) as BlogPost[];
|
|
|
26
26
|
)}
|
|
27
27
|
|
|
28
28
|
{rest.length > 0 && (
|
|
29
|
-
<div class="featured__grid">
|
|
29
|
+
<div class="bk-featured__grid">
|
|
30
30
|
{rest.map((post: BlogPost) => (
|
|
31
31
|
<BlogCard
|
|
32
32
|
post={post}
|
|
@@ -42,35 +42,35 @@ const rest = posts.slice(1) as BlogPost[];
|
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
44
|
<style>
|
|
45
|
-
.featured {
|
|
45
|
+
.bk-featured {
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-direction: column;
|
|
48
48
|
gap: 2rem;
|
|
49
49
|
margin-bottom: 4rem;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.featured__hero {
|
|
52
|
+
.bk-featured__hero {
|
|
53
53
|
width: 100%;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.featured__hero .blog-card--featured .blog-card__thumb {
|
|
56
|
+
.bk-featured__hero .bk-blog-card--featured .bk-blog-card__thumb {
|
|
57
57
|
aspect-ratio: 21 / 9;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.featured__grid {
|
|
60
|
+
.bk-featured__grid {
|
|
61
61
|
display: grid;
|
|
62
62
|
grid-template-columns: 1fr;
|
|
63
63
|
gap: 1.5rem;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
@media (min-width: 640px) {
|
|
67
|
-
.featured__grid {
|
|
67
|
+
.bk-featured__grid {
|
|
68
68
|
grid-template-columns: repeat(2, 1fr);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
@media (min-width: 1024px) {
|
|
73
|
-
.featured__grid {
|
|
73
|
+
.bk-featured__grid {
|
|
74
74
|
grid-template-columns: repeat(3, 1fr);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -8,7 +8,7 @@ interface Props extends BlogListProps {}
|
|
|
8
8
|
const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
<div class="grid">
|
|
11
|
+
<div class="bk-grid">
|
|
12
12
|
{posts.map((post: BlogPost) => (
|
|
13
13
|
<BlogCard
|
|
14
14
|
post={post}
|
|
@@ -21,7 +21,7 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<style>
|
|
24
|
-
.grid {
|
|
24
|
+
.bk-grid {
|
|
25
25
|
display: grid;
|
|
26
26
|
grid-template-columns: 1fr;
|
|
27
27
|
gap: 1.5rem;
|
|
@@ -29,13 +29,13 @@ const { posts, blogBase, dateLocale, t } = Astro.props;
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
@media (min-width: 640px) {
|
|
32
|
-
.grid {
|
|
32
|
+
.bk-grid {
|
|
33
33
|
grid-template-columns: repeat(2, 1fr);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@media (min-width: 1024px) {
|
|
38
|
-
.grid {
|
|
38
|
+
.bk-grid {
|
|
39
39
|
grid-template-columns: repeat(3, 1fr);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -11,7 +11,7 @@ const featured = posts[0] as BlogPost | undefined;
|
|
|
11
11
|
const rest = posts.slice(1) as BlogPost[];
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<div class="
|
|
14
|
+
<div class="bk-mag">
|
|
15
15
|
|
|
16
16
|
{featured && (
|
|
17
17
|
<BlogCard
|
|
@@ -23,7 +23,7 @@ const rest = posts.slice(1) as BlogPost[];
|
|
|
23
23
|
/>
|
|
24
24
|
)}
|
|
25
25
|
|
|
26
|
-
<div class="
|
|
26
|
+
<div class="bk-mag__right">
|
|
27
27
|
{rest.map((post: BlogPost) => (
|
|
28
28
|
<BlogCard
|
|
29
29
|
post={post}
|
|
@@ -38,7 +38,7 @@ const rest = posts.slice(1) as BlogPost[];
|
|
|
38
38
|
</div>
|
|
39
39
|
|
|
40
40
|
<style>
|
|
41
|
-
.
|
|
41
|
+
.bk-mag {
|
|
42
42
|
display: grid;
|
|
43
43
|
grid-template-columns: 1fr;
|
|
44
44
|
gap: 1.5rem;
|
|
@@ -46,13 +46,13 @@ const rest = posts.slice(1) as BlogPost[];
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
@media (min-width: 1024px) {
|
|
49
|
-
.
|
|
49
|
+
.bk-mag {
|
|
50
50
|
grid-template-columns: 1.2fr 1fr;
|
|
51
51
|
align-items: start;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.
|
|
55
|
+
.bk-mag__right {
|
|
56
56
|
display: flex;
|
|
57
57
|
flex-direction: column;
|
|
58
58
|
gap: 1rem;
|
|
@@ -102,13 +102,13 @@ const blogBase = getBlogBase(locale, base);
|
|
|
102
102
|
|
|
103
103
|
<style>
|
|
104
104
|
.blog {
|
|
105
|
-
background-color: var(--
|
|
105
|
+
background-color: var(--bk-white);
|
|
106
106
|
padding: 6rem 1rem;
|
|
107
107
|
min-height: 100vh;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.blog__container {
|
|
111
|
-
max-width: var(--container-max);
|
|
111
|
+
max-width: var(--bk-container-max);
|
|
112
112
|
margin-inline: auto;
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -119,8 +119,8 @@ const blogBase = getBlogBase(locale, base);
|
|
|
119
119
|
|
|
120
120
|
.blog__badge {
|
|
121
121
|
display: inline-block;
|
|
122
|
-
background-color: var(--
|
|
123
|
-
color: var(--
|
|
122
|
+
background-color: var(--bk-yellow);
|
|
123
|
+
color: var(--bk-black);
|
|
124
124
|
font-size: 0.7rem;
|
|
125
125
|
font-weight: 700;
|
|
126
126
|
text-transform: uppercase;
|
|
@@ -132,19 +132,19 @@ const blogBase = getBlogBase(locale, base);
|
|
|
132
132
|
.blog__title {
|
|
133
133
|
font-size: clamp(3rem, 8vw, 5rem);
|
|
134
134
|
font-weight: 700;
|
|
135
|
-
color: var(--
|
|
135
|
+
color: var(--bk-black);
|
|
136
136
|
line-height: 1;
|
|
137
137
|
margin-bottom: 1rem;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.blog__title-highlight {
|
|
141
|
-
background-color: var(--
|
|
142
|
-
color: var(--
|
|
141
|
+
background-color: var(--bk-black);
|
|
142
|
+
color: var(--bk-yellow);
|
|
143
143
|
padding: 0 0.3rem;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
.blog__desc {
|
|
147
|
-
color: var(--
|
|
147
|
+
color: var(--bk-muted);
|
|
148
148
|
font-size: 1.1rem;
|
|
149
149
|
line-height: 1.7;
|
|
150
150
|
}
|
|
@@ -9,13 +9,13 @@ const { post, t } = Astro.props;
|
|
|
9
9
|
const imgUrl = getFeaturedImageUrl(post);
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
<main class="post">
|
|
12
|
+
<main class="bk-post">
|
|
13
13
|
|
|
14
|
-
<div class="post__hero">
|
|
15
|
-
<div class="post__hero-inner">
|
|
16
|
-
<span class="post__tag">Technical Article</span>
|
|
17
|
-
<h1 class="post__title" set:html={post.title.rendered} />
|
|
18
|
-
<p class="post__date">
|
|
14
|
+
<div class="bk-post__hero">
|
|
15
|
+
<div class="bk-post__hero-inner">
|
|
16
|
+
<span class="bk-post__tag">Technical Article</span>
|
|
17
|
+
<h1 class="bk-post__title" set:html={post.title.rendered} />
|
|
18
|
+
<p class="bk-post__date">
|
|
19
19
|
{new Date(post.date).toLocaleDateString("en-US", {
|
|
20
20
|
year: "numeric",
|
|
21
21
|
month: "long",
|
|
@@ -26,21 +26,21 @@ const imgUrl = getFeaturedImageUrl(post);
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
{imgUrl && (
|
|
29
|
-
<div class="post__image-wrap">
|
|
29
|
+
<div class="bk-post__image-wrap">
|
|
30
30
|
<img
|
|
31
31
|
src={imgUrl}
|
|
32
32
|
alt={post.title.rendered}
|
|
33
|
-
class="post__image"
|
|
33
|
+
class="bk-post__image"
|
|
34
34
|
/>
|
|
35
35
|
</div>
|
|
36
36
|
)}
|
|
37
37
|
|
|
38
|
-
<div class="post__body">
|
|
38
|
+
<div class="bk-post__body">
|
|
39
39
|
|
|
40
|
-
<aside class="post__sidebar">
|
|
41
|
-
<div class="sidebar__block">
|
|
42
|
-
<p class="sidebar__label">Published</p>
|
|
43
|
-
<p class="sidebar__value">
|
|
40
|
+
<aside class="bk-post__sidebar">
|
|
41
|
+
<div class="bk-sidebar__block">
|
|
42
|
+
<p class="bk-sidebar__label">Published</p>
|
|
43
|
+
<p class="bk-sidebar__value">
|
|
44
44
|
{new Date(post.date).toLocaleDateString("en-US", {
|
|
45
45
|
month: "short",
|
|
46
46
|
day: "numeric",
|
|
@@ -49,23 +49,23 @@ const imgUrl = getFeaturedImageUrl(post);
|
|
|
49
49
|
</p>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
|
-
<div class="sidebar__block">
|
|
53
|
-
<p class="sidebar__label">Category</p>
|
|
54
|
-
<p class="sidebar__value">
|
|
52
|
+
<div class="bk-sidebar__block">
|
|
53
|
+
<p class="bk-sidebar__label">Category</p>
|
|
54
|
+
<p class="bk-sidebar__value">
|
|
55
55
|
{post._embedded?.["wp:term"]?.[0]?.[0]?.name ?? "General"}
|
|
56
56
|
</p>
|
|
57
57
|
</div>
|
|
58
58
|
|
|
59
59
|
{post.readingTime && (
|
|
60
|
-
<div class="sidebar__block">
|
|
61
|
-
<p class="sidebar__label">Reading time</p>
|
|
62
|
-
<p class="sidebar__value">~{post.readingTime} min</p>
|
|
60
|
+
<div class="bk-sidebar__block">
|
|
61
|
+
<p class="bk-sidebar__label">Reading time</p>
|
|
62
|
+
<p class="bk-sidebar__value">~{post.readingTime} min</p>
|
|
63
63
|
</div>
|
|
64
64
|
)}
|
|
65
65
|
|
|
66
|
-
<div class="sidebar__divider" />
|
|
66
|
+
<div class="bk-sidebar__divider" />
|
|
67
67
|
|
|
68
|
-
<a href="../" class="sidebar__back">
|
|
68
|
+
<a href="../" class="bk-sidebar__back">
|
|
69
69
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
70
70
|
<path d="M8.5 2.5L4 7L8.5 11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
71
71
|
</svg>
|
|
@@ -73,78 +73,78 @@ const imgUrl = getFeaturedImageUrl(post);
|
|
|
73
73
|
</a>
|
|
74
74
|
</aside>
|
|
75
75
|
|
|
76
|
-
<article class="post__content" set:html={post.content.rendered} />
|
|
76
|
+
<article class="bk-post__content" set:html={post.content.rendered} />
|
|
77
77
|
|
|
78
78
|
</div>
|
|
79
79
|
|
|
80
80
|
</main>
|
|
81
81
|
|
|
82
82
|
<style>
|
|
83
|
-
.post {
|
|
84
|
-
background-color: var(--
|
|
85
|
-
font-family: var(--font-body);
|
|
83
|
+
.bk-post {
|
|
84
|
+
background-color: var(--bk-bg);
|
|
85
|
+
font-family: var(--bk-font-body);
|
|
86
86
|
min-height: 100vh;
|
|
87
87
|
padding-bottom: 6rem;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.post__hero {
|
|
91
|
-
border-bottom: 1px solid var(--
|
|
90
|
+
.bk-post__hero {
|
|
91
|
+
border-bottom: 1px solid var(--bk-border);
|
|
92
92
|
padding: 5rem 2rem 3rem;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.post__hero-inner {
|
|
95
|
+
.bk-post__hero-inner {
|
|
96
96
|
max-width: 1100px;
|
|
97
97
|
margin: 0 auto;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.post__tag {
|
|
100
|
+
.bk-post__tag {
|
|
101
101
|
display: inline-block;
|
|
102
|
-
font-family: var(--font-mono);
|
|
102
|
+
font-family: var(--bk-font-mono);
|
|
103
103
|
font-size: 0.7rem;
|
|
104
104
|
font-weight: 400;
|
|
105
105
|
letter-spacing: 2px;
|
|
106
106
|
text-transform: uppercase;
|
|
107
|
-
color: var(--
|
|
108
|
-
border: 1px solid var(--
|
|
107
|
+
color: var(--bk-accent);
|
|
108
|
+
border: 1px solid var(--bk-accent);
|
|
109
109
|
border-radius: 4px;
|
|
110
110
|
padding: 0.2rem 0.65rem;
|
|
111
111
|
margin-bottom: 1.5rem;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.post__title {
|
|
115
|
-
font-family: var(--font-display);
|
|
114
|
+
.bk-post__title {
|
|
115
|
+
font-family: var(--bk-font-display);
|
|
116
116
|
font-size: clamp(2.4rem, 6vw, 5rem);
|
|
117
117
|
font-weight: 700;
|
|
118
|
-
color: var(--color-text);
|
|
118
|
+
color: var(--bk-color-text);
|
|
119
119
|
line-height: 1.05;
|
|
120
120
|
letter-spacing: -0.02em;
|
|
121
121
|
margin: 0 0 1.5rem;
|
|
122
122
|
max-width: 820px;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.post__date {
|
|
126
|
-
font-family: var(--font-mono);
|
|
125
|
+
.bk-post__date {
|
|
126
|
+
font-family: var(--bk-font-mono);
|
|
127
127
|
font-size: 0.8rem;
|
|
128
|
-
color: var(--
|
|
128
|
+
color: var(--bk-muted);
|
|
129
129
|
margin: 0;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
.post__image-wrap {
|
|
132
|
+
.bk-post__image-wrap {
|
|
133
133
|
max-width: 1100px;
|
|
134
134
|
margin: 2.5rem auto;
|
|
135
135
|
padding: 0 2rem;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.post__image {
|
|
138
|
+
.bk-post__image {
|
|
139
139
|
width: 100%;
|
|
140
140
|
height: min(55vw, 500px);
|
|
141
141
|
object-fit: cover;
|
|
142
142
|
border-radius: 10px;
|
|
143
|
-
border: 1px solid var(--
|
|
143
|
+
border: 1px solid var(--bk-border);
|
|
144
144
|
display: block;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.post__body {
|
|
147
|
+
.bk-post__body {
|
|
148
148
|
max-width: 1100px;
|
|
149
149
|
margin: 0 auto;
|
|
150
150
|
padding: 0 2rem;
|
|
@@ -154,7 +154,7 @@ const imgUrl = getFeaturedImageUrl(post);
|
|
|
154
154
|
align-items: start;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.
|
|
157
|
+
.bk-sidebar {
|
|
158
158
|
position: sticky;
|
|
159
159
|
top: 6rem;
|
|
160
160
|
display: flex;
|
|
@@ -162,188 +162,188 @@ const imgUrl = getFeaturedImageUrl(post);
|
|
|
162
162
|
gap: 1.5rem;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.sidebar__block {
|
|
165
|
+
.bk-sidebar__block {
|
|
166
166
|
display: flex;
|
|
167
167
|
flex-direction: column;
|
|
168
168
|
gap: 0.25rem;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.sidebar__label {
|
|
172
|
-
font-family: var(--font-mono);
|
|
171
|
+
.bk-sidebar__label {
|
|
172
|
+
font-family: var(--bk-font-mono);
|
|
173
173
|
font-size: 0.68rem;
|
|
174
174
|
letter-spacing: 1.5px;
|
|
175
175
|
text-transform: uppercase;
|
|
176
|
-
color: var(--
|
|
176
|
+
color: var(--bk-muted);
|
|
177
177
|
margin: 0;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
.sidebar__value {
|
|
181
|
-
font-family: var(--font-body);
|
|
180
|
+
.bk-sidebar__value {
|
|
181
|
+
font-family: var(--bk-font-body);
|
|
182
182
|
font-size: 0.875rem;
|
|
183
|
-
color: var(--
|
|
183
|
+
color: var(--bk-muted-light);
|
|
184
184
|
margin: 0;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.sidebar__divider {
|
|
187
|
+
.bk-sidebar__divider {
|
|
188
188
|
height: 1px;
|
|
189
|
-
background: var(--
|
|
189
|
+
background: var(--bk-border);
|
|
190
190
|
margin: 0.5rem 0;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
.sidebar__back {
|
|
193
|
+
.bk-sidebar__back {
|
|
194
194
|
display: inline-flex;
|
|
195
195
|
align-items: center;
|
|
196
196
|
gap: 0.4rem;
|
|
197
|
-
font-family: var(--font-mono);
|
|
197
|
+
font-family: var(--bk-font-mono);
|
|
198
198
|
font-size: 0.75rem;
|
|
199
|
-
color: var(--
|
|
199
|
+
color: var(--bk-muted);
|
|
200
200
|
text-decoration: none;
|
|
201
201
|
letter-spacing: 0.5px;
|
|
202
202
|
transition: color 0.15s;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
.sidebar__back:hover {
|
|
206
|
-
color: var(--
|
|
205
|
+
.bk-sidebar__back:hover {
|
|
206
|
+
color: var(--bk-accent);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
.post__content {
|
|
210
|
-
color: var(--
|
|
209
|
+
.bk-post__content {
|
|
210
|
+
color: var(--bk-muted-light);
|
|
211
211
|
line-height: 1.85;
|
|
212
212
|
font-size: 1rem;
|
|
213
|
-
font-family: var(--font-body);
|
|
213
|
+
font-family: var(--bk-font-body);
|
|
214
214
|
min-width: 0;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
.post__content :global(h2),
|
|
218
|
-
.post__content :global(h3),
|
|
219
|
-
.post__content :global(h4) {
|
|
220
|
-
font-family: var(--font-display);
|
|
221
|
-
color: var(--
|
|
217
|
+
.bk-post__content :global(h2),
|
|
218
|
+
.bk-post__content :global(h3),
|
|
219
|
+
.bk-post__content :global(h4) {
|
|
220
|
+
font-family: var(--bk-font-display);
|
|
221
|
+
color: var(--bk-text);
|
|
222
222
|
font-weight: 700;
|
|
223
223
|
letter-spacing: -0.01em;
|
|
224
224
|
margin: 2.5rem 0 0.9rem;
|
|
225
225
|
line-height: 1.15;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
.post__content :global(h2) { font-size: 1.75rem; }
|
|
229
|
-
.post__content :global(h3) { font-size: 1.35rem; }
|
|
230
|
-
.post__content :global(h4) { font-size: 1.1rem; }
|
|
228
|
+
.bk-post__content :global(h2) { font-size: 1.75rem; }
|
|
229
|
+
.bk-post__content :global(h3) { font-size: 1.35rem; }
|
|
230
|
+
.bk-post__content :global(h4) { font-size: 1.1rem; }
|
|
231
231
|
|
|
232
|
-
.post__content :global(p) { margin: 0 0 1.25rem; }
|
|
232
|
+
.bk-post__content :global(p) { margin: 0 0 1.25rem; }
|
|
233
233
|
|
|
234
|
-
.post__content :global(strong) {
|
|
235
|
-
color: var(--
|
|
234
|
+
.bk-post__content :global(strong) {
|
|
235
|
+
color: var(--bk-text);
|
|
236
236
|
font-weight: 600;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
.post__content :global(a) {
|
|
240
|
-
color: var(--
|
|
239
|
+
.bk-post__content :global(a) {
|
|
240
|
+
color: var(--bk-accent);
|
|
241
241
|
text-decoration: underline;
|
|
242
242
|
text-decoration-thickness: 1px;
|
|
243
243
|
text-underline-offset: 3px;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
.post__content :global(ul),
|
|
247
|
-
.post__content :global(ol) {
|
|
246
|
+
.bk-post__content :global(ul),
|
|
247
|
+
.bk-post__content :global(ol) {
|
|
248
248
|
padding-left: 1.4rem;
|
|
249
249
|
margin: 0 0 1.4rem;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
.post__content :global(li) { margin-bottom: 0.5rem; }
|
|
252
|
+
.bk-post__content :global(li) { margin-bottom: 0.5rem; }
|
|
253
253
|
|
|
254
|
-
.post__content :global(img) {
|
|
254
|
+
.bk-post__content :global(img) {
|
|
255
255
|
display: block;
|
|
256
256
|
width: 100%;
|
|
257
257
|
border-radius: 10px;
|
|
258
258
|
margin: 2rem 0;
|
|
259
|
-
border: 1px solid var(--
|
|
259
|
+
border: 1px solid var(--bk-border);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
.post__content :global(blockquote) {
|
|
262
|
+
.bk-post__content :global(blockquote) {
|
|
263
263
|
margin: 2rem 0;
|
|
264
264
|
padding: 1rem 1.5rem;
|
|
265
|
-
border-left: 3px solid var(--
|
|
266
|
-
background: var(--
|
|
267
|
-
color: var(--
|
|
265
|
+
border-left: 3px solid var(--bk-accent);
|
|
266
|
+
background: var(--bk-surface);
|
|
267
|
+
color: var(--bk-text);
|
|
268
268
|
border-radius: 0 8px 8px 0;
|
|
269
269
|
font-style: italic;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
.post__content :global(pre) {
|
|
273
|
-
background: var(--
|
|
274
|
-
border: 1px solid var(--
|
|
272
|
+
.bk-post__content :global(pre) {
|
|
273
|
+
background: var(--bk-surface);
|
|
274
|
+
border: 1px solid var(--bk-border);
|
|
275
275
|
border-radius: 8px;
|
|
276
276
|
padding: 1.25rem 1.5rem;
|
|
277
277
|
overflow-x: auto;
|
|
278
278
|
margin: 1.75rem 0;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
.post__content :global(code) {
|
|
282
|
-
font-family: var(--font-mono);
|
|
281
|
+
.bk-post__content :global(code) {
|
|
282
|
+
font-family: var(--bk-font-mono);
|
|
283
283
|
font-size: 0.875rem;
|
|
284
|
-
color: var(--
|
|
284
|
+
color: var(--bk-accent);
|
|
285
285
|
background: rgba(56, 189, 248, 0.08);
|
|
286
286
|
padding: 0.15em 0.4em;
|
|
287
287
|
border-radius: 4px;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
.post__content :global(pre code) {
|
|
290
|
+
.bk-post__content :global(pre code) {
|
|
291
291
|
background: none;
|
|
292
292
|
padding: 0;
|
|
293
|
-
color: var(--
|
|
293
|
+
color: var(--bk-muted-light);
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.post__content :global(table) {
|
|
296
|
+
.bk-post__content :global(table) {
|
|
297
297
|
width: 100%;
|
|
298
298
|
border-collapse: collapse;
|
|
299
299
|
margin: 2rem 0;
|
|
300
300
|
font-size: 0.9rem;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
.post__content :global(th) {
|
|
304
|
-
background: var(--
|
|
305
|
-
color: var(--
|
|
306
|
-
border: 1px solid var(--
|
|
303
|
+
.bk-post__content :global(th) {
|
|
304
|
+
background: var(--bk-surface);
|
|
305
|
+
color: var(--bk-text);
|
|
306
|
+
border: 1px solid var(--bk-border);
|
|
307
307
|
padding: 0.75rem 1rem;
|
|
308
308
|
text-align: left;
|
|
309
|
-
font-family: var(--font-mono);
|
|
309
|
+
font-family: var(--bk-font-mono);
|
|
310
310
|
font-size: 0.75rem;
|
|
311
311
|
letter-spacing: 0.5px;
|
|
312
312
|
text-transform: uppercase;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
.post__content :global(td) {
|
|
316
|
-
border: 1px solid var(--
|
|
315
|
+
.bk-post__content :global(td) {
|
|
316
|
+
border: 1px solid var(--bk-border);
|
|
317
317
|
padding: 0.75rem 1rem;
|
|
318
|
-
color: var(--
|
|
318
|
+
color: var(--bk-muted-light);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
@media (max-width: 768px) {
|
|
322
|
-
.post__hero { padding: 4.5rem 1.25rem 2.5rem; }
|
|
322
|
+
.bk-post__hero { padding: 4.5rem 1.25rem 2.5rem; }
|
|
323
323
|
|
|
324
|
-
.post__image-wrap {
|
|
324
|
+
.bk-post__image-wrap {
|
|
325
325
|
padding: 0 1.25rem;
|
|
326
326
|
margin: 2rem auto;
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
.post__image { height: 240px; }
|
|
329
|
+
.bk-post__image { height: 240px; }
|
|
330
330
|
|
|
331
|
-
.post__body {
|
|
331
|
+
.bk-post__body {
|
|
332
332
|
grid-template-columns: 1fr;
|
|
333
333
|
gap: 2rem;
|
|
334
334
|
padding: 0 1.25rem;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
.post__sidebar {
|
|
337
|
+
.bk-post__sidebar {
|
|
338
338
|
position: static;
|
|
339
339
|
flex-direction: row;
|
|
340
340
|
flex-wrap: wrap;
|
|
341
341
|
gap: 1rem 2rem;
|
|
342
342
|
padding-bottom: 1.5rem;
|
|
343
|
-
border-bottom: 1px solid var(--
|
|
343
|
+
border-bottom: 1px solid var(--bk-border);
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
.sidebar__divider,
|
|
347
|
-
.sidebar__back { display: none; }
|
|
346
|
+
.bk-sidebar__divider,
|
|
347
|
+
.bk-sidebar__back { display: none; }
|
|
348
348
|
}
|
|
349
349
|
</style>
|
|
@@ -49,14 +49,14 @@ const pages = Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
|
49
49
|
gap: 0.75rem;
|
|
50
50
|
flex-wrap: wrap;
|
|
51
51
|
padding-top: 3rem;
|
|
52
|
-
border-top: 2px solid var(--
|
|
52
|
+
border-top: 2px solid var(--bk-gray-200);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.pagination__btn {
|
|
56
56
|
padding: 0.6rem 1.25rem;
|
|
57
|
-
background-color: var(--
|
|
58
|
-
color: var(--
|
|
59
|
-
font-family: var(--font-heading);
|
|
57
|
+
background-color: var(--bk-black);
|
|
58
|
+
color: var(--bk-white);
|
|
59
|
+
font-family: var(--bk-font-heading);
|
|
60
60
|
font-size: 0.9rem;
|
|
61
61
|
font-weight: 700;
|
|
62
62
|
text-transform: uppercase;
|
|
@@ -66,8 +66,8 @@ const pages = Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.pagination__btn:hover {
|
|
69
|
-
background-color: var(--
|
|
70
|
-
color: var(--
|
|
69
|
+
background-color: var(--bk-yellow);
|
|
70
|
+
color: var(--bk-black);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.pagination__pages {
|
|
@@ -82,20 +82,20 @@ const pages = Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
|
82
82
|
place-items: center;
|
|
83
83
|
font-weight: 700;
|
|
84
84
|
font-size: 0.9rem;
|
|
85
|
-
color: var(--
|
|
86
|
-
border: 2px solid var(--
|
|
85
|
+
color: var(--bk-muted);
|
|
86
|
+
border: 2px solid var(--bk-gray-200);
|
|
87
87
|
text-decoration: none;
|
|
88
88
|
transition: border-color 0.2s ease, color 0.2s ease;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.pagination__page:hover {
|
|
92
|
-
border-color: var(--
|
|
93
|
-
color: var(--
|
|
92
|
+
border-color: var(--bk-black);
|
|
93
|
+
color: var(--bk-black);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.pagination__page--active {
|
|
97
|
-
background-color: var(--
|
|
98
|
-
border-color: var(--
|
|
99
|
-
color: var(--
|
|
97
|
+
background-color: var(--bk-yellow);
|
|
98
|
+
border-color: var(--bk-yellow);
|
|
99
|
+
color: var(--bk-black);
|
|
100
100
|
}
|
|
101
101
|
</style>
|
package/integration.ts
CHANGED
|
@@ -28,27 +28,27 @@ function generateThemeCSS(theme: BlogTheme = {}): string {
|
|
|
28
28
|
|
|
29
29
|
return `
|
|
30
30
|
:root {
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--
|
|
34
|
-
--
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--font-heading: ${t.fontHeading};
|
|
47
|
-
--font-body: ${t.fontBody};
|
|
48
|
-
--font-mono: ${t.fontMono};
|
|
49
|
-
--font-display: ${t.fontDisplay};
|
|
50
|
-
--container-max: ${t.containerMax};
|
|
51
|
-
--transition: all 0.2s ease;
|
|
31
|
+
--bk-accent: ${t.accent};
|
|
32
|
+
--bk-background: ${t.background};
|
|
33
|
+
--bk-surface: ${t.surface};
|
|
34
|
+
--bk-text: ${t.text};
|
|
35
|
+
--bk-muted: ${t.muted};
|
|
36
|
+
--bk-muted-light: ${t.mutedLight};
|
|
37
|
+
--bk-border: ${t.border};
|
|
38
|
+
--bk-black: ${t.black};
|
|
39
|
+
--bk-white: ${t.white};
|
|
40
|
+
--bk-yellow: ${t.accent};
|
|
41
|
+
--bk-gray-100: #f3f4f6;
|
|
42
|
+
--bk-gray-200: #e5e7eb;
|
|
43
|
+
--bk-gray-300: #d1d5db;
|
|
44
|
+
--bk-gray-400: #9ca3af;
|
|
45
|
+
--bk-gray-600: #4b5563;
|
|
46
|
+
--bk-font-heading: ${t.fontHeading};
|
|
47
|
+
--bk-font-body: ${t.fontBody};
|
|
48
|
+
--bk-font-mono: ${t.fontMono};
|
|
49
|
+
--bk-font-display: ${t.fontDisplay};
|
|
50
|
+
--bk-container-max: ${t.containerMax};
|
|
51
|
+
--bk-transition: all 0.2s ease;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
*, *::before, *::after {
|
|
@@ -56,13 +56,6 @@ function generateThemeCSS(theme: BlogTheme = {}): string {
|
|
|
56
56
|
margin: 0;
|
|
57
57
|
padding: 0;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
body {
|
|
61
|
-
font-family: var(--font-body);
|
|
62
|
-
background-color: var(--color-bg);
|
|
63
|
-
color: var(--color-text);
|
|
64
|
-
line-height: 1.6;
|
|
65
|
-
}
|
|
66
59
|
`;
|
|
67
60
|
}
|
|
68
61
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ __LAYOUT_IMPORT__
|
|
|
7
7
|
const wp = createWPClient(config.wpUrl);
|
|
8
8
|
const { posts, totalPages } = await wp.getPosts({ perPage: config.postsPerPage ?? 5 });
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const bt = {
|
|
11
11
|
blog: {
|
|
12
12
|
tagline: "__T_TAGLINE__",
|
|
13
13
|
title_line1: "__T_TITLE_LINE1__",
|
|
@@ -30,7 +30,7 @@ __LAYOUT_OPEN__
|
|
|
30
30
|
basePath={`${base}blog/page/`}
|
|
31
31
|
blogBase={`${base}blog/`}
|
|
32
32
|
dateLocale={config.locale ?? "en"}
|
|
33
|
-
t={
|
|
33
|
+
t={bt}
|
|
34
34
|
locale={config.locale ?? "en"}
|
|
35
35
|
layout={config.defaultLayout ?? "magazine"}
|
|
36
36
|
/>
|
|
@@ -12,7 +12,7 @@ export async function getStaticPaths() {
|
|
|
12
12
|
|
|
13
13
|
const { posts, currentPage, totalPages } = Astro.props;
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const bt = {
|
|
16
16
|
blog: {
|
|
17
17
|
tagline: "__T_TAGLINE__",
|
|
18
18
|
title_line1: "__T_TITLE_LINE1__",
|
|
@@ -35,7 +35,7 @@ __LAYOUT_OPEN__
|
|
|
35
35
|
basePath={`${base}blog/page/`}
|
|
36
36
|
blogBase={`${base}blog/`}
|
|
37
37
|
dateLocale={config.locale ?? "en"}
|
|
38
|
-
t={
|
|
38
|
+
t={bt}
|
|
39
39
|
locale={config.locale ?? "en"}
|
|
40
40
|
layout={config.defaultLayout ?? "magazine"}
|
|
41
41
|
/>
|
|
@@ -15,7 +15,7 @@ const { post } = Astro.props;
|
|
|
15
15
|
const wp = createWPClient(config.wpUrl);
|
|
16
16
|
const comments = post.id ? await wp.getComments(post.id) : [];
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const bt = {
|
|
19
19
|
blog: {
|
|
20
20
|
tagline: "__T_TAGLINE__",
|
|
21
21
|
title_line1: "__T_TITLE_LINE1__",
|
|
@@ -29,7 +29,7 @@ const t = {
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
31
|
__LAYOUT_OPEN__
|
|
32
|
-
<BlogPost post={post} t={
|
|
32
|
+
<BlogPost post={post} t={bt} lang={config.locale ?? "en"} />
|
|
33
33
|
<Comments comments={comments} postId={post.id ?? 0} />
|
|
34
34
|
<CommentForm postId={post.id ?? 0} apiRoute="/api/comments" />
|
|
35
35
|
__LAYOUT_CLOSE__
|