mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-09 07:26:47 +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 (<>
|
return (<>
|
||||||
<CommonHead meta={meta} />
|
<CommonHead meta={meta} />
|
||||||
|
{headerSlot}
|
||||||
<main id='wrapper' className='flex justify-center flex-1 pb-12'>
|
<main id='wrapper' className='flex justify-center flex-1 pb-12'>
|
||||||
{children}
|
{children}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
export const LayoutIndex = ({ posts, tags, meta, categories, postCount, latestPosts }) => {
|
import Header from './components/Header'
|
||||||
return <div>Index</div>
|
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 { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import Typed from 'typed.js'
|
import Typed from 'typed.js'
|
||||||
import CONFIG_NEXT from '../config_next'
|
import CONFIG_HEXO from '../config_hexo'
|
||||||
|
|
||||||
let wrapperTop = 0
|
let wrapperTop = 0
|
||||||
let windowTop = 0
|
let windowTop = 0
|
||||||
@@ -19,7 +19,7 @@ export default function Header () {
|
|||||||
if (!typed && window && document.getElementById('typed')) {
|
if (!typed && window && document.getElementById('typed')) {
|
||||||
changeType(
|
changeType(
|
||||||
new Typed('#typed', {
|
new Typed('#typed', {
|
||||||
strings: CONFIG_NEXT.HOME_BANNER_Strings,
|
strings: CONFIG_HEXO.HOME_BANNER_GREETINGS,
|
||||||
typeSpeed: 200,
|
typeSpeed: 200,
|
||||||
backSpeed: 100,
|
backSpeed: 100,
|
||||||
backDelay: 400,
|
backDelay: 400,
|
||||||
@@ -66,9 +66,9 @@ export default function Header () {
|
|||||||
if (theme !== 'dark') {
|
if (theme !== 'dark') {
|
||||||
const stickyNavElement = document.getElementById('sticky-nav')
|
const stickyNavElement = document.getElementById('sticky-nav')
|
||||||
if (window.scrollY < window.innerHeight) {
|
if (window.scrollY < window.innerHeight) {
|
||||||
stickyNavElement.classList.add('dark')
|
stickyNavElement?.classList?.add('dark')
|
||||||
} else {
|
} 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"
|
className="duration-500 md:bg-fixed w-full bg-cover bg-center h-screen bg-black"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage:
|
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">
|
<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 后面的路径,实现主题切换
|
* 修改 from 后面的路径,实现主题切换
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './NEXT' // 切换主题
|
// export * from './NEXT' // 切换主题
|
||||||
// export * from './Fukasawa'
|
// export * from './Fukasawa'
|
||||||
// export * from './Empty'
|
// export * from './Empty'
|
||||||
|
export * from './Hexo'
|
||||||
|
|||||||
Reference in New Issue
Block a user