diff --git a/src/components/layout/SwiperCardSection/index.tsx b/src/components/layout/SwiperCardSection/index.tsx index 968b672..8c69cd9 100644 --- a/src/components/layout/SwiperCardSection/index.tsx +++ b/src/components/layout/SwiperCardSection/index.tsx @@ -20,7 +20,7 @@ type Data = { }[]; } -export default function SwiperCardSection({ data }: { data: Data }) { +export default function SwiperCardSection({ data, disableHover=false }: { data: Data, disableHover?: boolean }) { const location = useLocation(); const hash = location.hash; const hashId = decodeURIComponent(hash.replace('#', '')); @@ -63,7 +63,7 @@ export default function SwiperCardSection({ data }: { data: Data }) { {data.cardItems.map((item, index) => ( 2 ? 0 : index * 0.5}> -
+
{item.title}
diff --git a/src/pages/About/Founder.module.css b/src/pages/About/Founder.module.css index f96aab4..511e26a 100644 --- a/src/pages/About/Founder.module.css +++ b/src/pages/About/Founder.module.css @@ -172,6 +172,13 @@ gap: 1rem; width: 70%; margin: 0 auto; + margin-top: -50px; +} + +.section3Col { + display: flex; + flex-direction: column; + gap: 1rem; } .section3Item { diff --git a/src/pages/About/Founder.tsx b/src/pages/About/Founder.tsx index 72a2b0d..141228b 100644 --- a/src/pages/About/Founder.tsx +++ b/src/pages/About/Founder.tsx @@ -17,8 +17,16 @@ export default function AboutFounder() { const section2Data = founder?.section2Data; const section3Data = founder?.section3Data; const section4Data = founder?.section4Data; - - if (!founder) return null; + const items = (section3Data.items || []).reduce((p: any, c: any) => { + const col = Number(c.column) - 1 + if (p[col]) { + p[col].push(c) + } else { + p[col] = [] + p[col].push(c) + } + return p + }, []) return (
@@ -34,16 +42,16 @@ export default function AboutFounder() {
{section1Data.items?.map((item: { title: string; content?: string; backgroundImage?: string }, index: number) => ( -
- {item.title} -
-
-
- {item.title} +
+ {item.title} +
+
+
+ {item.title} +
+
-
-
))}
@@ -65,12 +73,12 @@ export default function AboutFounder() {
- 个人照 + 个人照 -
-

-

+
+

+

@@ -81,12 +89,18 @@ export default function AboutFounder() {
{ - section3Data?.items.map((item: { title?: string }, index: number) => ( - -
- {item.title ?
  • {item.title}
  • : null} + items.map((col: any, index: number) => ( +
    + { + col.map((item: any, colIndex: number) => ( + +
    + {item.title ?
  • {item.title}
  • : null} +
    +
    + )) + }
    - )) }
    diff --git a/src/pages/PropertyService/index.tsx b/src/pages/PropertyService/index.tsx index 27d5e97..62ee45c 100644 --- a/src/pages/PropertyService/index.tsx +++ b/src/pages/PropertyService/index.tsx @@ -39,7 +39,7 @@ export default function PropertyService() { /> {section1Data && } - {swiperCardData && } + {swiperCardData && } {rowAccordionData && } {section4Data && }