File tree Expand file tree Collapse file tree 15 files changed +104
-35
lines changed Expand file tree Collapse file tree 15 files changed +104
-35
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ $common-margin: 24px;
53
53
margin-bottom : 0 ;
54
54
}
55
55
}
56
+
57
+ table {
58
+ max-width : calc (100% - 2 * $common-margin );
59
+ }
56
60
}
57
61
58
62
.category-second ,
Original file line number Diff line number Diff line change
1
+ <script lang="ts" setup>
2
+ const props = defineProps <{ category: string }>();
3
+
4
+ const route = useRoute ();
5
+ const { locale } = useI18n ();
6
+
7
+ const { data : page } = await useAsyncData (
8
+ computed (() => ` ${locale .value }:${props .category }:${route .params .slug } ` ),
9
+ () => {
10
+ return queryCollection (locale .value )
11
+ .path (` /${props .category }/${route .params .slug } ` )
12
+ .first ();
13
+ }
14
+ );
15
+ useHead ({ title: page .value ?.title });
16
+ </script >
17
+
18
+ <template >
19
+ <article v-if =" page" >
20
+ <category-second
21
+ v-if =" page?.body.value[0][0]!=='h2'"
22
+ :title =" page?.title"
23
+ :right-text =" page?.date.substring(0, 10)"
24
+ class =" sticky top-0 z-1" />
25
+ <ContentRenderer :value =" page" class =" heti" />
26
+ </article >
27
+ </template >
Original file line number Diff line number Diff line change
1
+ <script setup>
2
+ import AppLink from ' ../app/AppLink.vue' ;
3
+ const props = defineProps ({ ... AppLink .props });
4
+ </script >
5
+
6
+ <template >
7
+ <AppLink
8
+ v-bind =" props"
9
+ class =" theme-bg-color-secondary-primary cursor-pointer overflow-hidden px-4 py-2 text-white hover:no-underline" >
10
+ <slot />
11
+ </AppLink >
12
+ </template >
Original file line number Diff line number Diff line change 1
1
<script setup>
2
- import { RouterLink } from ' vue-router ' ;
2
+ import { NuxtLink } from ' #components ' ;
3
3
4
4
const props = defineProps ({
5
- ... RouterLink .props ,
5
+ ... NuxtLink .props ,
6
6
class: {
7
7
type: String ,
8
8
default: ' text-link'
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <blockquote class =" border-l-4 border-(--secondary)" >
3
+ <slot />
4
+ </blockquote >
5
+ </template >
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const pre = useTemplateRef('prose-pre');
32
32
<template >
33
33
<pre ref =" prose-pre" :class =" `${$props.class} relative`" ><slot /><CopyIcon
34
34
class =" absolute top-3 right-3"
35
- :content-target =" pre?.textContent??undefined" /></pre >
35
+ :content-target =" pre?.textContent??' undefined' " /></pre >
36
36
</template >
37
37
38
38
<style >
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const props = defineProps({
9
9
10
10
<template >
11
11
<Icon
12
+ v-if =" contentTarget !== 'undefined'"
12
13
class =" cursor-pointer !bg-(--primary)"
13
14
v-bind =" props"
14
15
name =" ep-document-copy"
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ const { locale } = useI18n ();
3
+
4
+ const { data, status } = await useAsyncData (
5
+ computed (() => ` ${locale .value }:aoscc-index ` ),
6
+ () => queryCollection (locale .value ).path (' /aoscc/2025-index' ).first ()
7
+ );
8
+ </script >
9
+
10
+ <template >
11
+ <div >
12
+ <category-second id =" aoscc" title =" AOSCC:社区年度聚会" />
13
+ <div class =" aoscc-banner-bg relative h-[280px] px-10 py-6 text-white" >
14
+ <div class =" absolute bottom-0 mb-10 ml-1 flex gap-4" >
15
+ <AosccLinkButton to =" https://aoscc.aosc.io" target =" _blank" >
16
+ 报名与签到
17
+ </AosccLinkButton >
18
+ <AosccLinkButton to =" /aoscc/2025-schedule" >会议日程</AosccLinkButton >
19
+ <AosccLinkButton to =" /aoscc/2025-guide" >交通和住宿</AosccLinkButton >
20
+ </div >
21
+ </div >
22
+ <div class =" heti" >
23
+ <h2 >AOSCC 简介</h2 >
24
+ <p >
25
+ AOSCC
26
+ 是我社每年一度的线下聚会,公开邀请社区好友参与。活动期间,社区邀请社区贡献者、高校社团成员和行业代表等分享、交流工作,并组织抽奖、代号投票等趣味活动。近年来,AOSCC
27
+ 均由中国高校社团协办,每年吸引超过 100 名与会者参与。
28
+ </p >
29
+ </div >
30
+ <ContentRenderer
31
+ v-if =" status === 'success' && data"
32
+ :value =" data"
33
+ class =" heti" />
34
+ </div >
35
+ </template >
36
+
37
+ <style scoped>
38
+ .aoscc-banner-bg {
39
+ background-image : url (/aoscc/aoscc-2025-portal-banner.png );
40
+ background-size : 1088px ;
41
+ }
42
+ </style >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <common-content category =" aoscc" />
3
+ </template >
Original file line number Diff line number Diff line change 1
- <script lang="ts" setup>
2
- const route = useRoute ();
3
- const { locale } = useI18n ();
4
-
5
- const { data : page } = await useAsyncData (
6
- computed (() => ` ${locale .value }:news:${route .params .slug } ` ),
7
- () => {
8
- return queryCollection (locale .value )
9
- .path (` /news/${route .params .slug } ` )
10
- .first ();
11
- }
12
- );
13
- useHead ({ title: page .value ?.title });
14
- </script >
15
-
16
1
<template >
17
- <div >
18
- <article >
19
- <category-second
20
- :title =" page?.title"
21
- :right-text =" page?.date.substring(0, 10)"
22
- class =" sticky top-0 z-1" />
23
- <div v-if =" page" >
24
- <ContentRenderer :value =" page" class =" heti" />
25
- </div >
26
- </article >
27
- </div >
2
+ <common-content category =" news" />
28
3
</template >
29
-
30
- <style lang="css" scoped></style >
You can’t perform that action at this time.
0 commit comments