Skip to content

Commit e71870b

Browse files
committed
refactor: ♻️ perfect learning page self-adaption
1 parent df8ead3 commit e71870b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/learning/Article.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {TAGS} from "../../utils/config";
33
const {post} = Astro.props;
44
---
55

6-
<div class="card flex flex-row items-center gap-5 border border-[#4a4c57] hover:bg-[#1e1f22] shadow-md p-7 rounded-2xl flex-shrink-0 flex-grow-0">
7-
<img class="w-5/12 h-full object-cover rounded-lg overflow-hidden left-content"
6+
<div class="card flex flex-col md:flex-row items-center gap-5 border border-[#4a4c57] hover:bg-[#1e1f22] shadow-md p-7 rounded-2xl flex-shrink-0 flex-grow-0">
7+
<img class="w-full md:w-5/12 sm:h-full object-cover rounded-lg overflow-hidden left-content"
88
src={post.data.img} alt={post.data.title}></img>
99
<div class="flex flex-col gap-5 text-white">
1010
<span class="text-sm">{post.data.date}</span>

src/pages/learning/[tag]/[...page].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function getStaticPaths({paginate}: GetStaticPathsOptions) {
8989
</div>
9090

9191
<!--侧边栏-->
92-
<div class="flex flex-col w-5/12 px-10 items-start gap-12 mt-[35px]">
92+
<div class="hidden lg:flex flex-col w-5/12 px-10 items-start gap-12 mt-[35px]">
9393
{
9494
learningChannels.map(channel => (
9595
<div class="w-full flex flex-col gap-5">

0 commit comments

Comments
 (0)