theme-style

This commit is contained in:
tangly1024.com
2023-07-12 16:04:39 +08:00
parent ab2dc02719
commit a990d3c632
28 changed files with 314 additions and 95 deletions

View File

@@ -34,6 +34,7 @@ import TagItemMini from './components/TagItemMini'
import ShareBar from '@/components/ShareBar'
import Link from 'next/link'
import { Transition } from '@headlessui/react'
import { Style } from './style'
// 主题全局状态
const ThemeGlobalMedium = createContext()
@@ -54,7 +55,10 @@ const LayoutBase = props => {
return (
<ThemeGlobalMedium.Provider value={{ tocVisible, changeTocVisible }}>
{/* SEO相关 */}
<CommonHead meta={meta} />
{/* CSS样式 */}
<Style/>
<div id='theme-medium' className='bg-white dark:bg-hexo-black-gray w-full h-full min-h-screen justify-center dark:text-gray-300'>

17
themes/medium/style.js Normal file
View File

@@ -0,0 +1,17 @@
/* eslint-disable react/no-unknown-property */
/**
* 此处样式只对当前主题生效
* 此处不支持tailwindCSS的 @apply 语法
* @returns
*/
const Style = () => {
return <style jsx global>{`
.test {
text-color: red;
}
`}</style>
}
export { Style }