fix commerce config

This commit is contained in:
tangly1024.com
2024-05-08 10:15:21 +08:00
parent 4bda12d0f5
commit 5e3fa19916
4 changed files with 43 additions and 32 deletions

View File

@@ -26,7 +26,11 @@ const Footer = props => {
{/* 分类菜单 */}
<div>
<div className='font-bold mb-4 text-white'>
{siteConfig('COMMERCE_TEXT_FOOTER_MENU_1', 'Product Center')}
{siteConfig(
'COMMERCE_TEXT_FOOTER_MENU_1',
'Product Center',
CONFIG
)}
</div>
<nav
id='home-nav-button'
@@ -48,7 +52,7 @@ const Footer = props => {
{/* 系统菜单 */}
<div>
<div className='font-bold mb-4 text-white'>
{siteConfig('COMMERCE_TEXT_FOOTER_MENU_2', 'About US')}
{siteConfig('COMMERCE_TEXT_FOOTER_MENU_2', 'About US', CONFIG)}
</div>
<nav
id='home-nav-button'
@@ -116,7 +120,7 @@ const Footer = props => {
target='_blank'
rel='noreferrer'
title={'email'}
href={`mailto:${siteConfig('CONTACT_EMAIL', CONFIG)}`}>
href={`mailto:${siteConfig('CONTACT_EMAIL')}`}>
<i className='transform hover:scale-125 duration-150 fas fa-envelope dark:hover:text-red-400 hover:text-red-600' />{' '}
{siteConfig('CONTACT_EMAIL')}
</a>
@@ -124,10 +128,10 @@ const Footer = props => {
</div>
<div className='text-lg'>
{' '}
{siteConfig('CONTACT_PHONE', null, CONFIG) && (
{siteConfig('CONTACT_PHONE', null) && (
<div>
<i className='transform hover:scale-125 duration-150 fas fa-user dark:hover:text-red-400 hover:text-red-600' />{' '}
{siteConfig('CONTACT_PHONE', null, CONFIG)}
{siteConfig('CONTACT_PHONE', null)}
</div>
)}
</div>

View File

@@ -1,27 +1,38 @@
import { siteConfig } from '@/lib/config'
import Link from 'next/link'
import CONFIG from '../config'
export default function ProductCategories(props) {
const { categoryOptions } = props
return <div className='hidden md:block w-72 mx-2'>
{/* 分类菜单 */}
<div className='bg-white p-4'>
<div className='font-bold text-lg mb-4 border-b-2 py-2 border-[#D2232A]'>{siteConfig('COMMERCE_TEXT_MENU_GROUP', 'Product Categories')}</div>
<nav id='home-nav-button' className={'flex flex-col space-y-2 text-start'}>
{categoryOptions?.map(category => {
return (
<Link
key={`${category.name}`}
title={`${category.name}`}
href={`/category/${category.name}`}
className='hover:text-[#D2232A]'
passHref>
{category.name}
</Link>
)
})}
</nav>
return (
<div className='hidden md:block w-72 mx-2'>
{/* 分类菜单 */}
<div className='bg-white p-4'>
<div className='font-bold text-lg mb-4 border-b-2 py-2 border-[#D2232A]'>
{siteConfig(
'COMMERCE_TEXT_CENTER_CATEGORY_TITLE',
'Product Categories',
CONFIG
)}
</div>
<nav
id='home-nav-button'
className={'flex flex-col space-y-2 text-start'}>
{categoryOptions?.map(category => {
return (
<Link
key={`${category.name}`}
title={`${category.name}`}
href={`/category/${category.name}`}
className='hover:text-[#D2232A]'
passHref>
{category.name}
</Link>
)
})}
</nav>
</div>
</div>
)
}

View File

@@ -14,19 +14,15 @@ export default function ProductCenter(props) {
0,
parseInt(siteConfig('COMMERCE_HOME_POSTS_COUNT', 9))
)
const COMMERCE_TEXT_CENTER_TITLE = siteConfig(
'COMMERCE_TEXT_CENTER_TITLE',
'Product Center',
CONFIG
)
return (
<div className='w-full my-4 mx-4'>
<div className='w-full text-center text-4xl font-bold'>
{COMMERCE_TEXT_CENTER_TITLE}
{siteConfig('COMMERCE_TEXT_CENTER_TITLE', 'Product Center', CONFIG)}
</div>
{siteConfig('COMMERCE_TEXT_CENTER_DESCRIPTION') && (
<div className='w-full text-center text-lg my-3 text-gray-500'>
{siteConfig('COMMERCE_TEXT_CENTER_DESCRIPTION')}
{siteConfig('COMMERCE_TEXT_CENTER_DESCRIPTION', CONFIG)}
</div>
)}

View File

@@ -127,11 +127,11 @@ const LayoutIndex = props => {
{/* 产品中心 */}
<ProductCenter {...props} />
{/* 首页企业/品牌介绍 */}
{/* 首页企业/品牌介绍 这里展示公告 */}
{notice && (
<div id='brand-introduction' className='w-full my-4 mx-4'>
<div className='w-full text-center text-4xl font-bold pt-12'>
{siteConfig('TEXT_HOME_ABOUT_US', notice.title)}
{notice.title}
</div>
<NotionPage post={notice} className='text-2xl text-justify' />
</div>