Skip to content

Commit 5bbcd95

Browse files
committed
优化 page-speed
1 parent 7bbe31a commit 5bbcd95

15 files changed

Lines changed: 233 additions & 436 deletions

File tree

public/styles/global.css

Lines changed: 1 addition & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -234,124 +234,4 @@ body::-webkit-scrollbar {
234234
}
235235
::-webkit-scrollbar-track {
236236
background: transparent;
237-
}
238-
239-
/* AI Notice */
240-
.ai-notice {
241-
position: relative;
242-
display: flex;
243-
flex-direction: column;
244-
padding: 16px;
245-
margin-bottom: 20px;
246-
border-radius: 8px;
247-
color: #8a6d3b;
248-
/* background-color: #fcf8e3; */
249-
background-color: hsl(var(--accent));
250-
overflow: hidden;
251-
}
252-
253-
.ai-notice::before {
254-
content: '';
255-
position: absolute;
256-
top: 0; right: 0; bottom: 0; left: 0;
257-
z-index: -1;
258-
margin: -2px;
259-
border-radius: inherit;
260-
background: linear-gradient(45deg, #f0ad4e, #f8e3a1, #f0ad4e);
261-
}
262-
263-
.ai-notice-robot-icon {
264-
position: absolute;
265-
top: 12px;
266-
right: 12px;
267-
color: #8a6d3b;
268-
opacity: 0.5;
269-
}
270-
271-
.ai-notice-text p {
272-
margin: 0;
273-
line-height: 1.6;
274-
padding-right: 30px; /* Add padding to avoid text overlapping the icon */
275-
}
276-
277-
.ai-notice-text p:first-child {
278-
font-weight: bold;
279-
}
280-
281-
.ai-notice-footer {
282-
display: flex;
283-
justify-content: flex-end; /* Align items to the right */
284-
align-items: center;
285-
flex-wrap: wrap;
286-
gap: 10px;
287-
margin-top: 12px;
288-
padding-top: 12px;
289-
border-top: 1px solid rgba(138, 109, 59, 0.2);
290-
font-size: 0.8rem;
291-
}
292-
293-
.ai-notice-models {
294-
display: flex;
295-
align-items: center;
296-
gap: 6px;
297-
flex-wrap: wrap;
298-
}
299-
300-
.ai-model-tag {
301-
padding: 2px 8px;
302-
border-radius: 4px;
303-
background-color: rgba(138, 109, 59, 0.1);
304-
color: #8a6d3b;
305-
font-weight: 500;
306-
}
307-
308-
.publish-date {
309-
color: #8a6d3b;
310-
white-space: nowrap;
311-
}
312-
313-
/* Dark Mode Styles */
314-
.dark .ai-notice {
315-
color: #c0a97a;
316-
/* background-color: #2c2a22; */
317-
background-color: hsl(var(--accent));
318-
}
319-
320-
.dark .ai-notice::before {
321-
background: linear-gradient(45deg, #f0ad4e, #5c5a52, #f0ad4e);
322-
}
323-
324-
.dark .ai-notice-robot-icon,
325-
.dark .publish-date,
326-
.dark .ai-model-tag {
327-
color: #c0a97a;
328-
}
329-
330-
.dark .ai-model-tag {
331-
background-color: rgba(192, 169, 122, 0.1);
332-
}
333-
334-
.dark .ai-notice-footer {
335-
border-top-color: rgba(192, 169, 122, 0.2);
336-
}
337-
338-
/* AI Tag Icon in Post Preview */
339-
/* .ai-tag-icon {
340-
display: inline-flex;
341-
align-items: center;
342-
margin-left: 8px;
343-
color: hsl(var(--muted-foreground));
344-
transition: color 0.3s ease-in-out;
345-
}
346-
347-
.post-preview:hover .ai-tag-icon {
348-
color: var(--preview-highlight-final, hsl(var(--primary)));
349-
}
350-
351-
.dark .ai-tag-icon {
352-
color: hsl(var(--muted-foreground));
353-
}
354-
355-
.dark .post-preview:hover .ai-tag-icon {
356-
color: var(--preview-highlight-final, hsl(var(--primary)));
357-
} */
237+
}

src/assets/styles/ai-notice.css

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
/* AI Notice */
2+
.ai-notice {
3+
position: relative;
4+
display: flex;
5+
flex-direction: column;
6+
padding: 16px;
7+
margin-bottom: 20px;
8+
border-radius: 8px;
9+
color: #8a6d3b;
10+
/* background-color: #fcf8e3; */
11+
background-color: hsl(var(--accent));
12+
overflow: hidden;
13+
}
14+
15+
.ai-notice::before {
16+
content: '';
17+
position: absolute;
18+
top: 0;
19+
right: 0;
20+
bottom: 0;
21+
left: 0;
22+
z-index: -1;
23+
margin: -2px;
24+
border-radius: inherit;
25+
background: linear-gradient(45deg, #f0ad4e, #f8e3a1, #f0ad4e);
26+
}
27+
28+
.ai-notice-robot-icon {
29+
position: absolute;
30+
top: 12px;
31+
right: 12px;
32+
color: #8a6d3b;
33+
opacity: 0.5;
34+
}
35+
36+
.ai-notice-text p {
37+
margin: 0;
38+
line-height: 1.6;
39+
padding-right: 30px;
40+
/* Add padding to avoid text overlapping the icon */
41+
}
42+
43+
.ai-notice-text p:first-child {
44+
font-weight: bold;
45+
}
46+
47+
.ai-notice-footer {
48+
display: flex;
49+
justify-content: flex-end;
50+
/* Align items to the right */
51+
align-items: center;
52+
flex-wrap: wrap;
53+
gap: 10px;
54+
margin-top: 12px;
55+
padding-top: 12px;
56+
border-top: 1px solid rgba(138, 109, 59, 0.2);
57+
font-size: 0.8rem;
58+
}
59+
60+
.ai-notice-models {
61+
display: flex;
62+
align-items: center;
63+
gap: 6px;
64+
flex-wrap: wrap;
65+
}
66+
67+
.ai-model-tag {
68+
padding: 2px 8px;
69+
border-radius: 4px;
70+
background-color: rgba(138, 109, 59, 0.1);
71+
color: #8a6d3b;
72+
font-weight: 500;
73+
}
74+
75+
.publish-date {
76+
color: #8a6d3b;
77+
white-space: nowrap;
78+
}
79+
80+
/* Dark Mode Styles */
81+
.dark .ai-notice {
82+
color: #c0a97a;
83+
/* background-color: #2c2a22; */
84+
background-color: hsl(var(--accent));
85+
}
86+
87+
.dark .ai-notice::before {
88+
background: linear-gradient(45deg, #f0ad4e, #5c5a52, #f0ad4e);
89+
}
90+
91+
.dark .ai-notice-robot-icon,
92+
.dark .publish-date,
93+
.dark .ai-model-tag {
94+
color: #c0a97a;
95+
}
96+
97+
.dark .ai-model-tag {
98+
background-color: rgba(192, 169, 122, 0.1);
99+
}
100+
101+
.dark .ai-notice-footer {
102+
border-top-color: rgba(192, 169, 122, 0.2);
103+
}
104+
105+
/* AI Tag Icon in Post Preview */
106+
/* .ai-tag-icon {
107+
display: inline-flex;
108+
align-items: center;
109+
margin-left: 8px;
110+
color: hsl(var(--muted-foreground));
111+
transition: color 0.3s ease-in-out;
112+
}
113+
114+
.post-preview:hover .ai-tag-icon {
115+
color: var(--preview-highlight-final, hsl(var(--primary)));
116+
}
117+
118+
.dark .ai-tag-icon {
119+
color: hsl(var(--muted-foreground));
120+
}
121+
122+
.dark .post-preview:hover .ai-tag-icon {
123+
color: var(--preview-highlight-final, hsl(var(--primary)));
124+
} */

src/content/blog/coding/bloom_filter.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ai-model:
1212
- gemini-2.5-pro
1313
heroImage:
1414
src: ./attachments/bloom_filter.png
15+
color: '#047677'
1516
---
1617

1718

src/content/blog/test/a.mdx

Lines changed: 85 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
2-
title: 我是 a 的标题
2+
title: 'Test: inner-link,wiki-link,callout,mermaid'
33
publishDate: 2025-07-01
44
description: 'astro-theme-pure Personalized Customization Guide'
55
tags:
6-
- Waline
7-
- Vercel
8-
- Supabase
6+
- test
97
language: 'english'
108
ai-model:
119
- gemini-2.5-pro
@@ -24,13 +22,12 @@ redirect_from:
2422
[y](http://youtube.com)
2523
[a](http://acm.com)
2624

27-
- 内部链接:[[blog/b|xxwqre]]
28-
- 内部链接:[[blog/x|not found]]
25+
# wikilink
26+
- 内部链接:[[blog/test/b|xxwqre]]
27+
- 内部链接:[[blog/test/x|not found]]
2928
- 同 1 个文件夹 c: [[blog/c]]
3029
blog 下不同子文件夹同名: [[blog/markdown/index|en md]]
31-
{/* blog 下不同子文件夹同名: [[blog/markdown-zh/index|zh md]] */}
3230

33-
[[docs/advanced/faq]]
3431

3532

3633

@@ -111,4 +108,83 @@ Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd>to end the session.
111108

112109
使用 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Del</kbd> 重启电脑
113110

114-
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
111+
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
112+
113+
114+
```mermaid
115+
---
116+
config:
117+
sankey:
118+
showValues: false
119+
---
120+
sankey-beta
121+
122+
Agricultural 'waste',Bio-conversion,124.729
123+
Bio-conversion,Liquid,0.597
124+
Bio-conversion,Losses,26.862
125+
Bio-conversion,Solid,280.322
126+
Bio-conversion,Gas,81.144
127+
Biofuel imports,Liquid,35
128+
Biomass imports,Solid,35
129+
Coal imports,Coal,11.606
130+
Coal reserves,Coal,63.965
131+
Coal,Solid,75.571
132+
District heating,Industry,10.639
133+
District heating,Heating and cooling - commercial,22.505
134+
District heating,Heating and cooling - homes,46.184
135+
Electricity grid,Over generation / exports,104.453
136+
Electricity grid,Heating and cooling - homes,113.726
137+
Electricity grid,H2 conversion,27.14
138+
Electricity grid,Industry,342.165
139+
Electricity grid,Road transport,37.797
140+
Electricity grid,Agriculture,4.412
141+
Electricity grid,Heating and cooling - commercial,40.858
142+
Electricity grid,Losses,56.691
143+
Electricity grid,Rail transport,7.863
144+
Electricity grid,Lighting & appliances - commercial,90.008
145+
Electricity grid,Lighting & appliances - homes,93.494
146+
Gas imports,Ngas,40.719
147+
Gas reserves,Ngas,82.233
148+
Gas,Heating and cooling - commercial,0.129
149+
Gas,Losses,1.401
150+
Gas,Thermal generation,151.891
151+
Gas,Agriculture,2.096
152+
Gas,Industry,48.58
153+
Geothermal,Electricity grid,7.013
154+
H2 conversion,H2,20.897
155+
H2 conversion,Losses,6.242
156+
H2,Road transport,20.897
157+
Hydro,Electricity grid,6.995
158+
Liquid,Industry,121.066
159+
Liquid,International shipping,128.69
160+
Liquid,Road transport,135.835
161+
Liquid,Domestic aviation,14.458
162+
Liquid,International aviation,206.267
163+
Liquid,Agriculture,3.64
164+
Liquid,National navigation,33.218
165+
Liquid,Rail transport,4.413
166+
Marine algae,Bio-conversion,4.375
167+
Ngas,Gas,122.952
168+
Nuclear,Thermal generation,839.978
169+
Oil imports,Oil,504.287
170+
Oil reserves,Oil,107.703
171+
Oil,Liquid,611.99
172+
Other waste,Solid,56.587
173+
Other waste,Bio-conversion,77.81
174+
Pumped heat,Heating and cooling - homes,193.026
175+
Pumped heat,Heating and cooling - commercial,70.672
176+
Solar PV,Electricity grid,59.901
177+
Solar Thermal,Heating and cooling - homes,19.263
178+
Solar,Solar Thermal,19.263
179+
Solar,Solar PV,59.901
180+
Solid,Agriculture,0.882
181+
Solid,Thermal generation,400.12
182+
Solid,Industry,46.477
183+
Thermal generation,Electricity grid,525.531
184+
Thermal generation,Losses,787.129
185+
Thermal generation,District heating,79.329
186+
Tidal,Electricity grid,9.452
187+
UK land based bioenergy,Bio-conversion,182.01
188+
Wave,Electricity grid,19.013
189+
Wind,Electricity grid,289.366
190+
```

src/content/blog/test/b.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
---
2-
title: 我是 b 的标题
3-
publishDate: 2025-07-27
2+
title: 'Test: url in this site'
3+
publishDate: 2025-01-27
44
description: 'astro-theme-pure Personalized Customization Guide'
55
tags:
6-
- Waline
7-
- Vercel
8-
- Supabase
6+
- test
97
language: 'English'
108
---
119

1210

13-
我是外部的 b
11+
我是内部的 b
1412

1513

1614
>[!error] 123

0 commit comments

Comments
 (0)