Skip to content

Commit de34089

Browse files
authored
Merge pull request #40 from CatCodeMe/color-opt-1221
redesign color
2 parents 28621e4 + 4869aea commit de34089

12 files changed

Lines changed: 553 additions & 127 deletions

File tree

public/styles/fonts.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,17 @@
1414
}
1515

1616
body {
17-
/* 使用本地字体,fallback 到系统字体 */
18-
font-family: "Noto Serif CJK", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
19-
font-weight: normal;
17+
/* Bilingual Font Stack: English First, then Chinese */
18+
/* Using Inter/System for English ensures crispness. PingFang SC is standard for Mac Chinese. */
19+
font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
20+
21+
/* Fix "blurry" text on macOS */
22+
-webkit-font-smoothing: antialiased;
23+
-moz-osx-font-smoothing: grayscale;
24+
25+
/* Fix "dense" layout - open up the lines */
26+
line-height: 1.75;
27+
font-weight: 400;
2028
text-autospace: normal;
2129
}
2230

public/styles/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* 这里只保留 body 样式,字体通过 fonts.css 加载 */
33

44
body {
5-
font-family: "Noto Serif CJK", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
5+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
66
font-weight: normal;
77
}
88

src/assets/home_2.png

1 MB
Loading

src/assets/home_3.png

1.04 MB
Loading

src/assets/styles/app.css

Lines changed: 96 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,76 @@
11
/* Theme */
22
:root {
3-
--background: 50 25% 98%;
4-
--foreground: 30 10% 8%;
3+
/* Shopify-inspired "Polaris" Theme */
4+
/* Clean, Trustworthy, Professional */
5+
6+
--background: 0 0% 100%; /* Pure White Surface */
7+
--foreground: 200 6% 10%; /* Ink Black (almost black, slight cool tone) */
8+
59
--card: 0 0% 100%;
6-
--card-foreground: 30 10% 8%;
10+
--card-foreground: 200 6% 10%;
11+
712
--popover: 0 0% 100%;
8-
--popover-foreground: 30 10% 8%;
9-
--primary: 28 85% 55%;
10-
--primary-foreground: 0 0% 98%;
11-
--secondary: 90 25% 92%;
12-
--secondary-foreground: 30 10% 8%;
13-
--muted: 50 15% 95%;
14-
--muted-foreground: 30 8% 30%;
15-
--accent: 100 45% 75%;
16-
--accent-foreground: 30 10% 8%;
17-
--destructive: 0 72.22% 50.59%;
18-
--destructive-foreground: 0 0% 98%;
19-
--border: 45 20% 85%;
20-
--input: 45 15% 90%;
21-
--ring: 28 85% 55%;
13+
--popover-foreground: 200 6% 10%;
14+
15+
/* Shopify Green-ish Primary - Trust & Growth */
16+
/* #008060 is approx HSL(165, 100%, 25%) but strictly meant for buttons */
17+
/* Let's use a slightly more vibrant/modern web accessible green */
18+
--primary: 165 67% 28%; /* #178260 - Deep Teal/Green */
19+
--primary-foreground: 0 0% 100%;
20+
21+
--secondary: 150 14% 97%; /* Very subtle green tint background */
22+
--secondary-foreground: 165 67% 28%;
23+
24+
--muted: 210 12% 96%; /* Slate 50/100 */
25+
--muted-foreground: 210 9% 45%; /* Slate 500 */
26+
27+
--accent: 150 20% 94%;
28+
--accent-foreground: 165 67% 28%;
29+
30+
--destructive: 0 84.2% 60.2%;
31+
--destructive-foreground: 210 40% 98%;
32+
33+
--border: 210 14% 89%; /* Slate 200 */
34+
--input: 210 14% 89%;
35+
--ring: 165 67% 28%;
36+
2237
--radius: 0.5rem;
2338
--callout-background: 0 0% 100%;
2439
}
40+
2541
.dark {
26-
--background: 30 15% 8%;
27-
--foreground: 0 0% 95%;
28-
--card: 30 12% 10%;
29-
--card-foreground: 0 0% 95%;
30-
--popover: 30 12% 10%;
31-
--popover-foreground: 0 0% 95%;
32-
--primary: 32 90% 65%;
33-
--primary-foreground: 30 15% 8%;
34-
--secondary: 95 35% 20%;
35-
--secondary-foreground: 0 0% 95%;
36-
--muted: 30 10% 15%;
37-
--muted-foreground: 45 10% 65%;
38-
--accent: 100 50% 50%;
39-
--accent-foreground: 30 15% 8%;
40-
--destructive: 0 62.8% 50%;
41-
--destructive-foreground: 0 0% 98%;
42-
--border: 30 15% 25%;
43-
--input: 30 12% 18%;
44-
--ring: 32 90% 65%;
45-
--callout-background: 30 12% 10%;
42+
/* Dark Mode - Deep Slate/Green */
43+
--background: 200 10% 10%; /* Dark Ink */
44+
--foreground: 0 0% 98%;
45+
46+
--card: 200 10% 10%;
47+
--card-foreground: 0 0% 98%;
48+
49+
--popover: 200 10% 10%;
50+
--popover-foreground: 0 0% 98%;
51+
52+
--primary: 160 50% 45%; /* Brighter Green for Dark Mode */
53+
--primary-foreground: 0 0% 100%;
54+
55+
--secondary: 200 10% 16%;
56+
--secondary-foreground: 0 0% 98%;
57+
58+
--muted: 200 10% 16%;
59+
--muted-foreground: 210 10% 65%;
60+
61+
--accent: 200 10% 16%;
62+
--accent-foreground: 0 0% 98%;
63+
64+
--destructive: 0 62.8% 30.6%;
65+
--destructive-foreground: 210 40% 98%;
66+
67+
--border: 200 10% 20%;
68+
--input: 200 10% 20%;
69+
--ring: 160 50% 45%;
70+
71+
--callout-background: 200 10% 16%;
4672
}
73+
4774
:root {
4875
--un-default-border-color: hsl(var(--border) / 1);
4976
}
@@ -53,9 +80,11 @@ html.dark {
5380

5481
/* Global */
5582
a {
83+
text-decoration: none;
5684
transition: color 0.2s ease;
5785
&:hover {
5886
color: hsl(var(--primary) / var(--un-text-opacity, 1));
87+
text-decoration: none; /* Explicitly remove underline */
5988
}
6089
}
6190

@@ -82,20 +111,20 @@ starlight-tabs {
82111
margin-top: .5em;
83112
}
84113

85-
/* Inline code styles */
114+
/* Inline code styles - Clean & Minimal */
86115
.prose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *)) {
87-
font-size: 0.9em !important;
116+
font-size: 0.875em !important;
88117
font-weight: 500 !important;
89118
border-radius: 0.25rem !important;
90-
padding: 0.15rem 0.175rem !important;
91-
margin: 0.125rem 0 !important;
92-
background-color: hsl(var(--secondary)) !important;
119+
padding: 0.15rem 0.3rem !important;
120+
margin: 0 !important;
121+
background-color: hsl(var(--muted)) !important;
93122
border: 1px solid hsl(var(--border)) !important;
94-
color: hsl(var(--foreground)) !important;
123+
color: hsl(var(--foreground)) !important; /* Keep it readable/neutral */
95124
display: inline-block !important;
96125
box-decoration-break: clone !important;
97126
-webkit-box-decoration-break: clone !important;
98-
line-height: 1.6 !important;
127+
line-height: 1.4 !important;
99128
vertical-align: baseline !important;
100129
&::before, &::after {
101130
content: '' !important;
@@ -108,23 +137,32 @@ html.dark .prose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *))
108137
color: hsl(var(--foreground)) !important;
109138
}
110139

111-
/* Blockquote styles */
140+
/* Blockquote styles - Simple & Elegant */
141+
/* Overrides UnoCSS/Tailwind Prose defaults */
112142
.prose blockquote {
113-
background-color: hsl(140 20% 94%) !important;
114-
background-image: radial-gradient(circle, hsl(140 18% 88%) 1px, transparent 1px) !important;
115-
background-size: 12px 12px !important;
116-
border: none !important;
117-
padding-top: .15em !important;
118-
padding-bottom: .15em !important;
143+
font-style: normal !important;
144+
font-weight: 400 !important;
145+
padding: 0.5rem 0 0.5rem 1.25rem !important;
146+
border-left: 3px solid hsl(var(--primary)) !important;
147+
background: transparent !important;
148+
background-image: none !important;
149+
border-radius: 0 !important;
150+
color: hsl(var(--muted-foreground)) !important;
151+
margin-top: 1.5em !important;
152+
margin-bottom: 1.5em !important;
153+
}
154+
155+
/* Remove quotes */
156+
.prose blockquote::before,
157+
.prose blockquote::after {
158+
content: none !important;
119159
}
120160

121161
html.dark .prose blockquote {
122-
background-color: hsl(140 15% 16%) !important;
123-
background-image: radial-gradient(circle, hsl(140 12% 22%) 1px, transparent 1px) !important;
124-
background-size: 12px 12px !important;
125-
border: none !important;
126-
padding-top: 1.25em !important;
127-
padding-bottom: 1.25em !important;
162+
background: transparent !important;
163+
background-image: none !important;
164+
border-left-color: hsl(var(--primary)) !important;
165+
color: hsl(var(--muted-foreground)) !important;
128166
}
129167

130168
/* Reading progress bar using modern CSS scroll-driven animations */
@@ -134,7 +172,7 @@ html.dark .prose blockquote {
134172
position: fixed;
135173
bottom: 0;
136174
left: 0;
137-
height: 2px;
175+
height: 3px;
138176
background: hsl(var(--primary));
139177
width: 0%;
140178
z-index: 9999;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
import { Image } from 'astro:assets'
3+
import homeImage from '@/assets/home_2.png'
4+
---
5+
6+
<div class="home-hero-image-container mb-4 group transition-colors px-3 md:px-5">
7+
<Image
8+
src={homeImage}
9+
alt="Sleeping cat with plants"
10+
class="w-full h-full object-cover rounded-md"
11+
loading="eager"
12+
/>
13+
</div>
14+
15+
<style>
16+
.home-hero-image-container {
17+
height: 200px; /* Adjusted height slightly smaller */
18+
display: flex;
19+
align-items: flex-start; /* Align to top */
20+
justify-content: center;
21+
overflow: hidden;
22+
padding: 0;
23+
}
24+
.home-hero-image-container img {
25+
object-fit: contain;
26+
width: 100%;
27+
height: 100%;
28+
}
29+
</style>

0 commit comments

Comments
 (0)