/* eslint-disable */
/**
* 这是一个空白主题,方便您用作创建新主题时的模板,从而开发出您自己喜欢的主题
* 1. 禁用了代码质量检查功能,提高了代码的宽容度;您可以使用标准的html写法
* 2. 内容大部分是在此文件中写死,notion数据从props参数中传进来
* 3. 您可在此网站找到更多喜欢的组件 https://www.tailwind-kit.com/
*/
import BLOG from '@/blog.config'
import DarkModeButton from '@/components/DarkModeButton'
import NotionPage from '@/components/NotionPage'
import Link from 'next/link'
import { useState } from 'react'
/**
* 这是个配置文件,可以方便在此统一配置信息
*/
const THEME_CONFIG = { THEME: 'blank' }
/**
* 布局框架
* 作为一个基础框架使用,定义了整个主题每个页面必备的顶部导航栏和页脚
* 其它页面都嵌入到此框架中使用
* @param {*} props
* @returns
*/
const LayoutBase = (props) => {
const { siteInfo, children } = props
return
{/* 顶部导航栏 */}
{/* 内容 */}
{children}
{/* 底部页脚 */}
}
/**
* 首页布局
* @param {*} props
* @returns
*/
const LayoutIndex = (props) => {
const { siteInfo } = props
return (
)
}
/**
* 文章详情页布局
* @param {*} props
* @returns
*/
const LayoutSlug = (props) =>
// 其他布局暂时留空
const LayoutSearch = (props) =>
const LayoutArchive = (props) =>
const Layout404 = (props) =>
const LayoutCategory = (props) =>
const LayoutCategoryIndex = (props) =>
const LayoutPage = (props) =>
const LayoutTag = (props) =>
const LayoutTagIndex = (props) =>
/**
* 文章列表
*/
const PostList = (props) => {
const { latestPosts } = props
return
Lastest articles
All article are verified by 2 experts and valdiate by the CTO
{latestPosts?.map(post => (
{post.category}
{post.title}
{post.description}
{post.tags?.map(t => {
return
#{t}
})}
))}
}
/**
* 导航栏
* @param {*} param0
* @returns
*/
const NavBar = ({ siteInfo }) => {
const [showMenu, setShowMenu] = useState(false)
const toggleMenu = () => {
setShowMenu(!showMenu)
}
return
}
/**
* 页脚
* @param {*} param0
*/
const Footer = ({ siteInfo }) => {
return
}
/**
* 首版
* @param {*} param0
* @returns
*/
const CTA = ({ siteInfo }) => {
return
The React Framework for Production
Next.js gives you the best developer experience with all the features you need for production: hybrid static & server rendering, TypeScript support, smart bundling, route pre-fetching, and more. No config needed.
BLANK仅作为演示参考主题,便于开发着创建NotionNext主题
}
export {
THEME_CONFIG,
LayoutIndex,
LayoutSearch,
LayoutArchive,
LayoutSlug,
Layout404,
LayoutCategory,
LayoutCategoryIndex,
LayoutPage,
LayoutTag,
LayoutTagIndex
}