magzine 组件重命名CTA

This commit is contained in:
tangly1024.com
2024-09-23 12:34:55 +08:00
parent 97d700905e
commit 943baaaace
2 changed files with 22 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
/**
* CTA用于创建一个呼吁用户行动的部分Call To Action简称 CTA
* 该组件通过以下方式激励用户进行特定操作
* 用户的公告栏内容将在此显示
**/
export default function CTA({ notice }) {
return (
<>
{/* 底部 */}
<Announcement
post={notice}
className={
'text-center text-black bg-[#7BE986] dark:bg-hexo-black-gray py-16'
}
/>
</>
)
}

View File

@@ -12,10 +12,10 @@ import { isBrowser } from '@/lib/utils'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { createContext, useContext, useEffect, useRef, useState } from 'react'
import Announcement from './components/Announcement'
import ArticleInfo from './components/ArticleInfo'
import { ArticleLock } from './components/ArticleLock'
import BannerFullWidth from './components/BannerFullWidth'
import CTA from './components/CTA'
import Catalog from './components/Catalog'
import CatalogFloat from './components/CatalogFloat'
import CategoryGroup from './components/CategoryGroup'
@@ -47,7 +47,7 @@ export const useMagzineGlobal = () => useContext(ThemeGlobalMagzine)
* @constructor
*/
const LayoutBase = props => {
const { children, notice } = props
const { children } = props
const [tocVisible, changeTocVisible] = useState(false)
const searchModal = useRef(null)
@@ -69,13 +69,8 @@ const LayoutBase = props => {
<div id='main' role='main'>
{children}
</div>
{/* 底部 */}
<Announcement
post={notice}
className={
'text-center text-black bg-[#7BE986] dark:bg-hexo-black-gray py-16'
}
/>
{/* 行动呼吁 */}
<CTA {...props} />
<Footer title={siteConfig('TITLE')} />
</div>
</main>