Skip to content

Commit 02057ed

Browse files
committed
refactor: add contact and blog entry to navbar
1 parent 65d140a commit 02057ed

4 files changed

Lines changed: 83 additions & 68 deletions

File tree

src/components/Nav.astro

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,31 @@ const navItems: NavItem[] = [
1515
label: 'Home',
1616
icon: 'M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6',
1717
},
18-
{
19-
href: '/plog',
20-
label: 'Photography',
21-
icon: 'M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9.5a2.5 2.5 0 00-2.5-2.5H15',
22-
},
2318
{
2419
href: '/projects',
2520
label: 'Projects',
2621
icon: 'M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4',
2722
},
23+
{
24+
href: '/blog',
25+
label: 'Blog',
26+
icon: 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a2 2 0 011.414.586l3.414 3.414A2 2 0 0118 7.414V19a2 2 0 01-2 2z',
27+
},
28+
{
29+
href: '/contact',
30+
label: 'Contact',
31+
icon: 'M21 8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2h14a2 2 0 002-2V8zM5 8l7 4 7-4',
32+
},
33+
{
34+
href: '/plog',
35+
label: 'Photography',
36+
icon: 'M3 7h2l1.5-2h11L19 7h2a1 1 0 011 1v9a2 2 0 01-2 2H4a2 2 0 01-2-2V8a1 1 0 011-1zm9 10a4 4 0 100-8 4 4 0 000 8zm0-2.5a1.5 1.5 0 110-3 1.5 1.5 0 010 3z',
37+
},
2838
{
2939
href: '/about',
3040
label: 'About',
3141
icon: 'M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z',
32-
},
42+
}
3343
];
3444
---
3545
<header class="site-header">

src/pages/about.astro

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,16 @@ const heroImage = avatarImage;
9191
<span class="hero-badge">LLM reasoning</span>
9292
</div>
9393
<div class="hero-meta">
94-
<div class="hero-meta-item">
95-
<span class="meta-label">Location</span>
96-
<span class="meta-value">Shenzhen, China</span>
97-
</div>
98-
<div class="hero-meta-item">
99-
<span class="meta-label">Email</span>
100-
<a
101-
class="meta-value link"
102-
href="mailto:zirui_li_0806@outlook.com"
103-
>
104-
zirui_li_0806@outlook.com
105-
</a>
106-
</div>
94+
<div class="hero-meta-item hero-meta-item--location">
95+
<span class="meta-label">Location</span>
96+
<span class="meta-value">Shenzhen, China</span>
97+
</div>
98+
<div class="hero-meta-item hero-meta-item--email">
99+
<span class="meta-label">Email</span>
100+
<span class="meta-value">
101+
zirui[dot]li[at]stu[dot]hit[dot]edu[dot]cn
102+
</span>
103+
</div>
107104
</div>
108105
</div>
109106
<div class="hero-pane">

src/styles/pages/about.css

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@
5050
color: rgba(var(--accent), 0.9);
5151
}
5252

53-
.hero-name {
54-
font-size: clamp(2.8rem, 6vw, 3.75rem);
55-
font-weight: 800;
56-
margin: 0;
57-
letter-spacing: 0.08em;
58-
color: var(--body-color);
59-
text-shadow:
60-
-2px -2px 2px rgba(255, 255, 255, 0.85),
61-
2px 2px 3px rgba(15, 23, 42, 0.25),
62-
0 1px 0 rgba(255, 255, 255, 0.55),
63-
0 -1px 0 rgba(15, 23, 42, 0.18),
64-
4px 4px 8px rgba(15, 23, 42, 0.12);
65-
}
53+
.hero-name {
54+
font-size: clamp(2.8rem, 6vw, 3.75rem);
55+
font-weight: 800;
56+
margin: 0;
57+
letter-spacing: 0.08em;
58+
color: var(--body-color);
59+
text-shadow:
60+
-2px -2px 2px rgba(255, 255, 255, 0.85),
61+
2px 2px 3px rgba(15, 23, 42, 0.25),
62+
0 1px 0 rgba(255, 255, 255, 0.55),
63+
0 -1px 0 rgba(15, 23, 42, 0.18),
64+
4px 4px 8px rgba(15, 23, 42, 0.12);
65+
}
6666

6767
.hero-role {
6868
font-size: 1.1rem;
@@ -90,20 +90,26 @@
9090
color: var(--body-color);
9191
}
9292

93-
.hero-meta {
94-
display: grid;
95-
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
96-
gap: 1rem;
97-
}
98-
99-
.hero-meta-item {
100-
padding: 1rem;
101-
border-radius: 1rem;
102-
background: var(--neu-base);
103-
box-shadow:
104-
inset 6px 6px 12px var(--neu-shadow-inset-dark),
105-
inset -6px -6px 12px var(--neu-shadow-inset-light);
106-
}
93+
.hero-meta {
94+
display: inline-flex;
95+
gap: 1rem;
96+
flex-wrap: wrap;
97+
align-items: flex-start;
98+
}
99+
100+
.hero-meta-item {
101+
display: inline-flex;
102+
flex-direction: column;
103+
flex: 0 0 auto;
104+
padding: 1rem;
105+
border-radius: 1rem;
106+
background: var(--neu-base);
107+
box-shadow:
108+
inset 6px 6px 12px var(--neu-shadow-inset-dark),
109+
inset -6px -6px 12px var(--neu-shadow-inset-light);
110+
width: fit-content;
111+
max-width: 100%;
112+
}
107113

108114
.meta-label {
109115
display: block;
@@ -130,15 +136,15 @@
130136
border-bottom-color: rgba(var(--accent), 0.7);
131137
}
132138

133-
.dark .hero-name {
134-
color: rgba(235, 235, 246, 0.95);
135-
text-shadow:
136-
-2px -2px 2px rgba(255, 255, 255, 0.2),
137-
2px 2px 3px rgba(0, 0, 0, 0.45),
138-
0 1px 0 rgba(0, 0, 0, 0.35),
139-
0 -1px 0 rgba(255, 255, 255, 0.18),
140-
4px 4px 8px rgba(0, 0, 0, 0.32);
141-
}
139+
.dark .hero-name {
140+
color: rgba(235, 235, 246, 0.95);
141+
text-shadow:
142+
-2px -2px 2px rgba(255, 255, 255, 0.2),
143+
2px 2px 3px rgba(0, 0, 0, 0.45),
144+
0 1px 0 rgba(0, 0, 0, 0.35),
145+
0 -1px 0 rgba(255, 255, 255, 0.18),
146+
4px 4px 8px rgba(0, 0, 0, 0.32);
147+
}
142148

143149
.hero-actions {
144150
display: flex;
@@ -432,15 +438,15 @@
432438
flex-direction: column;
433439
}
434440

435-
.hero-link-grid {
436-
grid-template-columns: 1fr;
437-
}
438-
439-
.item-heading {
440-
flex-direction: column;
441-
align-items: flex-start;
442-
}
443-
}
441+
.hero-link-grid {
442+
grid-template-columns: 1fr;
443+
}
444+
445+
.item-heading {
446+
flex-direction: column;
447+
align-items: flex-start;
448+
}
449+
}
444450

445451
@media (max-width: 480px) {
446452
.hero-name {

src/styles/pages/projects.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,12 @@
304304
background: rgba(255, 255, 255, 0.85);
305305
}
306306

307-
.project-date {
308-
font-size: 0.85rem;
309-
color: var(--subheading-color);
310-
}
307+
.project-date {
308+
font-size: 0.85rem;
309+
color: var(--subheading-color);
310+
white-space: nowrap;
311+
flex-shrink: 0;
312+
}
311313

312314
/* 项目详情页面样式 */
313315
.project-detail-container {

0 commit comments

Comments
 (0)