This commit is contained in:
Mackie 2026-06-05 18:03:07 +08:00
parent 164faf2322
commit c76613dcb5
9 changed files with 59 additions and 29 deletions

View file

@ -2,6 +2,7 @@
import React from 'react' import React from 'react'
import { ImageMedia } from '@/components/Media/ImageMedia' import { ImageMedia } from '@/components/Media/ImageMedia'
import { Container } from '@/components/ui/Container' // Ensure this path is correct
import type { Media as MediaType } from '@/payload-types' import type { Media as MediaType } from '@/payload-types'
type ButtonGroup = { type ButtonGroup = {
@ -45,8 +46,8 @@ export function AboutProfileBlock({
const hasSecondary = secondaryButton?.label && secondaryButton?.url const hasSecondary = secondaryButton?.label && secondaryButton?.url
return ( return (
// Standardized vertical padding and alignment // Replaced hardcoded max-w-5xl and section with the unified Container
<section className="w-full max-w-5xl mx-auto py-12 md:py-24"> <Container className="py-12 md:py-24">
{(heading || subheading) && ( {(heading || subheading) && (
<div className="text-center mb-16"> <div className="text-center mb-16">
{heading && ( {heading && (
@ -97,6 +98,6 @@ export function AboutProfileBlock({
)} )}
</div> </div>
</div> </div>
</section> </Container>
) )
} }

View file

@ -1,10 +1,8 @@
import React from 'react' 'use client'
type Skill = { import React from 'react'
icon: string import { Container } from '@/components/ui/Container' // Ensure this path is correct
title: string import type { Skill } from '@/payload-types' // Adjust import based on your project
tags: string
}
type BentoRowBlockProps = { type BentoRowBlockProps = {
aboutHeading?: string aboutHeading?: string
@ -18,8 +16,8 @@ export function BentoRowBlock(props: BentoRowBlockProps) {
const { aboutHeading, aboutText, aboutCta, skillsHeading, skills } = props const { aboutHeading, aboutText, aboutCta, skillsHeading, skills } = props
return ( return (
// Standardized vertical padding and container constraints // Replaced hardcoded max-w-5xl and section with the unified Container
<section className="w-full max-w-5xl mx-auto py-12 md:py-24"> <Container className="py-12 md:py-24">
<div className="grid grid-cols-1 md:grid-cols-2 gap-4"> <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
{/* About Section */} {/* About Section */}
<div className="bg-muted/50 border border-foreground/10 rounded-2xl p-8 flex flex-col justify-between gap-8"> <div className="bg-muted/50 border border-foreground/10 rounded-2xl p-8 flex flex-col justify-between gap-8">
@ -94,6 +92,6 @@ export function BentoRowBlock(props: BentoRowBlockProps) {
)} )}
</div> </div>
</div> </div>
</section> </Container>
) )
} }

View file

@ -1,4 +1,7 @@
'use client'
import React from 'react' import React from 'react'
import { Container } from '@/components/ui/Container' // Ensure this path is correct
type ContactLink = { type ContactLink = {
label: string label: string
@ -19,7 +22,8 @@ export function ContactBlock(props: ContactBlockProps) {
const { heading, subtext, email, links } = props const { heading, subtext, email, links } = props
return ( return (
<section className="w-full max-w-5xl mx-auto py-12"> // Replaced hardcoded max-w-5xl and section with the unified Container
<Container className="py-12">
<div className="grid grid-cols-1 md:grid-cols-2 gap-3"> <div className="grid grid-cols-1 md:grid-cols-2 gap-3">
<div className="bg-muted/50 border border-foreground/8 rounded-xl p-6 flex flex-col justify-between gap-6"> <div className="bg-muted/50 border border-foreground/8 rounded-xl p-6 flex flex-col justify-between gap-6">
<div> <div>
@ -77,6 +81,6 @@ export function ContactBlock(props: ContactBlockProps) {
})} })}
</div> </div>
</div> </div>
</section> </Container>
) )
} }

View file

@ -1,4 +1,7 @@
'use client'
import React from 'react' import React from 'react'
import { Container } from '@/components/ui/Container' // Ensure this path is correct
const colorMap: Record<string, { border: string; dot: string }> = { const colorMap: Record<string, { border: string; dot: string }> = {
gray: { border: 'border-t-[#888780]', dot: 'bg-[#888780]' }, gray: { border: 'border-t-[#888780]', dot: 'bg-[#888780]' },
@ -18,8 +21,8 @@ export function KanbanColorBlock({ columns }: Props) {
if (!Array.isArray(columns) || columns.length === 0) return null if (!Array.isArray(columns) || columns.length === 0) return null
return ( return (
// Standardized vertical padding to match other page sections // Replaced hardcoded max-w-5xl and section with the unified Container
<section className="w-full max-w-5xl mx-auto py-12 md:py-24"> <Container className="py-12 md:py-24">
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"> <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
{columns.map((col, i) => { {columns.map((col, i) => {
const { border, dot } = colorMap[col.color ?? 'gray'] ?? colorMap.gray const { border, dot } = colorMap[col.color ?? 'gray'] ?? colorMap.gray
@ -50,6 +53,6 @@ export function KanbanColorBlock({ columns }: Props) {
) )
})} })}
</div> </div>
</section> </Container>
) )
} }

View file

@ -1,5 +1,7 @@
// src/blocks/KanbanHori/Component.tsx 'use client'
import React from 'react' import React from 'react'
import { Container } from '@/components/ui/Container' // Ensure this path is correct
type Card = { title: string; subtitle?: string } type Card = { title: string; subtitle?: string }
type Row = { label: string; cards?: Card[] } type Row = { label: string; cards?: Card[] }
@ -9,7 +11,8 @@ export function KanbanHoriBlock({ rows }: Props) {
if (!Array.isArray(rows) || rows.length === 0) return null if (!Array.isArray(rows) || rows.length === 0) return null
return ( return (
<section className="w-full max-w-5xl mx-auto px-6 py-16"> // Replaced hardcoded max-w-5xl and px-6 with the unified Container
<Container className="py-16">
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4">
{rows.map((row, i) => ( {rows.map((row, i) => (
<div key={i} className="grid grid-cols-[100px_1fr] gap-4 items-start"> <div key={i} className="grid grid-cols-[100px_1fr] gap-4 items-start">
@ -31,6 +34,6 @@ export function KanbanHoriBlock({ rows }: Props) {
</div> </div>
))} ))}
</div> </div>
</section> </Container>
) )
} }

View file

@ -1,5 +1,8 @@
'use client'
import React from 'react' import React from 'react'
import Image from 'next/image' import Image from 'next/image'
import { Container } from '@/components/ui/Container'
import type { Media as MediaType } from '@/payload-types' import type { Media as MediaType } from '@/payload-types'
type ShowcaseItem = { type ShowcaseItem = {
@ -71,7 +74,8 @@ export function ShowcaseBlock(props: ShowcaseBlockProps): React.ReactElement | n
if (!Array.isArray(items) || items.length === 0) return null if (!Array.isArray(items) || items.length === 0) return null
return ( return (
<section className="w-full max-w-5xl mx-auto py-12"> // Replaced hardcoded max-w-5xl and section with the unified Container
<Container className="py-12">
{(heading || subheading) && ( {(heading || subheading) && (
<div className="mb-8"> <div className="mb-8">
{heading && <h2 className="text-2xl font-medium text-foreground mb-2">{heading}</h2>} {heading && <h2 className="text-2xl font-medium text-foreground mb-2">{heading}</h2>}
@ -136,6 +140,6 @@ export function ShowcaseBlock(props: ShowcaseBlockProps): React.ReactElement | n
) )
})} })}
</div> </div>
</section> </Container>
) )
} }

View file

@ -1,4 +1,7 @@
'use client'
import React from 'react' import React from 'react'
import { Container } from '@/components/ui/Container' // Ensure this path is correct
type SkillCategory = { type SkillCategory = {
title: string title: string
@ -14,7 +17,8 @@ type SkillsBlockProps = {
export function SkillsBlock({ heading, keySkills, categories }: SkillsBlockProps) { export function SkillsBlock({ heading, keySkills, categories }: SkillsBlockProps) {
return ( return (
<section className="w-full max-w-5xl mx-auto py-12"> // Replaced hardcoded max-w-5xl and section with the unified Container
<Container className="py-12">
{heading && ( {heading && (
<p className="text-center text-xs tracking-widest uppercase text-foreground/30 mb-6"> <p className="text-center text-xs tracking-widest uppercase text-foreground/30 mb-6">
{heading} {heading}
@ -62,6 +66,6 @@ export function SkillsBlock({ heading, keySkills, categories }: SkillsBlockProps
))} ))}
</div> </div>
)} )}
</section> </Container>
) )
} }

View file

@ -1,8 +1,18 @@
'use client'
import React from 'react'
import { Container } from '@/components/ui/Container' // Ensure this path is correct
type StatsStripProps = {
stats: { value: string; label: string }[]
}
export function StatsStripBlock({ stats }: StatsStripProps) { export function StatsStripBlock({ stats }: StatsStripProps) {
if (!Array.isArray(stats) || stats.length === 0) return null if (!Array.isArray(stats) || stats.length === 0) return null
return ( return (
<section className="w-full max-w-5xl mx-auto py-12 md:py-24"> // Replaced hardcoded max-w-5xl and section with the unified Container
<Container className="py-12 md:py-24">
<div className="bg-muted/50 border border-foreground/8 rounded-xl overflow-hidden"> <div className="bg-muted/50 border border-foreground/8 rounded-xl overflow-hidden">
<div className="grid grid-cols-2 md:grid-cols-4 divide-x divide-y md:divide-y-0 divide-foreground/10"> <div className="grid grid-cols-2 md:grid-cols-4 divide-x divide-y md:divide-y-0 divide-foreground/10">
{stats.map((stat, i) => ( {stats.map((stat, i) => (
@ -17,6 +27,6 @@ export function StatsStripBlock({ stats }: StatsStripProps) {
))} ))}
</div> </div>
</div> </div>
</section> </Container>
) )
} }

View file

@ -1,4 +1,7 @@
'use client'
import React from 'react' import React from 'react'
import { Container } from '@/components/ui/Container' // Ensure this path is correct
type ToolStackBlockProps = { type ToolStackBlockProps = {
heading?: string heading?: string
@ -9,8 +12,8 @@ export function ToolStackBlock({ heading, tools }: ToolStackBlockProps) {
if (!Array.isArray(tools) || tools.length === 0) return null if (!Array.isArray(tools) || tools.length === 0) return null
return ( return (
// Standardized vertical spacing to match other page sections // Replaced hardcoded max-w-5xl and section with the unified Container
<section className="w-full max-w-5xl mx-auto py-12 md:py-24"> <Container className="py-12 md:py-24">
<div className="bg-muted/50 border border-foreground/10 rounded-2xl p-8"> <div className="bg-muted/50 border border-foreground/10 rounded-2xl p-8">
{heading && ( {heading && (
<p className="text-[10px] font-bold tracking-[0.2em] uppercase text-foreground/30 mb-6"> <p className="text-[10px] font-bold tracking-[0.2em] uppercase text-foreground/30 mb-6">
@ -28,6 +31,6 @@ export function ToolStackBlock({ heading, tools }: ToolStackBlockProps) {
))} ))}
</div> </div>
</div> </div>
</section> </Container>
) )
} }