@@ -12,9 +12,21 @@ const { description, keywords, title, canonical, ogType } = Astro.props;
1212 <meta charset =" utf-8" />
1313 <link rel =" icon" href =" /icon/favicon.svg" type =" image/svg" />
1414 <link rel =" sitemap" href =" /sitemap-index.xml" />
15- <link rel =" preload" href =" /fonts/MapleMono-Regular.woff2" as =" font" type =" font/woff2" crossorigin >
16- <link rel =" preload" href =" /assets/images/chair.webp" as =" image" type =" image/webp" crossorigin >
17- { canonical ? <link rel = " canonical" href = { canonical } >:""}
15+ <link
16+ rel =" preload"
17+ href =" /fonts/MapleMono-Regular.woff2"
18+ as =" font"
19+ type =" font/woff2"
20+ crossorigin
21+ />
22+ <link
23+ rel =" preload"
24+ href =" /assets/images/chair.webp"
25+ as =" image"
26+ type =" image/webp"
27+ crossorigin
28+ />
29+ { canonical ? <link rel = " canonical" href = { canonical } /> : " " }
1830 <script src =" ../scripts/swUnregister.ts" ></script >
1931 <ClientRouter />
2032 <!-- base meta -->
@@ -26,8 +38,8 @@ const { description, keywords, title, canonical, ogType } = Astro.props;
2638 <meta property =" og:title" content ={ title } />
2739 <meta property =" og:description" content ={ description } />
2840 <meta property =" og:image" content =" /icon/favicon.svg" />
29- { canonical ? <meta property = " og:url" content = { canonical } />: " " }
30- <meta property = " og:type" content = { ogType ? ogType : " website" } />
41+ { canonical ? <meta property = " og:url" content = { canonical } /> : " " }
42+ <meta property =" og:type" content ={ ogType ? ogType : " website" } />
3143 <!-- twitter cards -->
3244 <meta name =" twitter:card" content =`Ling的小窝 - ${title }` />
3345 <meta name =" twitter:title" content ={ title } />
@@ -49,7 +61,9 @@ const { description, keywords, title, canonical, ogType } = Astro.props;
4961 <header id =" menu" >
5062 <HeadMenu />
5163 </header >
52- <slot >暂时还没有内容哦</slot >
64+ <main >
65+ <slot >暂时还没有内容哦</slot >
66+ </main >
5367 <!-- <hr style="width:600px;color:#808080; margin-top: 1rem;" /> -->
5468 <footer >
5569 <Image
@@ -146,6 +160,16 @@ const { description, keywords, title, canonical, ogType } = Astro.props;
146160 box-sizing: border-box; /* 确保所有元素的宽高包含 padding 和 border */
147161 }
148162
163+ main {
164+ width: 100%;
165+ max-width: 43rem;
166+ flex-grow: 1; /* 使 main 占据剩余空间 */
167+ font-size: 1rem;
168+ line-height: 1.6;
169+ margin-left: auto;
170+ margin-right: auto;
171+ padding: .25rem 2rem;
172+ }
149173 html {
150174 background-color: rgb(250, 252, 254);
151175 /* scrollbar-gutter: stable; */ /* 防止滚动条导致页面宽度不一致 */
@@ -220,4 +244,10 @@ const { description, keywords, title, canonical, ogType } = Astro.props;
220244 .gopher:hover {
221245 transform: rotate(36000deg);
222246 }
247+
248+ @media (max-width: 768px) {
249+ main {
250+ padding: .25rem 0;
251+ }
252+ }
223253</style >
0 commit comments