Use only card-aligned timeline ticks

This commit is contained in:
2025-11-19 01:41:12 +08:00
parent eab80bd17a
commit 22120595a6

View File

@@ -9,17 +9,9 @@ interface TimelineWrapperProps {
export function TimelineWrapper({ children, className }: TimelineWrapperProps) { export function TimelineWrapper({ children, className }: TimelineWrapperProps) {
const items = Children.toArray(children); const items = Children.toArray(children);
return ( return (
<div className={clsx('relative pl-10', className)}> <div className={clsx('relative pl-8', className)}>
<span className="pointer-events-none absolute left-4 top-0 h-full w-[2px] bg-gradient-to-b from-blue-500 via-blue-200 to-slate-200 shadow-[0_0_8px_rgba(59,130,246,0.35)] dark:from-cyan-400 dark:via-cyan-300 dark:to-slate-700" aria-hidden="true" /> <span className="pointer-events-none absolute left-3 top-0 h-full w-[2px] bg-gradient-to-b from-blue-500 via-blue-200 to-slate-200 shadow-[0_0_8px_rgba(59,130,246,0.35)] dark:from-cyan-400 dark:via-cyan-300 dark:to-slate-700" aria-hidden="true" />
<span <span className="pointer-events-none absolute bottom-0 left-[0.75rem] h-3 w-3 translate-y-1/2 rotate-45 border-b-2 border-r-2 border-blue-400 dark:border-cyan-300" aria-hidden="true" />
className="pointer-events-none absolute left-[calc(1rem-2px)] top-0 h-full w-[4px] opacity-80"
style={{
backgroundImage:
'repeating-linear-gradient(to bottom, rgba(96,165,250,0.9), rgba(96,165,250,0.9) 2px, transparent 2px, transparent 150px)'
}}
aria-hidden="true"
/>
<span className="pointer-events-none absolute bottom-0 left-4 h-3 w-3 translate-y-1/2 rotate-45 border-b-2 border-r-2 border-blue-400 dark:border-cyan-300" aria-hidden="true" />
<div className="space-y-4"> <div className="space-y-4">
{items.map((child, index) => ( {items.map((child, index) => (
<div key={index} className="relative pl-6"> <div key={index} className="relative pl-6">