2026-10-17 20:02:47 +07:00
|
|
|
import { motion } from 'motion/react'
|
2026-10-06 11:42:11 +07:00
|
|
|
import { SectionHeading } from '@/components/ui/SectionHeading'
|
|
|
|
|
import { Tag } from '@/components/ui/Tag'
|
2026-10-17 20:02:47 +07:00
|
|
|
import { InView } from '@/components/ui/InView'
|
2026-10-22 09:55:24 +07:00
|
|
|
import { EditableText } from '@/components/ui/EditableText'
|
2026-10-23 09:36:59 +07:00
|
|
|
import { TagListEditor } from '@/components/ui/TagListEditor'
|
|
|
|
|
import { RecordControls, AddGhost } from '@/components/ui/RecordControls'
|
|
|
|
|
import { useEdit } from '@/hooks/useEdit'
|
2026-10-22 07:29:06 +07:00
|
|
|
import { useI18n } from '@/i18n/provider'
|
2026-10-06 11:42:11 +07:00
|
|
|
|
|
|
|
|
export function AboutPage() {
|
2026-10-22 07:29:06 +07:00
|
|
|
const { ui: s, content: c } = useI18n()
|
2026-10-23 09:36:59 +07:00
|
|
|
const edit = useEdit()
|
|
|
|
|
|
2026-10-06 11:42:11 +07:00
|
|
|
return (
|
|
|
|
|
<>
|
2026-10-17 20:02:47 +07:00
|
|
|
<InView>
|
|
|
|
|
<motion.section
|
|
|
|
|
className="section container-wide"
|
|
|
|
|
aria-labelledby="about-heading"
|
|
|
|
|
initial="hidden"
|
|
|
|
|
whileInView="visible"
|
|
|
|
|
viewport={{ once: true, amount: 0.1 }}
|
|
|
|
|
variants={{
|
|
|
|
|
hidden: { opacity: 0 },
|
|
|
|
|
visible: { opacity: 1, transition: { duration: 0.5 } },
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<SectionHeading
|
2026-10-22 07:29:06 +07:00
|
|
|
title={s.about.heading}
|
2026-10-22 22:53:26 +07:00
|
|
|
subtitle={
|
|
|
|
|
<EditableText
|
|
|
|
|
as="p"
|
|
|
|
|
path="profile.subtitle"
|
|
|
|
|
label={s.edit.fields.subtitle}
|
|
|
|
|
>
|
|
|
|
|
{c.profile.subtitle}
|
|
|
|
|
</EditableText>
|
|
|
|
|
}
|
2026-10-22 07:29:06 +07:00
|
|
|
tag={s.about.heading}
|
2026-10-17 20:02:47 +07:00
|
|
|
/>
|
2026-10-22 09:55:24 +07:00
|
|
|
<EditableText
|
|
|
|
|
as="p"
|
|
|
|
|
className="prose-lede lede-wide"
|
|
|
|
|
path="profile.bio"
|
|
|
|
|
label={s.edit.fields.bio}
|
|
|
|
|
multiline
|
|
|
|
|
>
|
2026-10-22 07:29:06 +07:00
|
|
|
{c.profile.bio}
|
2026-10-22 09:55:24 +07:00
|
|
|
</EditableText>
|
2026-10-06 11:42:11 +07:00
|
|
|
|
2026-10-17 20:02:47 +07:00
|
|
|
<h3 className="subheading">
|
2026-10-22 07:29:06 +07:00
|
|
|
{s.about.engineeringTitle}
|
2026-10-17 20:02:47 +07:00
|
|
|
</h3>
|
|
|
|
|
<div className="philosophy-grid">
|
2026-10-22 07:29:06 +07:00
|
|
|
{c.profile.philosophy.map((point, i) => (
|
2026-10-17 20:02:47 +07:00
|
|
|
<motion.div
|
2026-10-22 07:29:06 +07:00
|
|
|
key={point.id}
|
2026-10-23 09:36:59 +07:00
|
|
|
className={edit ? 'philosophy-card edit-record-host' : 'philosophy-card'}
|
2026-10-17 20:02:47 +07:00
|
|
|
initial={{ opacity: 0, y: 24 }}
|
|
|
|
|
whileInView={{ opacity: 1, y: 0 }}
|
|
|
|
|
viewport={{ once: true, amount: 0.2 }}
|
|
|
|
|
transition={{ duration: 0.45, ease: 'easeOut', delay: i * 0.08 }}
|
|
|
|
|
whileHover={{ scale: 1.02, y: -4 }}
|
|
|
|
|
whileTap={{ scale: 0.98 }}
|
|
|
|
|
>
|
2026-10-23 09:36:59 +07:00
|
|
|
{edit && (
|
|
|
|
|
<RecordControls
|
|
|
|
|
label={point.title}
|
|
|
|
|
canUp={i > 0}
|
|
|
|
|
canDown={i < c.profile.philosophy.length - 1}
|
|
|
|
|
onUp={() => edit.moveItem('profile', 'philosophy', i, i - 1)}
|
|
|
|
|
onDown={() => edit.moveItem('profile', 'philosophy', i, i + 1)}
|
|
|
|
|
onDelete={() => edit.deleteRecord('philosophy', { id: point.id })}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
2026-10-22 09:55:24 +07:00
|
|
|
<EditableText as="h3" path={`profile.philosophy.${point.id}.title`} label={s.edit.fields.pointTitle}>
|
|
|
|
|
{point.title}
|
|
|
|
|
</EditableText>
|
|
|
|
|
<EditableText as="p" path={`profile.philosophy.${point.id}.description`} label={s.edit.fields.pointDescription} multiline>
|
|
|
|
|
{point.description}
|
|
|
|
|
</EditableText>
|
2026-10-23 09:36:59 +07:00
|
|
|
<TagListEditor
|
|
|
|
|
arrayPath={`profile.philosophy.${point.id}.keywords`}
|
|
|
|
|
items={point.keywords}
|
|
|
|
|
containerAs="div"
|
|
|
|
|
containerClassName="philosophy-keywords"
|
|
|
|
|
as={Tag}
|
|
|
|
|
labelPrefix={`${point.title} — ${s.edit.fields.pointKeywords}`}
|
|
|
|
|
addLabel={s.edit.addKeyword}
|
|
|
|
|
/>
|
2026-10-17 20:02:47 +07:00
|
|
|
</motion.div>
|
|
|
|
|
))}
|
2026-10-23 09:36:59 +07:00
|
|
|
{edit && <AddGhost variant="card" label={s.edit.addPhilosophy} onClick={() => edit.addRecord('philosophy')} />}
|
2026-10-17 20:02:47 +07:00
|
|
|
</div>
|
2026-10-06 11:42:11 +07:00
|
|
|
|
2026-10-17 20:02:47 +07:00
|
|
|
<h3 className="subheading">
|
2026-10-22 07:29:06 +07:00
|
|
|
{s.about.exploringTitlePage}
|
2026-10-17 20:02:47 +07:00
|
|
|
</h3>
|
2026-10-23 09:36:59 +07:00
|
|
|
<TagListEditor
|
|
|
|
|
arrayPath="profile.currentInterests"
|
|
|
|
|
items={c.profile.currentInterests}
|
|
|
|
|
containerAs="div"
|
|
|
|
|
containerClassName="interests-list"
|
|
|
|
|
as={Tag}
|
|
|
|
|
accent
|
|
|
|
|
labelPrefix={s.edit.fields.interests}
|
|
|
|
|
addLabel={s.edit.addInterest}
|
|
|
|
|
/>
|
2026-10-17 20:02:47 +07:00
|
|
|
</motion.section>
|
|
|
|
|
</InView>
|
|
|
|
|
<InView>
|
|
|
|
|
<motion.section
|
|
|
|
|
className="section container-wide"
|
|
|
|
|
aria-labelledby="expertise-heading"
|
|
|
|
|
initial="hidden"
|
|
|
|
|
whileInView="visible"
|
|
|
|
|
viewport={{ once: true, amount: 0.1 }}
|
|
|
|
|
variants={{
|
|
|
|
|
hidden: { opacity: 0 },
|
|
|
|
|
visible: { opacity: 1, transition: { duration: 0.5 } },
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-10-22 07:29:06 +07:00
|
|
|
<SectionHeading title={s.about.expertise} />
|
2026-10-17 20:02:47 +07:00
|
|
|
<div className="expertise-grid">
|
2026-10-22 07:29:06 +07:00
|
|
|
{c.skillGroups.map((group, i) => (
|
2026-10-17 20:02:47 +07:00
|
|
|
<motion.div
|
2026-10-22 07:29:06 +07:00
|
|
|
key={group.id}
|
2026-10-23 09:36:59 +07:00
|
|
|
className={edit ? 'expertise-card edit-record-host' : 'expertise-card'}
|
2026-10-17 20:02:47 +07:00
|
|
|
initial={{ opacity: 0, y: 24 }}
|
|
|
|
|
whileInView={{ opacity: 1, y: 0 }}
|
|
|
|
|
viewport={{ once: true, amount: 0.2 }}
|
|
|
|
|
transition={{ duration: 0.45, ease: 'easeOut', delay: i * 0.08 }}
|
|
|
|
|
whileHover={{ scale: 1.02, y: -4 }}
|
|
|
|
|
whileTap={{ scale: 0.98 }}
|
|
|
|
|
>
|
2026-10-23 09:36:59 +07:00
|
|
|
{edit && (
|
|
|
|
|
<RecordControls
|
|
|
|
|
label={group.title}
|
|
|
|
|
canUp={i > 0}
|
|
|
|
|
canDown={i < c.skillGroups.length - 1}
|
|
|
|
|
onUp={() => edit.moveItem('skills', '', i, i - 1)}
|
|
|
|
|
onDown={() => edit.moveItem('skills', '', i, i + 1)}
|
|
|
|
|
onDelete={() => edit.deleteRecord('skill-group', { id: group.id })}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
2026-10-22 09:55:24 +07:00
|
|
|
<EditableText as="h3" path={`skills.${group.id}.title`} label={s.edit.fields.groupTitle}>
|
|
|
|
|
{group.title}
|
|
|
|
|
</EditableText>
|
2026-10-23 09:36:59 +07:00
|
|
|
<TagListEditor
|
|
|
|
|
doc="skills"
|
|
|
|
|
arrayPath={`[${i}].skills`}
|
|
|
|
|
items={group.skills}
|
|
|
|
|
containerAs="ul"
|
|
|
|
|
containerClassName="expertise-skills"
|
|
|
|
|
as="li"
|
|
|
|
|
itemClassName="expertise-skill"
|
|
|
|
|
labelPrefix={`${group.title} — ${s.edit.fields.skill}`}
|
|
|
|
|
addLabel={s.edit.addSkill}
|
|
|
|
|
/>
|
2026-10-17 20:02:47 +07:00
|
|
|
</motion.div>
|
|
|
|
|
))}
|
2026-10-23 09:36:59 +07:00
|
|
|
{edit && <AddGhost variant="card" label={s.edit.addSkillGroup} onClick={() => edit.addRecord('skill-group')} />}
|
2026-10-17 20:02:47 +07:00
|
|
|
</div>
|
|
|
|
|
</motion.section>
|
|
|
|
|
</InView>
|
2026-10-06 11:42:11 +07:00
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|