mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
magzine 组件重命名CTA
This commit is contained in:
18
themes/magzine/components/CTA.js
Normal file
18
themes/magzine/components/CTA.js
Normal 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'
|
||||
}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user