chore: initialize deployable website and CMS

This commit is contained in:
Codex User
2026-09-08 11:57:17 +08:00
commit 3a99ae30c5
57 changed files with 11205 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
import { useParams, Link } from 'react-router-dom'
import { METHODS as FALLBACK_METHODS } from '@/data/mock'
import { useCMS, getCMSMethods } from '@/services/cms'
import GlobalCTA from '@/components/Layout/GlobalCTA'
export default function MethodDetail() {
const { data: METHODS } = useCMS(getCMSMethods, FALLBACK_METHODS)
const { slug } = useParams()
const item = METHODS.find(m => m.slug === slug)
if (!item)
return (
<div className="container section">
<div className="placeholder">{slug}</div>
<Link to="/methods" className="btn btn-secondary" style={{ marginTop: 16 }}>
</Link>
</div>
)
return (
<div>
<div className="page-header">
<div className="container">
<div className="breadcrumb">
<Link to="/" style={{ color: 'rgba(255,255,255,0.8)' }}>
</Link>{' '}
/{' '}
<Link to="/methods" style={{ color: 'rgba(255,255,255,0.8)' }}>
</Link>{' '}
/ {item.title}
</div>
<h1>{item.title}</h1>
<p>{item.summary}</p>
</div>
</div>
<section className="section">
<div className="container">
<div className="card">
<h3></h3>
<ol style={{ paddingLeft: 18, lineHeight: 2, fontSize: 14 }}>
{item.steps?.map(s => (
<li key={s}>{s}</li>
))}
</ol>
<div className="placeholder" style={{ marginTop: 12 }}>
</div>
</div>
<div style={{ marginTop: 16, display: 'flex', gap: 10 }}>
<Link to="/methods" className="btn btn-ghost">
</Link>
<Link to="/contact" className="btn btn-primary">
</Link>
</div>
</div>
</section>
<GlobalCTA />
</div>
)
}