theme-landing

This commit is contained in:
tangly1024
2023-07-07 20:42:15 +08:00
parent 798ada7ec7
commit bfb343beeb
4 changed files with 109 additions and 90 deletions

View File

@@ -5,6 +5,7 @@ import { useState, useEffect } from 'react'
import Link from 'next/link' import Link from 'next/link'
import Logo from './Logo' import Logo from './Logo'
import MobileMenu from './MobileMenu' import MobileMenu from './MobileMenu'
import CONFIG from '../config'
export default function Header() { export default function Header() {
const [top, setTop] = useState(true) const [top, setTop] = useState(true)
@@ -35,13 +36,13 @@ export default function Header() {
{/* Desktop sign in links */} {/* Desktop sign in links */}
<ul className="flex grow justify-end flex-wrap items-center"> <ul className="flex grow justify-end flex-wrap items-center">
<li> <li>
<Link href="https://github.com/tangly1024/NotionNext" target='_blank' className="font-medium hover:font-bold text-gray-600 hover:text-gray-900 px-5 py-3 flex items-center transition duration-150 ease-in-out"> <Link href={CONFIG.HEDEAR_BUTTON_1_URL} target='_blank' className="font-medium hover:font-bold text-gray-600 hover:text-gray-900 px-5 py-3 flex items-center transition duration-150 ease-in-out">
<i className='fab fa-github mr-1'></i><div></div> <div>{CONFIG.HEADER_BUTTON_1_TITLE}</div>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="https://blog.tangly1024.com/" target='_blank' className="btn-sm text-gray-200 bg-gray-900 hover:bg-gray-800 ml-3"> <Link href={CONFIG.HEDEAR_BUTTON_2_URL} target='_blank' className="btn-sm text-gray-200 bg-gray-900 hover:bg-gray-800 ml-3">
<span>我的博客</span> <span>{CONFIG.HEADER_BUTTON_2_TITLE}</span>
<svg className="w-3 h-3 fill-current text-gray-400 shrink-0 ml-2 -mr-1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"> <svg className="w-3 h-3 fill-current text-gray-400 shrink-0 ml-2 -mr-1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
<path d="M11.707 5.293L7 .586 5.586 2l3 3H0v2h8.586l-3 3L7 11.414l4.707-4.707a1 1 0 000-1.414z" fillRule="nonzero" /> <path d="M11.707 5.293L7 .586 5.586 2l3 3H0v2h8.586l-3 3L7 11.414l4.707-4.707a1 1 0 000-1.414z" fillRule="nonzero" />
</svg> </svg>

View File

@@ -30,7 +30,7 @@ export default function Hero() {
{/* Section header */} {/* Section header */}
<div className="text-center pb-12 md:pb-16"> <div className="text-center pb-12 md:pb-16">
<h1 className="text-5xl md:text-6xl font-extrabold leading-tighter tracking-tighter mb-4" data-aos="zoom-y-out"> <h1 className="text-5xl md:text-6xl font-extrabold leading-tighter tracking-tighter mb-4" data-aos="zoom-y-out">
<span className="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-teal-400">{CONFIG.HERO_HEADER_1}</span> <span className="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-teal-400">{CONFIG.HERO_TITLE_1}</span>
</h1> </h1>
<div className="max-w-3xl mx-auto"> <div className="max-w-3xl mx-auto">
<p className="text-xl text-gray-600 mb-8" data-aos="zoom-y-out" data-aos-delay="150">{CONFIG.HERO_P_1}</p> <p className="text-xl text-gray-600 mb-8" data-aos="zoom-y-out" data-aos-delay="150">{CONFIG.HERO_P_1}</p>

View File

@@ -93,10 +93,21 @@ export default function ModalVideo({
> >
<div className="max-w-6xl mx-auto h-full flex items-center"> <div className="max-w-6xl mx-auto h-full flex items-center">
<Dialog.Panel className="w-full max-h-full aspect-video bg-black overflow-hidden"> <Dialog.Panel className="w-full max-h-full aspect-video bg-black overflow-hidden">
<video ref={videoRef} width={videoWidth} height={videoHeight} loop controls> {/* <video ref={videoRef} width={videoWidth} height={videoHeight} loop controls>
<source src={video} type="video/mp4" /> <source src={video} type="video/mp4" />
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video> */}
<div>
<iframe
className="video-iframe aspect-video w-screen md:w-[800px] mx-auto"
src={CONFIG.HERO_VIDEO_IFRAME}
scrolling="no"
border="0"
frameBorder="no"
allowfullscreen="true"
></iframe>
</div>
</Dialog.Panel> </Dialog.Panel>
</div> </div>
</Transition.Child> </Transition.Child>

View File

@@ -1,14 +1,21 @@
const CONFIG = { const CONFIG = {
HEADER_BUTTON_1_TITLE: 'Github开源',
HEDEAR_BUTTON_1_URL: 'https://github.com/tangly1024/NotionNext',
HEADER_BUTTON_2_TITLE: '作者博客',
HEDEAR_BUTTON_2_URL: 'https://blog.tangly1024.com/',
// 首页大图英雄板块 // 首页大图英雄板块
HERO_HEADER_1: 'NotionNext', HERO_TITLE_1: 'NotionNext',
HERO_P_1: '只需一个Notion笔记建站竟然如此简单', HERO_P_1: '快速搭建网站、轻松塑造个人品牌',
HERO_BUTTON_1_TEXT: '开始体验', HERO_BUTTON_1_TEXT: '开始体验',
HERO_BUTTON_1_LINK: 'https://docs.tangly1024.com/article/vercel-deploy-notion-next', HERO_BUTTON_1_LINK: 'https://docs.tangly1024.com/article/vercel-deploy-notion-next',
HERO_BUTTON_2_TEXT: '了解更多', HERO_BUTTON_2_TEXT: '了解更多',
HERO_BUTTON_2_LINK: 'https://docs.tangly1024.com/about', HERO_BUTTON_2_LINK: 'https://docs.tangly1024.com/about',
HERO_VIDEO_IMAGE: '/images/home.png', HERO_VIDEO_IMAGE: '/images/home.png',
HERO_VIDEO_URL: '/videos/video.mp4', // HERO_VIDEO_URL: '/videos/video.mp4',
HERO_VIDEO_IFRAME: '//player.bilibili.com/player.html?aid=913088616&bvid=BV1fM4y1L7Qi&cid=1187218697&page=1&&high_quality=1',
HERO_VIDEO_TIPS: 'Watch the full video (2 min)', HERO_VIDEO_TIPS: 'Watch the full video (2 min)',
// 特性介绍 // 特性介绍