mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
style(ui): finish v3 typography sweep - inline type styles to classes
PhilosophyPage: prose column, paragraph spacing, no nested <p>, aria-labelledby wired to a real SectionHeading id. About/AboutPage, ProjectDetailPage, Experience/ExperiencePage, Contact/ContactPage, Projects, DownloadResume: inline fontSize/lineHeight/fontWeight/color/maxWidth replaced by .prose, .prose-lede, .page-body, .subheading, .project-section, .back-link, .section-cta, .link-label, .contact-link-sub, .achievement-impact, .achievement-metrics. App.css: add .download-resume-button as a variant of .contact-link. index.css: drop leftover .container-narrow from two responsive selector lists. Delete dead ui/Card.tsx and its barrel export. Specs: typography progress marked done with the verification log; .skip-link orphan closed in both v3 specs (strings.skipLink is gone too). tsc -b exit 0; vite build 538 modules / 24.86 kB CSS; built CSS carries every new class and none of the deleted selectors; oxlint diagnostics identical to HEAD (15 errors / 9 warnings, all pre-existing).
This commit is contained in:
1 parent
c1e64eabbd
commit
d172843738
16 files changed
+103
-140
No files matched your search
@@ -1,7 +1,6 @@
|
||||
export { Button } from './ui/Button'
|
||||
export { Badge } from './ui/Badge'
|
||||
export { Tag } from './ui/Tag'
|
||||
export { Card } from './ui/Card'
|
||||
export { SectionHeading } from './ui/SectionHeading'
|
||||
export { SocialLinks } from './ui/SocialLinks'
|
||||
export { Navigation } from './layout/Navigation'
|
||||
|
||||
@@ -11,12 +11,12 @@ export function About() {
|
||||
<InView>
|
||||
<section className="section container-wide" aria-labelledby="about-heading">
|
||||
<SectionHeading title={strings.about.heading[lang]} tag={strings.about.heading[lang]} />
|
||||
<div style={{ maxWidth: '700px' }}>
|
||||
<p style={{ fontSize: '18px', marginBottom: '32px' }}>
|
||||
<div className="page-body">
|
||||
<p className="prose-lede">
|
||||
{useField(profile.bio, profile.bioEn)}
|
||||
</p>
|
||||
|
||||
<h3 style={{ fontSize: '20px', marginBottom: '16px', color: 'var(--text-primary)' }}>
|
||||
<h3 className="subheading">
|
||||
{strings.about.engineeringTitle[lang]}
|
||||
</h3>
|
||||
<div className="philosophy-grid">
|
||||
@@ -33,7 +33,7 @@ export function About() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<h3 style={{ fontSize: '20px', marginTop: '32px', marginBottom: '12px', color: 'var(--text-primary)' }}>
|
||||
<h3 className="subheading">
|
||||
{strings.about.exploringTitle[lang]}
|
||||
</h3>
|
||||
<div className="interests-list">
|
||||
|
||||
@@ -22,7 +22,7 @@ export function Contact() {
|
||||
>
|
||||
|
||||
<SectionHeading title={strings.contact.heading[lang]} tag={strings.common.contactTag[lang]} />
|
||||
<div style={{ maxWidth: '700px' }}>
|
||||
<div className="page-body">
|
||||
<div className="contact-links">
|
||||
<motion.a
|
||||
href={`mailto:${profile.email}`}
|
||||
@@ -42,10 +42,10 @@ export function Contact() {
|
||||
<path d="M22 4l-10 8L2 4" />
|
||||
</svg>
|
||||
<div>
|
||||
<div style={{ fontWeight: 500, color: "var(--text-primary)" }}>
|
||||
<div className="link-label">
|
||||
{strings.contact.email[lang]}
|
||||
</div>
|
||||
<div style={{ fontSize: "14px", color: "var(--text-muted)" }}>
|
||||
<div className="contact-link-sub">
|
||||
{profile.email}
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,10 +67,10 @@ export function Contact() {
|
||||
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z" />
|
||||
</svg>
|
||||
<div>
|
||||
<div style={{ fontWeight: 500, color: "var(--text-primary)" }}>
|
||||
<div className="link-label">
|
||||
{strings.contact.github[lang]}
|
||||
</div>
|
||||
<div style={{ fontSize: "14px", color: "var(--text-muted)" }}>
|
||||
<div className="contact-link-sub">
|
||||
@yourusername
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,10 +92,10 @@ export function Contact() {
|
||||
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
|
||||
</svg>
|
||||
<div>
|
||||
<div style={{ fontWeight: 500, color: "var(--text-primary)" }}>
|
||||
<div className="link-label">
|
||||
{strings.contact.linkedin[lang]}
|
||||
</div>
|
||||
<div style={{ fontSize: "14px", color: "var(--text-muted)" }}>
|
||||
<div className="contact-link-sub">
|
||||
Your Name
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,23 +77,12 @@ function DownloadButton({ lang }: { lang: Language }) {
|
||||
<a
|
||||
href={resumeUrlFor(lang)}
|
||||
download
|
||||
className="contact-link"
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
gap: '12px',
|
||||
padding: '12px 20px',
|
||||
borderRadius: '8px',
|
||||
textDecoration: 'none',
|
||||
color: 'var(--text-primary)',
|
||||
border: '1px solid var(--border)',
|
||||
}}
|
||||
className="contact-link download-resume-button"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" width="24" height="24">
|
||||
<path d="M12 2a1 1 0 0 1 1 1v9.586l2.707-2.707a1 1 0 1 1 1.414 1.414l-4.5 4.5a1 1 0 0 1-1.414 0l-4.5-4.5a1 1 0 0 1 1.414-1.414L11 12.586V3a1 1 0 0 1 1-1zm-7 16a1 1 0 1 1 0 2h14a1 1 0 1 1 0-2H5z" />
|
||||
</svg>
|
||||
<div style={{ fontWeight: 500, color: 'var(--text-primary)' }}>{strings.common.resumeDownload[currentLang]} {resumeLanguageLabels[lang]}</div>
|
||||
<div className="link-label">{strings.common.resumeDownload[currentLang]} {resumeLanguageLabels[lang]}</div>
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export function Experience() {
|
||||
}}
|
||||
>
|
||||
<SectionHeading title={strings.experience.heading[lang]} tag={strings.experience.heading[lang]} />
|
||||
<div style={{ maxWidth: '700px' }}>
|
||||
<div className="page-body">
|
||||
<div className="timeline">
|
||||
{experiences.map((exp, i) => (
|
||||
<motion.div
|
||||
@@ -64,18 +64,12 @@ export function Experience() {
|
||||
<div className="achievement-context">
|
||||
{useField(achievement.context, achievement.contextEn)}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
fontSize: "14px",
|
||||
color: "var(--text-secondary)",
|
||||
marginBottom: "8px",
|
||||
}}
|
||||
>
|
||||
<div className="achievement-impact">
|
||||
{useField(achievement.impact, achievement.impactEn)}
|
||||
</div>
|
||||
{achievement.metrics &&
|
||||
achievement.metrics.length > 0 && (
|
||||
<div style={{ marginBottom: "8px" }}>
|
||||
<div className="achievement-metrics">
|
||||
{achievement.metrics.map((m) => (
|
||||
<span key={m} className="achievement-metric">
|
||||
{m}
|
||||
|
||||
@@ -33,7 +33,7 @@ export function Projects() {
|
||||
<SectionHeading title={strings.projects.featured[lang]} tag={strings.projects.featured[lang]} />
|
||||
<Link
|
||||
to="/projects"
|
||||
style={{ fontSize: "14px", fontWeight: 500, color: "var(--accent)", display: "block", marginBottom: "24px" }}
|
||||
className="section-cta"
|
||||
>
|
||||
{strings.projects.viewAll[lang]} →
|
||||
</Link>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
import { forwardRef } from 'react'
|
||||
import type { ComponentPropsWithoutRef } from 'react'
|
||||
|
||||
type CardVariant = 'default' | 'elevated' | 'featured'
|
||||
|
||||
interface CardProps extends ComponentPropsWithoutRef<'div'> {
|
||||
variant?: CardVariant
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
const variantClasses: Record<CardVariant, string> = {
|
||||
default: 'card',
|
||||
elevated: 'card card-elevated',
|
||||
featured: 'card card-featured',
|
||||
}
|
||||
|
||||
export const Card = forwardRef<HTMLDivElement, CardProps>(
|
||||
({ variant = 'default', className = '', children, ...props }, ref) => {
|
||||
return (
|
||||
<div
|
||||
className={`${variantClasses[variant]} ${className}`.trim()}
|
||||
ref={ref}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
Card.displayName = 'Card'
|
||||
Reference in new issue
Block a user