Skip to content

Commit aed23cc

Browse files
committed
ui: enhancements 🧝‍
1 parent b0d9afb commit aed23cc

File tree

3 files changed

+88
-66
lines changed

3 files changed

+88
-66
lines changed

components/PageHead.tsx

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ export const PageHead: React.FC<
2828
name='viewport'
2929
content='width=device-width, initial-scale=1, shrink-to-fit=no'
3030
/>
31+
<meta
32+
name='theme-color'
33+
media='(prefers-color-scheme: light)'
34+
content='#fefffe'
35+
key='theme-color-light'
36+
/>
37+
<meta
38+
name='theme-color'
39+
media='(prefers-color-scheme: dark)'
40+
content='#2d3439'
41+
key='theme-color-dark'
42+
/>
3143

3244
<meta name='robots' content='index,follow' />
3345
<meta property='og:type' content='website' />

docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ services:
33
blog-app:
44
build: .
55
ports:
6-
- "8888:3000"
6+
- '8888:3000'

styles/notion.css

+75-65
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
--notion-header-height: 54px;
1313
}
1414

15+
.notion-frame {
16+
padding: 0;
17+
}
18+
1519
.notion-page {
1620
padding-bottom: calc(max(5vh, 32px)) !important;
1721
line-height: 1.65;
@@ -34,7 +38,7 @@
3438
margin-bottom: 1em;
3539
}
3640

37-
.notion-asset-wrapper-video > div,
41+
.notion-asset-wrapper-video>div,
3842
.notion-asset-wrapper-video video {
3943
width: 100% !important;
4044
}
@@ -98,6 +102,7 @@
98102

99103
/* only target safari */
100104
@media screen and (-webkit-min-device-pixel-ratio: 0) {
105+
101106
_::-webkit-full-page-media,
102107
_:future,
103108
:root,
@@ -180,6 +185,7 @@
180185
}
181186

182187
@media only screen and (max-width: 1200px) {
188+
183189
.notion-page-cover-wrapper,
184190
.notion-page-cover-wrapper span,
185191
.notion-page-cover-wrapper img {
@@ -229,101 +235,83 @@
229235
background-color: none;
230236

231237
/* light yellow */
232-
background-image: linear-gradient(
233-
90deg,
234-
var(--bg-color),
235-
#fdeed2 10.5%,
236-
#fde4b5 85.29%,
237-
var(--bg-color)
238-
);
238+
background-image: linear-gradient(90deg,
239+
var(--bg-color),
240+
#fdeed2 10.5%,
241+
#fde4b5 85.29%,
242+
var(--bg-color));
239243
}
240244

241245
.notion-purple_background {
242246
/* light pink */
243-
background-image: linear-gradient(
244-
90deg,
245-
var(--bg-color),
246-
#e4d3fd 10.5%,
247-
#d3b6ff 85.29%,
248-
var(--bg-color)
249-
);
247+
background-image: linear-gradient(90deg,
248+
var(--bg-color),
249+
#e4d3fd 10.5%,
250+
#d3b6ff 85.29%,
251+
var(--bg-color));
250252
}
251253

252254
.notion-pink_background {
253255
/* light pink */
254-
background-image: linear-gradient(
255-
90deg,
256-
var(--bg-color),
257-
#ffd2e7 10.5%,
258-
#ffadd3 85.29%,
259-
var(--bg-color)
260-
);
256+
background-image: linear-gradient(90deg,
257+
var(--bg-color),
258+
#ffd2e7 10.5%,
259+
#ffadd3 85.29%,
260+
var(--bg-color));
261261
}
262262

263263
.notion-gray_background {
264264
/* light blue */
265-
background-image: linear-gradient(
266-
90deg,
267-
var(--bg-color),
268-
#cfcfcf 10.5%,
269-
#a0a0a0 85.29%,
270-
var(--bg-color)
271-
);
265+
background-image: linear-gradient(90deg,
266+
var(--bg-color),
267+
#cfcfcf 10.5%,
268+
#a0a0a0 85.29%,
269+
var(--bg-color));
272270
}
273271

274272
.notion-blue_background {
275273
/* light blue */
276-
background-image: linear-gradient(
277-
90deg,
278-
var(--bg-color),
279-
#d9eafd 10.5%,
280-
#b3d6ff 85.29%,
281-
var(--bg-color)
282-
);
274+
background-image: linear-gradient(90deg,
275+
var(--bg-color),
276+
#d9eafd 10.5%,
277+
#b3d6ff 85.29%,
278+
var(--bg-color));
283279
}
284280

285281
.notion-red_background {
286282
/* light red */
287-
background-image: linear-gradient(
288-
90deg,
289-
var(--bg-color),
290-
#ffc3c3 10.5%,
291-
#fba6a3 85.29%,
292-
var(--bg-color)
293-
);
283+
background-image: linear-gradient(90deg,
284+
var(--bg-color),
285+
#ffc3c3 10.5%,
286+
#fba6a3 85.29%,
287+
var(--bg-color));
294288
}
295289

296290
.notion-orange_background {
297291
/* light red */
298-
background-image: linear-gradient(
299-
90deg,
300-
var(--bg-color),
301-
#ffe6b1 10.5%,
302-
#ffd09b 85.29%,
303-
var(--bg-color)
304-
);
292+
background-image: linear-gradient(90deg,
293+
var(--bg-color),
294+
#ffe6b1 10.5%,
295+
#ffd09b 85.29%,
296+
var(--bg-color));
305297
}
306298

307299
.notion-teal_background {
308300
/* light green */
309-
background-image: linear-gradient(
310-
90deg,
311-
var(--bg-color),
312-
#d4eabc 10.5%,
313-
#d2eabc 85.29%,
314-
var(--bg-color)
315-
);
301+
background-image: linear-gradient(90deg,
302+
var(--bg-color),
303+
#d4eabc 10.5%,
304+
#d2eabc 85.29%,
305+
var(--bg-color));
316306
}
317307

318308
.notion-brown_background {
319309
/* dark blue */
320-
background-image: linear-gradient(
321-
90deg,
322-
var(--bg-color),
323-
#cab7ae 10.5%,
324-
#b1998d 85.29%,
325-
var(--bg-color)
326-
);
310+
background-image: linear-gradient(90deg,
311+
var(--bg-color),
312+
#cab7ae 10.5%,
313+
#b1998d 85.29%,
314+
var(--bg-color));
327315
}
328316

329317
.dark-mode .notion-red_background,
@@ -346,6 +334,7 @@
346334
border-radius: 50%;
347335
box-shadow: 0 8px 40px 0 rgb(0 0 0 / 21%);
348336
}
337+
349338
.notion-page-icon-hero.notion-page-icon-image span,
350339
.notion-page-icon-hero.notion-page-icon-image img {
351340
border-radius: 50%;
@@ -394,7 +383,8 @@
394383

395384
.notion-aside {
396385
overflow-x: hidden;
397-
padding-left: 24px; /* Adjust the space between the main content and the table of content here */
386+
padding-left: 24px;
387+
/* Adjust the space between the main content and the table of content here */
398388
}
399389

400390
.notion-aside-table-of-contents {
@@ -405,3 +395,23 @@
405395
overflow: hidden;
406396
text-overflow: ellipsis;
407397
}
398+
399+
::-webkit-scrollbar {
400+
width: 5px;
401+
height: 5px;
402+
background-color: #F5F5F5;
403+
background-color: var(--bg-color-1);
404+
}
405+
406+
::-webkit-scrollbar-thumb {
407+
border-radius: 10px;
408+
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
409+
background-color: #555;
410+
border-radius: 10px;
411+
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
412+
background-color: var(--fg-color-1);
413+
}
414+
415+
::-webkit-scrollbar-track {
416+
background-color: var(--bg-color);
417+
}

0 commit comments

Comments
 (0)