diff --git a/.env.example b/.env.example index e9a21d2..5170a5d 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1 @@ -NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk -NEXT_PUBLIC_ALCHEMY_ID=kkkkkkkkkkkkkkkkkkkkk - -NEXT_PUBLIC_ENVIRONMENT=development # or production - -NEXT_PUBLIC_APP_ADDRESS_TESTNET=0xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD -NEXT_PUBLIC_APP_ADDRESS=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - -LENS_API_KEY_TESTNET=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -LENS_API_KEY=hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh - -NEXT_PUBLIC_COOK_ADDRESS=0xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD -NEXT_PUBLIC_COOK_ADDRESS_TESTNET=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF \ No newline at end of file +NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=? \ No newline at end of file diff --git a/public/1.png b/public/1.png new file mode 100644 index 0000000..e3cc9a0 Binary files /dev/null and b/public/1.png differ diff --git a/public/2.png b/public/2.png new file mode 100644 index 0000000..7257cfb Binary files /dev/null and b/public/2.png differ diff --git a/public/3.png b/public/3.png new file mode 100644 index 0000000..4dcf9d1 Binary files /dev/null and b/public/3.png differ diff --git a/public/env.ts b/public/env.ts new file mode 100644 index 0000000..8e9662f --- /dev/null +++ b/public/env.ts @@ -0,0 +1,14 @@ +// Environment configuration +// This file provides a centralized way to access environment variables + +export const env = { + NEXT_PUBLIC_ENVIRONMENT: process.env.NEXT_PUBLIC_ENVIRONMENT || "development", + NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID!, + NEXT_PUBLIC_ALCHEMY_ID: process.env.NEXT_PUBLIC_ALCHEMY_ID!, + NEXT_PUBLIC_APP_ADDRESS: process.env.NEXT_PUBLIC_APP_ADDRESS!, + NEXT_PUBLIC_APP_ADDRESS_TESTNET: process.env.NEXT_PUBLIC_APP_ADDRESS_TESTNET!, + LENS_API_KEY: process.env.LENS_API_KEY!, + LENS_API_KEY_TESTNET: process.env.LENS_API_KEY_TESTNET!, + NEXT_PUBLIC_COOK_ADDRESS: process.env.NEXT_PUBLIC_COOK_ADDRESS!, + NEXT_PUBLIC_COOK_ADDRESS_TESTNET: process.env.NEXT_PUBLIC_COOK_ADDRESS_TESTNET!, +} as const; \ No newline at end of file diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsx index 1bc7732..a05620d 100644 --- a/src/app/[locale]/about/page.tsx +++ b/src/app/[locale]/about/page.tsx @@ -1,19 +1,46 @@ -"use client"; + "use client"; -import { Suspense } from "react"; -import { LandingSection } from "@/components/home/landing-section"; -import { DetailSection } from "@/components/home/detail-section"; -import { Loading } from "@/components/loading"; + import { useState, useEffect, Suspense } from "react"; + import { HorizontalCarousel } from + "@/components/home/horizontal-carousel"; + import { LandingSection } from + "@/components/home/landing-section"; + import { DetailSection } from + "@/components/home/detail-section"; + import { Loading } from "@/components/loading"; -export default function AboutPage() { - return ( -
-
- - }> - - -
-
- ); -} + export default function AboutPage() { + const [scrollY, setScrollY] = useState(0) + + useEffect(() => { + const handleScroll = () => setScrollY(window.scrollY) + window.addEventListener('scroll', handleScroll) + return () => window.removeEventListener('scroll', + handleScroll) + }, []) + + return ( +
+ {/* 第一个section: 全屏水平轮播 */} +
+ +
+ + {/* 第二个section: 原有的about内容 */} +
+
+ + }> + + +
+
+
+ ); + } \ No newline at end of file diff --git a/src/components/home/horizontal-carousel.tsx b/src/components/home/horizontal-carousel.tsx new file mode 100644 index 0000000..f656929 --- /dev/null +++ b/src/components/home/horizontal-carousel.tsx @@ -0,0 +1,116 @@ +// src/components/home/horizontal-carousel.tsx +"use client" + +import React, { useState, useEffect } from 'react' + +export function HorizontalCarousel() { + const [currentIndex, setCurrentIndex] = useState(0) + + // 轮播卡片数据 + const slides = [ + { + id: 1, + title: "Arctica", + content: "one-stop portal to ship and preserve your fanworks onchain.", + image: "/1.png" + }, + { + id: 2, + title: "Arctica", + content: "one-stop portal to ship and preserve your fanworks onchain.", + image: "/2.png" + }, + { + id: 3, + title: "Arctica", + content: "one-stop portal to ship and preserve your fanworks onchain.", + image: "/3.png" + }, + ] + + // 自动播放功能 + useEffect(() => { + const interval = setInterval(() => { + setCurrentIndex((prev) => (prev + 1) % slides.length) + }, 20000) // 20秒间隔 + + return () => clearInterval(interval) + }, [slides.length]) + + const nextSlide = () => { + setCurrentIndex((prev) => (prev + 1) % slides.length) + } + + const prevSlide = () => { + setCurrentIndex((prev) => (prev - 1 + slides.length) % slides.length) + } + + return ( +
+ {/* 轮播容器 */} +
+ {slides.map((slide, index) => ( +
+ {/* 背景图片 */} +
+ + {/* 半透明遮罩 */} +
+ + {/* 文字内容 */} +
+
+

+ {slide.title} +

+

+ {slide.content} +

+
+
+
+ ))} +
+ + {/* 向下滑动提示箭头 */} +
+
+ ↓ +
+
+ + {/* 导航按钮 */} + {/* + */} + + {/* 点导航 */} + {/*
+ {slides.map((_, index) => ( +
*/} +
+ ) +} \ No newline at end of file