mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
Hexo主题
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
const CONFIG_EMPTY = {
|
||||
TEST_CONFIG: 'TESET'
|
||||
}
|
||||
export default CONFIG_EMPTY
|
||||
|
||||
@@ -31,6 +31,7 @@ const LayoutBase = ({
|
||||
}) => {
|
||||
return (<>
|
||||
<CommonHead meta={meta} />
|
||||
{headerSlot}
|
||||
<main id='wrapper' className='flex justify-center flex-1 pb-12'>
|
||||
{children}
|
||||
</main>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
export const LayoutIndex = ({ posts, tags, meta, categories, postCount, latestPosts }) => {
|
||||
return <div>Index</div>
|
||||
import Header from './components/Header'
|
||||
import CONFIG_HEXO from './config_hexo'
|
||||
import LayoutBase from './LayoutBase'
|
||||
|
||||
export const LayoutIndex = (props) => {
|
||||
return <LayoutBase {...props} headerSlot={CONFIG_HEXO.HOME_BANNER_ENABLE && <Header/>}>
|
||||
|
||||
</LayoutBase>
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { faAngleDown } from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { useEffect, useState } from 'react'
|
||||
import Typed from 'typed.js'
|
||||
import CONFIG_NEXT from '../config_next'
|
||||
import CONFIG_HEXO from '../config_hexo'
|
||||
|
||||
let wrapperTop = 0
|
||||
let windowTop = 0
|
||||
@@ -19,7 +19,7 @@ export default function Header () {
|
||||
if (!typed && window && document.getElementById('typed')) {
|
||||
changeType(
|
||||
new Typed('#typed', {
|
||||
strings: CONFIG_NEXT.HOME_BANNER_Strings,
|
||||
strings: CONFIG_HEXO.HOME_BANNER_GREETINGS,
|
||||
typeSpeed: 200,
|
||||
backSpeed: 100,
|
||||
backDelay: 400,
|
||||
@@ -66,9 +66,9 @@ export default function Header () {
|
||||
if (theme !== 'dark') {
|
||||
const stickyNavElement = document.getElementById('sticky-nav')
|
||||
if (window.scrollY < window.innerHeight) {
|
||||
stickyNavElement.classList.add('dark')
|
||||
stickyNavElement?.classList?.add('dark')
|
||||
} else {
|
||||
stickyNavElement.classList.remove('dark')
|
||||
stickyNavElement?.classList?.remove('dark')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ export default function Header () {
|
||||
className="duration-500 md:bg-fixed w-full bg-cover bg-center h-screen bg-black"
|
||||
style={{
|
||||
backgroundImage:
|
||||
`linear-gradient(rgba(0, 0, 0, 0.8), rgba(0,0,0,0.2), rgba(0, 0, 0, 0.8) ),url("${CONFIG_NEXT.HOME_BANNER_IMAGE}")`
|
||||
`linear-gradient(rgba(0, 0, 0, 0.8), rgba(0,0,0,0.2), rgba(0, 0, 0, 0.8) ),url("${CONFIG_HEXO.HOME_BANNER_IMAGE}")`
|
||||
}}
|
||||
>
|
||||
<div className="absolute flex h-full items-center lg:-mt-14 justify-center w-full text-4xl md:text-7xl text-white">
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
const CONFIG_HEXO = {
|
||||
HOME_BANNER_ENABLE: true,
|
||||
HOME_BANNER_GREETINGS: ['Hi,我是一个程序员', 'Hi,我是一个打工人', 'Hi,我是一个干饭人', '欢迎来到我的博客🎉'], // 首页大图标语文字
|
||||
HOME_BANNER_IMAGE: './bg_image.jpg' // see /public/bg_image.jpg
|
||||
}
|
||||
export default CONFIG_HEXO
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* 修改 from 后面的路径,实现主题切换
|
||||
*/
|
||||
|
||||
export * from './NEXT' // 切换主题
|
||||
// export * from './NEXT' // 切换主题
|
||||
// export * from './Fukasawa'
|
||||
// export * from './Empty'
|
||||
export * from './Hexo'
|
||||
|
||||
Reference in New Issue
Block a user