Skip to content

Commit 299a63d

Browse files
committed
Refine Jobs recruitment layout
1 parent f2f4a95 commit 299a63d

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

src/app/jobs/copy-email-button.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"use client";
2+
3+
import { useState } from "react";
4+
5+
export function CopyEmailButton({ email }: { email: string }) {
6+
const [copied, setCopied] = useState(false);
7+
8+
async function handleClick() {
9+
try {
10+
await navigator.clipboard.writeText(email);
11+
setCopied(true);
12+
window.setTimeout(() => setCopied(false), 1500);
13+
} catch {
14+
window.location.href = `mailto:${email}`;
15+
}
16+
}
17+
18+
return (
19+
<button
20+
type="button"
21+
className="tb-focus-ring tb-button-secondary w-full sm:w-[15rem]"
22+
onClick={handleClick}
23+
aria-label={`Copy email address ${email}`}
24+
title="Click to copy email address"
25+
>
26+
{copied ? "Copied" : email}
27+
</button>
28+
);
29+
}

src/app/jobs/page.tsx

Lines changed: 17 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Metadata } from "next";
22
import type { ReactNode } from "react";
3+
import { CopyEmailButton } from "./copy-email-button";
34

45
export const metadata: Metadata = {
56
title: "Jobs",
@@ -8,6 +9,7 @@ export const metadata: Metadata = {
89
};
910

1011
const CONTACT_EMAIL = "braintrace@yeah.net";
12+
const RECRUITMENT_UPDATED_AT = "2026-03-19";
1113

1214
type NumberedItem = {
1315
number: string;
@@ -29,8 +31,6 @@ type CopySection = {
2931
benefits: string[];
3032
workModeTitle: string;
3133
workModeText: string;
32-
contactTitle: string;
33-
contactText: string;
3434
templateTitle: string;
3535
templateText: string;
3636
};
@@ -46,10 +46,10 @@ function Panel({
4646
}) {
4747
return (
4848
<article className={`tb-frame-soft bg-[#fffdf9] p-5 sm:p-6 ${className}`}>
49-
<div className="text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-500">
49+
<div className="text-[0.98rem] font-bold tracking-[0.02em] text-[#25314d] sm:text-[1.05rem]">
5050
{title}
5151
</div>
52-
<div className="mt-3">{children}</div>
52+
<div className="mt-4">{children}</div>
5353
</article>
5454
);
5555
}
@@ -97,12 +97,10 @@ function RecruitmentSection(copy: CopySection) {
9797
<p className="mt-4 text-base leading-8 text-slate-700">{copy.summary}</p>
9898
</div>
9999

100-
<a
101-
className="tb-focus-ring tb-button-secondary w-full sm:w-auto"
102-
href={`mailto:${CONTACT_EMAIL}`}
103-
>
104-
{CONTACT_EMAIL}
105-
</a>
100+
<div className="grid gap-3 sm:justify-items-end">
101+
<span className="tb-badge">Updated {RECRUITMENT_UPDATED_AT}</span>
102+
<CopyEmailButton email={CONTACT_EMAIL} />
103+
</div>
106104
</div>
107105

108106
<div className="mt-6 grid gap-4 md:grid-cols-2">
@@ -126,16 +124,6 @@ function RecruitmentSection(copy: CopySection) {
126124
<p className="text-sm leading-7 text-slate-700">{copy.workModeText}</p>
127125
</Panel>
128126

129-
<Panel title={copy.contactTitle}>
130-
<p className="text-sm leading-7 text-slate-700">{copy.contactText}</p>
131-
<a
132-
className="tb-focus-ring mt-4 inline-flex rounded-full border-2 border-[#25314d] bg-white px-4 py-2 text-sm font-bold text-[#25314d] shadow-[0_4px_0_#25314d] transition-transform hover:-translate-y-px"
133-
href={`mailto:${CONTACT_EMAIL}`}
134-
>
135-
{CONTACT_EMAIL}
136-
</a>
137-
</Panel>
138-
139127
<Panel title={copy.templateTitle} className="md:col-span-2">
140128
<pre className="whitespace-pre-wrap rounded-[18px] border-2 border-[#25314d] bg-white p-4 text-sm leading-7 text-slate-700">
141129
{copy.templateText}
@@ -202,8 +190,6 @@ const chineseCopy: CopySection = {
202190
],
203191
workModeTitle: "工作形式",
204192
workModeText: "线上协作。",
205-
contactTitle: "联系方式",
206-
contactText: "邮箱:braintrace@yeah.net",
207193
templateTitle: "申请模板",
208194
templateText:
209195
"您好,我想应聘实习生岗位。{自我介绍},我已阅读网站内容,并对项目整体架构有基本了解。我的专业 / 背景是 ______,相关经验包括 ______。我对该岗位感兴趣,主要原因是______,希望参与 ______ 相关工作。目前预计每周可投入 ______ 小时,可持续投入 ______ 周/月。"
@@ -265,8 +251,6 @@ const englishCopy: CopySection = {
265251
],
266252
workModeTitle: "Work Mode",
267253
workModeText: "Online collaboration.",
268-
contactTitle: "Contact",
269-
contactText: "Email: braintrace@yeah.net",
270254
templateTitle: "Application Template",
271255
templateText:
272256
"Hello, I would like to apply for the internship position. {Self-introduction}. I have read the website content and have a basic understanding of the overall project structure. My major/background is ______, and related experience includes ______. I am interested in this role mainly because ______, and I hope to work on ______ related tasks. I can currently commit ______ hours per week and can continue for ______ weeks/months."
@@ -276,28 +260,15 @@ export default function JobsPage() {
276260
return (
277261
<div className="space-y-8 lg:pt-6">
278262
<section className="tb-frame bg-[#fffdf9] p-6 sm:p-8">
279-
<div className="flex flex-wrap items-start justify-between gap-4">
280-
<div className="max-w-3xl">
281-
<div className="tb-section-chip bg-[#f5c1b5]">Jobs</div>
282-
<h1 className="mt-4 font-heading text-4xl font-bold leading-[0.95] text-[#25314d] sm:text-5xl">
283-
TaskBeacon recruitment, in Chinese and English.
284-
</h1>
285-
<p className="mt-4 max-w-3xl text-base leading-8 text-slate-700">
286-
The notice below is shown in Chinese first and English second, with the same role
287-
scope, benefits, contact path, and application template in both sections.
288-
</p>
289-
</div>
290-
291-
<div className="grid gap-3 sm:justify-items-end">
292-
<span className="tb-badge">35 tasks organized</span>
293-
<span className="tb-badge">Target: 99 tasks</span>
294-
<a
295-
className="tb-focus-ring tb-button-secondary w-full sm:w-auto"
296-
href={`mailto:${CONTACT_EMAIL}`}
297-
>
298-
{CONTACT_EMAIL}
299-
</a>
300-
</div>
263+
<div className="max-w-3xl">
264+
<div className="tb-section-chip bg-[#f5c1b5]">Jobs</div>
265+
<h1 className="mt-4 font-heading text-4xl font-bold leading-[0.95] text-[#25314d] sm:text-5xl">
266+
TaskBeacon recruitment, in Chinese and English.
267+
</h1>
268+
<p className="mt-4 text-base leading-8 text-slate-700">
269+
The notice below is shown in Chinese first and English second, with the same role
270+
scope, benefits, and application template in both sections.
271+
</p>
301272
</div>
302273
</section>
303274

0 commit comments

Comments
 (0)