Skip to content

Commit 3c28697

Browse files
committed
首页信息:2026-06-18 20:20
1 parent c191274 commit 3c28697

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎src/components/FeaturedProjects.astro‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ const featuredProjects = projects.slice(0, 4)
3535
{project.data.links.map(link => {
3636
const [key, value] = Object.entries(link)[0];
3737
return (
38-
<span class="rounded-full border border-[var(--border-color-subtle)] px-3 py-1 text-xs font-medium text-[var(--foreground-color)] transition hover:bg-[var(--color-primary)] hover:text-white">
38+
<a
39+
href={value}
40+
target="_blank"
41+
rel="noopener noreferrer"
42+
class="rounded-full border border-[var(--border-color-subtle)] px-3 py-1 text-xs font-medium text-[var(--foreground-color)] no-underline transition hover:bg-[var(--color-primary)] hover:text-white"
43+
>
3944
{key}
40-
</span>
45+
</a>
4146
);
4247
})}
4348
</div>

‎src/pages/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Feature from '@components/Feature.astro'
1111
<section class="mb-24">
1212
<div class="container">
1313
<h2 class="text-center text-3xl font-bold mb-12">我们的身影</h2>
14-
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
14+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 gap-6">
1515
<div class="rounded-xl overflow-hidden shadow-lg hover:shadow-xl transition-shadow duration-300">
1616
<img src="/img/xuanchuan.jpg" alt="社团宣传" class="w-full h-60 object-cover" loading="lazy" />
1717
</div>

‎src/pages/portfolio/[...page].astro‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ const { page } = Astro.props
4242
<ul class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
4343
{projectsInGrade.map(project => {
4444
const slug = project.id || project.slug
45-
const cardFooter = project.data.links?.[0]
46-
? Object.values(project.data.links[0])[0]
47-
: ''
4845
return (
4946
<li>
5047
<div class="card group flex flex-col items-center rounded-xl border border-[var(--border-color-subtle)] bg-[var(--background-color)] p-6 text-center no-underline shadow-sm transition hover:-translate-y-1 hover:shadow-lg">
@@ -60,8 +57,8 @@ const { page } = Astro.props
6057
{project.data.motto && (
6158
<>
6259
<blockquote class="member-motto">
63-
“{project.data.motto}”
64-
</blockquote>
60+
“{project.data.motto}”
61+
</blockquote>
6562
<hr class="my-2 w-3/5 border-t border-[var(--border-color-subtle)]" />
6663
</>
6764
)}
@@ -71,9 +68,14 @@ const { page } = Astro.props
7168
{project.data.links.map(link => {
7269
const [key, value] = Object.entries(link)[0];
7370
return (
74-
<span class="rounded-full border border-[var(--border-color-subtle)] px-3 py-1 text-xs font-medium text-[var(--foreground-color)] transition hover:bg-[var(--color-primary)] hover:text-white">
71+
<a
72+
href={value}
73+
target="_blank"
74+
rel="noopener noreferrer"
75+
class="rounded-full border border-[var(--border-color-subtle)] px-3 py-1 text-xs font-medium text-[var(--foreground-color)] no-underline transition hover:bg-[var(--color-primary)] hover:text-white"
76+
>
7577
{key}
76-
</span>
78+
</a>
7779
);
7880
})}
7981
</div>

0 commit comments

Comments
 (0)