mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-05 15:10:26 +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 Link from 'next/link'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { createContext, useContext, useEffect, useRef, useState } from 'react'
|
import { createContext, useContext, useEffect, useRef, useState } from 'react'
|
||||||
import Announcement from './components/Announcement'
|
|
||||||
import ArticleInfo from './components/ArticleInfo'
|
import ArticleInfo from './components/ArticleInfo'
|
||||||
import { ArticleLock } from './components/ArticleLock'
|
import { ArticleLock } from './components/ArticleLock'
|
||||||
import BannerFullWidth from './components/BannerFullWidth'
|
import BannerFullWidth from './components/BannerFullWidth'
|
||||||
|
import CTA from './components/CTA'
|
||||||
import Catalog from './components/Catalog'
|
import Catalog from './components/Catalog'
|
||||||
import CatalogFloat from './components/CatalogFloat'
|
import CatalogFloat from './components/CatalogFloat'
|
||||||
import CategoryGroup from './components/CategoryGroup'
|
import CategoryGroup from './components/CategoryGroup'
|
||||||
@@ -47,7 +47,7 @@ export const useMagzineGlobal = () => useContext(ThemeGlobalMagzine)
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
const LayoutBase = props => {
|
const LayoutBase = props => {
|
||||||
const { children, notice } = props
|
const { children } = props
|
||||||
const [tocVisible, changeTocVisible] = useState(false)
|
const [tocVisible, changeTocVisible] = useState(false)
|
||||||
const searchModal = useRef(null)
|
const searchModal = useRef(null)
|
||||||
|
|
||||||
@@ -69,13 +69,8 @@ const LayoutBase = props => {
|
|||||||
<div id='main' role='main'>
|
<div id='main' role='main'>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
{/* 底部 */}
|
{/* 行动呼吁 */}
|
||||||
<Announcement
|
<CTA {...props} />
|
||||||
post={notice}
|
|
||||||
className={
|
|
||||||
'text-center text-black bg-[#7BE986] dark:bg-hexo-black-gray py-16'
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<Footer title={siteConfig('TITLE')} />
|
<Footer title={siteConfig('TITLE')} />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user