@@ -4,38 +4,55 @@ import "../styles/global.css";
4
4
import { ClientRouter } from " astro:transitions" ;
5
5
import gopherImage from " ../assets/pilot-bust.svg" ;
6
6
import { Image } from " astro:assets" ;
7
- const { description, keywords , selected} = Astro .props ;
7
+ const { description, keywords, selected } = Astro .props ;
8
8
---
9
9
10
10
<html lang =" zh" >
11
11
<head >
12
12
<meta charset =" utf-8" />
13
13
<link rel =" icon" href =" /favicon.svg" type =" image/svg" />
14
14
<link rel =" sitemap" href =" /sitemap-index.xml" />
15
- <script src =" ../scripts/swUnregister.ts" / >
15
+ <script src =" ../scripts/swUnregister.ts" ></ script >
16
16
<ClientRouter />
17
17
<meta name =" viewport" content =" width=device-width, initial-scale=1" />
18
18
<meta name =" description" content ={ description } />
19
19
<meta name =" keywords" content ={ keywords } />
20
20
<meta name =" author" content =" LingLambda" />
21
21
<!-- 统一不同浏览器的默认样式 -->
22
- <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity =" sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w==" crossorigin =" anonymous" referrerpolicy =" no-referrer" />
22
+ <link
23
+ rel =" stylesheet"
24
+ href =" https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
25
+ integrity =" sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="
26
+ crossorigin =" anonymous"
27
+ referrerpolicy =" no-referrer"
28
+ />
23
29
<title >Ling的小窝</title >
24
30
</head >
25
31
<body >
26
32
<div id =" container" >
27
33
<header id =" menu" >
28
- <HeadMenu />
34
+ <HeadMenu />
29
35
</header >
30
- <slot / >
36
+ <slot >暂时还没有内容哦</ slot >
31
37
<!-- <hr style="width:600px;color:#808080; margin-top: 1rem;" /> -->
32
38
<footer >
33
- <Image class =" gopher" src ={ gopherImage } height =32 alt =" gopher" title =" 这个博客和 Golang 没有任何关系,但是土拨鼠很可爱" loading =" eager" />
39
+ <Image
40
+ class =" gopher"
41
+ src ={ gopherImage }
42
+ height =" 32"
43
+ alt =" gopher"
44
+ title =" 这个博客和 Golang 没有任何关系,但是土拨鼠很可爱"
45
+ loading =" eager"
46
+ />
34
47
<!-- <Image src={notByAi} alt="not-by-ai" /> -->
35
48
<p >© 2024-2025</p >
36
49
<p >LingLambda</p >
37
50
<p >
38
- <a href =" https://icp.gov.moe/?keyword=20251154" target =" _blank" class =" footer-link" >萌ICP备20251154号</a >
51
+ <a
52
+ href =" https://icp.gov.moe/?keyword=20251154"
53
+ target =" _blank"
54
+ class =" footer-link" >萌ICP备20251154号</a
55
+ >
39
56
</p >
40
57
<p >
41
58
本站使用 <a href =" https://astro.build" class =" footer-link" >Astro</a > 编写
@@ -49,11 +66,15 @@ const { description, keywords ,selected} = Astro.props;
49
66
const menu = document.getElementById("menu");
50
67
if (menu instanceof HTMLElement) {
51
68
let lastScrollTop = 0;
52
- addEventListener("scroll", () => {
53
- const scrollTop = window.scrollY;
54
- menu.style.top = scrollTop > lastScrollTop ? "-5.5rem" : "0.2rem";
55
- lastScrollTop = scrollTop;
56
- }, { passive: true });
69
+ addEventListener(
70
+ "scroll",
71
+ () => {
72
+ const scrollTop = window.scrollY;
73
+ menu.style.top = scrollTop > lastScrollTop ? "-5.5rem" : "0.2rem";
74
+ lastScrollTop = scrollTop;
75
+ },
76
+ { passive: true }
77
+ );
57
78
}
58
79
</script >
59
80
@@ -65,7 +86,7 @@ const { description, keywords ,selected} = Astro.props;
65
86
html {
66
87
background-color: rgb(250, 252, 254);
67
88
/* scrollbar-gutter: stable; */ /* 防止滚动条导致页面宽度不一致 */
68
- overflow-y: scroll; /*总是显示滚动条*/
89
+ overflow-y: scroll; /*总是显示滚动条*/
69
90
}
70
91
71
92
html,
@@ -127,8 +148,8 @@ const { description, keywords ,selected} = Astro.props;
127
148
img {
128
149
max-width: 36rem;
129
150
}
130
-
131
- .gopher{
151
+
152
+ .gopher {
132
153
align-self: flex-end;
133
154
}
134
155
</style >
0 commit comments