Skip to content

Commit 9f85df2

Browse files
committed
友链收集 适量的移动端适配
1 parent 326d33b commit 9f85df2

File tree

5 files changed

+32
-3
lines changed

5 files changed

+32
-3
lines changed

src/layouts/BlogLayout.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ import BaseLayout from "./BaseLayout.astro";
1313
max-width: 65ch;
1414
padding: 0;
1515
/* padding:8% */
16+
width: 85%
1617
}
1718
</style>

src/layouts/FriendsLayout.astro

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,33 @@
11
---
2-
import BaseLayout from "./BaseLayout.astro";
32
import MainLayout from "./MainLayout.astro";
43
---
54

65
<MainLayout>
76
<div id="cards">
87
<slot>暂时还没有内容哦</slot>
98
</div>
9+
10+
<div id="info">
11+
<p>前辈!和我交换友链吧!</p>
12+
<p>
13+
提供你的 <strong>名字</strong>、<strong>描述</strong>、<strong
14+
>头像</strong
15+
>、<strong>地址</strong>, 或者按照如下格式发送到
16+
<a href="mailto:[email protected]" target="_blank">这里!</a>
17+
</p>
18+
<pre><code>
19+
"name": "田所浩二",
20+
"des": "逸一时误一世。",
21+
"icon": "https://icon.shimo/114514",
22+
"url": "https://tadokorokouji.homo"
23+
</code></pre>
24+
</div>
1025
</MainLayout>
1126

1227
<style>
28+
#info{
29+
padding: 20px 50px;
30+
}
1331
#cards {
1432
display: grid;
1533
grid-template-columns: repeat(2, 300px); /* 每张卡片固定宽度 */

src/layouts/MainLayout.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ import BaseLayout from "./BaseLayout.astro";
1414
flex-grow: 1; /* 使 main 占据剩余空间 */
1515
font-size: 1rem;
1616
line-height: 1.75;
17+
width: 85%
1718
}
1819
</style>

src/styles/global.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,9 @@ a {
5151
font-weight: normal;
5252
font-style: normal;
5353
font-display: swap;
54-
}
54+
}
55+
56+
code {
57+
font-family: "Maple Mono", sans-serif;
58+
font-size: 0.9rem;
59+
}

src/styles/markdown.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,9 @@
3636
font-size: 0.9rem;
3737
}
3838

39-
39+
@media (max-width: 768px) {
40+
code {
41+
font-size: 0.7rem;
42+
}
43+
}
4044
}

0 commit comments

Comments
 (0)