Skip to content

Commit a507b0b

Browse files
committed
调整 detail 样式
1 parent 21e26c3 commit a507b0b

File tree

2 files changed

+142
-1
lines changed

2 files changed

+142
-1
lines changed

src/assets/styles/app.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,63 @@ a {
7878
::view-transition-new(root) {
7979
z-index: 999;
8080
}
81+
82+
/* Details/Summary Styles */
83+
details {
84+
border-radius: 8px;
85+
margin: 1rem 0;
86+
padding: 1rem;
87+
border: 1px solid hsl(var(--border));
88+
background-color: hsl(var(--muted) / var(--un-bg-opacity, 1)) !important;
89+
transition: background-color 0.2s ease, border-color 0.2s ease;
90+
}
91+
92+
details summary {
93+
font-weight: 700;
94+
margin: 0;
95+
display: flex;
96+
align-items: center;
97+
gap: 0.5rem;
98+
cursor: pointer;
99+
list-style: none;
100+
color: hsl(var(--foreground));
101+
transition: color 0.2s ease;
102+
}
103+
104+
details summary::-webkit-details-marker {
105+
display: none;
106+
}
107+
108+
details summary::before {
109+
content: ''; /* No character content */
110+
display: inline-block;
111+
width: 1em; /* Adjust size as needed */
112+
height: 1em; /* Adjust size as needed */
113+
margin-right: 0.5rem;
114+
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='hsl(240 10% 3.9%)' d='m8.177.677 2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25a.75.75 0 0 1-1.5 0V4H5.104a.25.25 0 0 1-.177-.427L7.823.677a.25.25 0 0 1 .354 0ZM7.25 10.75a.75.75 0 0 1 1.5 0V12h2.146a.25.25 0 0 1 .177.427l-2.896 2.896a.25.25 0 0 1-.354 0l-2.896-2.896A.25.25 0 0 1 5.104 12H7.25v-1.25Zm-5-2a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z'/></svg>");
115+
background-repeat: no-repeat;
116+
background-position: center;
117+
background-size: contain;
118+
transition: background-image 0.2s ease;
119+
}
120+
121+
html.dark details summary::before {
122+
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='hsl(0 0% 98%)' d='m8.177.677 2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25a.75.75 0 0 1-1.5 0V4H5.104a.25.25 0 0 1-.177-.427L7.823.677a.25.25 0 0 1 .354 0ZM7.25 10.75a.75.75 0 0 1 1.5 0V12h2.146a.25.25 0 0 1 .177.427l-2.896 2.896a.25.25 0 0 1-.354 0l-2.896-2.896A.25.25 0 0 1 5.104 12H7.25v-1.25Zm-5-2a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z'/></svg>");
123+
}
124+
125+
126+
details[open] summary::before {
127+
transform: none;
128+
}
129+
130+
details .details-content {
131+
margin-top: 1rem;
132+
color: hsl(var(--muted-foreground));
133+
}
134+
135+
details .details-content > :first-child {
136+
margin-top: 0;
137+
}
138+
details .details-content > :last-child {
139+
margin-bottom: 0;
140+
}

src/content/blog/markdown/index.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publishDate: 2024-07-26 08:00:00
44
description: 'Markdown is a lightweight markup language.'
55
tags:
66
- Markdown
7-
heroImage: { src: './thumbnail.jpg', color: '#B4C6DA' }
7+
heroImage: { src: './thumbnail.jpg', color: '#c8d57fff' }
88
language: 'English'
99
redirect_from:
1010
- m1
@@ -313,3 +313,84 @@ Preview:
313313
## Embedding Astro Components
314314

315315
See [User Components](/docs/integrations/components) and [Advanced Components](/docs/integrations/advanced) for details.
316+
317+
318+
319+
320+
```mermaid
321+
---
322+
config:
323+
sankey:
324+
showValues: false
325+
---
326+
sankey-beta
327+
328+
Agricultural 'waste',Bio-conversion,124.729
329+
Bio-conversion,Liquid,0.597
330+
Bio-conversion,Losses,26.862
331+
Bio-conversion,Solid,280.322
332+
Bio-conversion,Gas,81.144
333+
Biofuel imports,Liquid,35
334+
Biomass imports,Solid,35
335+
Coal imports,Coal,11.606
336+
Coal reserves,Coal,63.965
337+
Coal,Solid,75.571
338+
District heating,Industry,10.639
339+
District heating,Heating and cooling - commercial,22.505
340+
District heating,Heating and cooling - homes,46.184
341+
Electricity grid,Over generation / exports,104.453
342+
Electricity grid,Heating and cooling - homes,113.726
343+
Electricity grid,H2 conversion,27.14
344+
Electricity grid,Industry,342.165
345+
Electricity grid,Road transport,37.797
346+
Electricity grid,Agriculture,4.412
347+
Electricity grid,Heating and cooling - commercial,40.858
348+
Electricity grid,Losses,56.691
349+
Electricity grid,Rail transport,7.863
350+
Electricity grid,Lighting & appliances - commercial,90.008
351+
Electricity grid,Lighting & appliances - homes,93.494
352+
Gas imports,Ngas,40.719
353+
Gas reserves,Ngas,82.233
354+
Gas,Heating and cooling - commercial,0.129
355+
Gas,Losses,1.401
356+
Gas,Thermal generation,151.891
357+
Gas,Agriculture,2.096
358+
Gas,Industry,48.58
359+
Geothermal,Electricity grid,7.013
360+
H2 conversion,H2,20.897
361+
H2 conversion,Losses,6.242
362+
H2,Road transport,20.897
363+
Hydro,Electricity grid,6.995
364+
Liquid,Industry,121.066
365+
Liquid,International shipping,128.69
366+
Liquid,Road transport,135.835
367+
Liquid,Domestic aviation,14.458
368+
Liquid,International aviation,206.267
369+
Liquid,Agriculture,3.64
370+
Liquid,National navigation,33.218
371+
Liquid,Rail transport,4.413
372+
Marine algae,Bio-conversion,4.375
373+
Ngas,Gas,122.952
374+
Nuclear,Thermal generation,839.978
375+
Oil imports,Oil,504.287
376+
Oil reserves,Oil,107.703
377+
Oil,Liquid,611.99
378+
Other waste,Solid,56.587
379+
Other waste,Bio-conversion,77.81
380+
Pumped heat,Heating and cooling - homes,193.026
381+
Pumped heat,Heating and cooling - commercial,70.672
382+
Solar PV,Electricity grid,59.901
383+
Solar Thermal,Heating and cooling - homes,19.263
384+
Solar,Solar Thermal,19.263
385+
Solar,Solar PV,59.901
386+
Solid,Agriculture,0.882
387+
Solid,Thermal generation,400.12
388+
Solid,Industry,46.477
389+
Thermal generation,Electricity grid,525.531
390+
Thermal generation,Losses,787.129
391+
Thermal generation,District heating,79.329
392+
Tidal,Electricity grid,9.452
393+
UK land based bioenergy,Bio-conversion,182.01
394+
Wave,Electricity grid,19.013
395+
Wind,Electricity grid,289.366
396+
```

0 commit comments

Comments
 (0)