Skip to content

Commit 00f1b22

Browse files
committed
feat: pages index sticky
1 parent 0943482 commit 00f1b22

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

src/pages/index.tsx

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -66,36 +66,38 @@ export const IndexPage: ComponentType = withGlobalErrorBoundary(() => {
6666
<Operations />
6767
</div>
6868
<div className="md:w-1/3 order-1 md:order-2">
69-
<Card className="flex flex-col mb-4 space-y-2">
70-
<CardTitle icon="add" className="mb-4">
71-
创建新作业
72-
</CardTitle>
69+
<div className="sticky top-20">
70+
<Card className="flex flex-col mb-4 space-y-2">
71+
<CardTitle icon="add" className="mb-4">
72+
创建新作业
73+
</CardTitle>
7374

74-
<OperationEditorLauncher />
75-
<OperationUploaderLauncher />
76-
<OperationSetEditorLauncher />
77-
</Card>
75+
<OperationEditorLauncher />
76+
<OperationUploaderLauncher />
77+
<OperationSetEditorLauncher />
78+
</Card>
7879

79-
<AnnPanel className="mb-4" />
80+
<AnnPanel className="mb-4" />
8081

81-
<div className="flex flex-wrap leading-relaxed mb-8 section-social-links">
82-
{SOCIAL_LINKS.map((link) => (
83-
<a
84-
href={link.href}
85-
target="_blank"
86-
rel="noopener noreferrer"
87-
className="flex items-center text-zinc-600 dark:text-slate-100 no-underline"
88-
>
89-
{link.icon}
90-
<span>{link.label}</span>
91-
</a>
92-
)).reduce((prev, curr) => (
93-
<>
94-
{prev}
95-
<div className="mx-2 opacity-50">·</div>
96-
{curr}
97-
</>
98-
))}
82+
<div className="flex flex-wrap leading-relaxed mb-8 section-social-links">
83+
{SOCIAL_LINKS.map((link) => (
84+
<a
85+
href={link.href}
86+
target="_blank"
87+
rel="noopener noreferrer"
88+
className="flex items-center text-zinc-600 dark:text-slate-100 no-underline"
89+
>
90+
{link.icon}
91+
<span>{link.label}</span>
92+
</a>
93+
)).reduce((prev, curr) => (
94+
<>
95+
{prev}
96+
<div className="mx-2 opacity-50">·</div>
97+
{curr}
98+
</>
99+
))}
100+
</div>
99101
</div>
100102
</div>
101103

0 commit comments

Comments
 (0)