-
Notifications
You must be signed in to change notification settings - Fork 8
add: 新的滚动headpage,尚未加入新手导航 #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
liuyuhuai3
wants to merge
1
commit into
fae-foundation:main
Choose a base branch
from
liuyuhuai3:aboutpage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=? |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 ( | ||
| <div className="min-h-screen bg-white"> | ||
| <main> | ||
| <LandingSection /> | ||
| <Suspense fallback={<Loading />}> | ||
| <DetailSection /> | ||
| </Suspense> | ||
| </main> | ||
| </div> | ||
| ); | ||
| } | ||
| 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 ( | ||
| <div className="about-container"> | ||
| {/* 第一个section: 全屏水平轮播 */} | ||
| <section | ||
| className="h-screen overflow-hidden" | ||
| style={{ | ||
| transform: `scale(${1 + scrollY * 0.0005})`, | ||
| opacity: Math.max(0, 1 - scrollY * 0.001) | ||
| }} | ||
| > | ||
| <HorizontalCarousel /> | ||
| </section> | ||
|
|
||
| {/* 第二个section: 原有的about内容 */} | ||
| <section className="min-h-screen bg-white"> | ||
| <main> | ||
| <LandingSection /> | ||
| <Suspense fallback={<Loading />}> | ||
| <DetailSection /> | ||
| </Suspense> | ||
| </main> | ||
| </section> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 ( | ||
| <div className="relative w-full h-full"> | ||
| {/* 轮播容器 */} | ||
| <div | ||
| className="flex h-full transition-transform duration-300 ease-in-out" | ||
| style={{ transform: `translateX(-${currentIndex * 100}%)` }} | ||
| > | ||
| {slides.map((slide, index) => ( | ||
| <div key={slide.id} className="relative min-w-full h-full"> | ||
| {/* 背景图片 */} | ||
| <div | ||
| className="absolute inset-0 bg-cover bg-center bg-no-repeat" | ||
| style={{ backgroundImage: `url(${slide.image})` }} | ||
| ></div> | ||
|
|
||
| {/* 半透明遮罩 */} | ||
| <div className="absolute inset-0 bg-black/30"></div> | ||
|
|
||
| {/* 文字内容 */} | ||
| <div className="relative z-10 h-full flex items-center justify-center"> | ||
| <div className="text-center text-white"> | ||
| <h2 className="text-6xl font-bold mb-4 drop-shadow-lg font-mansalva"> | ||
| {slide.title} | ||
| </h2> | ||
| <p className="text-3xl drop-shadow-md font-mansalva"> | ||
| {slide.content} | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ))} | ||
| </div> | ||
|
|
||
| {/* 向下滑动提示箭头 */} | ||
| <div className="absolute bottom-8 left-1/2 transform -translate-x-1/2 animate-bounce"> | ||
| <div className="text-white text-3xl"> | ||
| ↓ | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* 导航按钮 */} | ||
| {/* <button | ||
| onClick={prevSlide} | ||
| className="absolute left-4 top-1/2 transform -translate-y-1/2 bg-white/20 hover:bg-white/40 p-2 rounded" | ||
| > | ||
| ← | ||
| </button> | ||
| <button | ||
| onClick={nextSlide} | ||
| className="absolute right-4 top-1/2 transform -translate-y-1/2 bg-white/20 hover:bg-white/40 p-2 rounded" | ||
| > | ||
| → | ||
| </button> */} | ||
|
|
||
| {/* 点导航 */} | ||
| {/* <div className="absolute bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2"> | ||
| {slides.map((_, index) => ( | ||
| <button | ||
| key={index} | ||
| onClick={() => setCurrentIndex(index)} | ||
| className={`w-3 h-3 rounded-full ${ | ||
| currentIndex === index ? 'bg-white' : 'bg-white/50' | ||
| }`} | ||
| /> | ||
| ))} | ||
| </div> */} | ||
| </div> | ||
| ) | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.env.example文件不需要动