@@ -4,38 +4,55 @@ import "../styles/global.css";
44import { ClientRouter } from " astro:transitions" ;
55import gopherImage from " ../assets/pilot-bust.svg" ;
66import { Image } from " astro:assets" ;
7- const { description, keywords , selected} = Astro .props ;
7+ const { description, keywords, selected } = Astro .props ;
88---
99
1010<html lang =" zh" >
1111 <head >
1212 <meta charset =" utf-8" />
1313 <link rel =" icon" href =" /favicon.svg" type =" image/svg" />
1414 <link rel =" sitemap" href =" /sitemap-index.xml" />
15- <script src =" ../scripts/swUnregister.ts" / >
15+ <script src =" ../scripts/swUnregister.ts" ></ script >
1616 <ClientRouter />
1717 <meta name =" viewport" content =" width=device-width, initial-scale=1" />
1818 <meta name =" description" content ={ description } />
1919 <meta name =" keywords" content ={ keywords } />
2020 <meta name =" author" content =" LingLambda" />
2121 <!-- 统一不同浏览器的默认样式 -->
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+ />
2329 <title >Ling的小窝</title >
2430 </head >
2531 <body >
2632 <div id =" container" >
2733 <header id =" menu" >
28- <HeadMenu />
34+ <HeadMenu />
2935 </header >
30- <slot / >
36+ <slot >暂时还没有内容哦</ slot >
3137 <!-- <hr style="width:600px;color:#808080; margin-top: 1rem;" /> -->
3238 <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+ />
3447 <!-- <Image src={notByAi} alt="not-by-ai" /> -->
3548 <p >© 2024-2025</p >
3649 <p >LingLambda</p >
3750 <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+ >
3956 </p >
4057 <p >
4158 本站使用 <a href =" https://astro.build" class =" footer-link" >Astro</a > 编写
@@ -49,11 +66,15 @@ const { description, keywords ,selected} = Astro.props;
4966 const menu = document.getElementById("menu");
5067 if (menu instanceof HTMLElement) {
5168 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+ );
5778 }
5879</script >
5980
@@ -65,7 +86,7 @@ const { description, keywords ,selected} = Astro.props;
6586 html {
6687 background-color: rgb(250, 252, 254);
6788 /* scrollbar-gutter: stable; */ /* 防止滚动条导致页面宽度不一致 */
68- overflow-y: scroll; /*总是显示滚动条*/
89+ overflow-y: scroll; /*总是显示滚动条*/
6990 }
7091
7192 html,
@@ -127,8 +148,8 @@ const { description, keywords ,selected} = Astro.props;
127148 img {
128149 max-width: 36rem;
129150 }
130-
131- .gopher{
151+
152+ .gopher {
132153 align-self: flex-end;
133154 }
134155</style >
0 commit comments