Skip to content

Commit 5e3fa19

Browse files
committed
fix commerce config
1 parent 4bda12d commit 5e3fa19

File tree

4 files changed

+43
-32
lines changed

4 files changed

+43
-32
lines changed

themes/commerce/components/Footer.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ const Footer = props => {
2626
{/* 分类菜单 */}
2727
<div>
2828
<div className='font-bold mb-4 text-white'>
29-
{siteConfig('COMMERCE_TEXT_FOOTER_MENU_1', 'Product Center')}
29+
{siteConfig(
30+
'COMMERCE_TEXT_FOOTER_MENU_1',
31+
'Product Center',
32+
CONFIG
33+
)}
3034
</div>
3135
<nav
3236
id='home-nav-button'
@@ -48,7 +52,7 @@ const Footer = props => {
4852
{/* 系统菜单 */}
4953
<div>
5054
<div className='font-bold mb-4 text-white'>
51-
{siteConfig('COMMERCE_TEXT_FOOTER_MENU_2', 'About US')}
55+
{siteConfig('COMMERCE_TEXT_FOOTER_MENU_2', 'About US', CONFIG)}
5256
</div>
5357
<nav
5458
id='home-nav-button'
@@ -116,18 +120,18 @@ const Footer = props => {
116120
target='_blank'
117121
rel='noreferrer'
118122
title={'email'}
119-
href={`mailto:${siteConfig('CONTACT_EMAIL', CONFIG)}`}>
123+
href={`mailto:${siteConfig('CONTACT_EMAIL')}`}>
120124
<i className='transform hover:scale-125 duration-150 fas fa-envelope dark:hover:text-red-400 hover:text-red-600' />{' '}
121125
{siteConfig('CONTACT_EMAIL')}
122126
</a>
123127
)}
124128
</div>
125129
<div className='text-lg'>
126130
{' '}
127-
{siteConfig('CONTACT_PHONE', null, CONFIG) && (
131+
{siteConfig('CONTACT_PHONE', null) && (
128132
<div>
129133
<i className='transform hover:scale-125 duration-150 fas fa-user dark:hover:text-red-400 hover:text-red-600' />{' '}
130-
{siteConfig('CONTACT_PHONE', null, CONFIG)}
134+
{siteConfig('CONTACT_PHONE', null)}
131135
</div>
132136
)}
133137
</div>
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
import { siteConfig } from '@/lib/config'
22
import Link from 'next/link'
3+
import CONFIG from '../config'
34

45
export default function ProductCategories(props) {
56
const { categoryOptions } = props
67

7-
return <div className='hidden md:block w-72 mx-2'>
8-
{/* 分类菜单 */}
9-
<div className='bg-white p-4'>
10-
<div className='font-bold text-lg mb-4 border-b-2 py-2 border-[#D2232A]'>{siteConfig('COMMERCE_TEXT_MENU_GROUP', 'Product Categories')}</div>
11-
<nav id='home-nav-button' className={'flex flex-col space-y-2 text-start'}>
12-
{categoryOptions?.map(category => {
13-
return (
14-
<Link
15-
key={`${category.name}`}
16-
title={`${category.name}`}
17-
href={`/category/${category.name}`}
18-
className='hover:text-[#D2232A]'
19-
passHref>
20-
{category.name}
21-
</Link>
22-
)
23-
})}
24-
</nav>
8+
return (
9+
<div className='hidden md:block w-72 mx-2'>
10+
{/* 分类菜单 */}
11+
<div className='bg-white p-4'>
12+
<div className='font-bold text-lg mb-4 border-b-2 py-2 border-[#D2232A]'>
13+
{siteConfig(
14+
'COMMERCE_TEXT_CENTER_CATEGORY_TITLE',
15+
'Product Categories',
16+
CONFIG
17+
)}
2518
</div>
19+
<nav
20+
id='home-nav-button'
21+
className={'flex flex-col space-y-2 text-start'}>
22+
{categoryOptions?.map(category => {
23+
return (
24+
<Link
25+
key={`${category.name}`}
26+
title={`${category.name}`}
27+
href={`/category/${category.name}`}
28+
className='hover:text-[#D2232A]'
29+
passHref>
30+
{category.name}
31+
</Link>
32+
)
33+
})}
34+
</nav>
35+
</div>
2636
</div>
37+
)
2738
}

themes/commerce/components/ProductCenter.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ export default function ProductCenter(props) {
1414
0,
1515
parseInt(siteConfig('COMMERCE_HOME_POSTS_COUNT', 9))
1616
)
17-
const COMMERCE_TEXT_CENTER_TITLE = siteConfig(
18-
'COMMERCE_TEXT_CENTER_TITLE',
19-
'Product Center',
20-
CONFIG
21-
)
17+
2218
return (
2319
<div className='w-full my-4 mx-4'>
2420
<div className='w-full text-center text-4xl font-bold'>
25-
{COMMERCE_TEXT_CENTER_TITLE}
21+
{siteConfig('COMMERCE_TEXT_CENTER_TITLE', 'Product Center', CONFIG)}
2622
</div>
2723
{siteConfig('COMMERCE_TEXT_CENTER_DESCRIPTION') && (
2824
<div className='w-full text-center text-lg my-3 text-gray-500'>
29-
{siteConfig('COMMERCE_TEXT_CENTER_DESCRIPTION')}
25+
{siteConfig('COMMERCE_TEXT_CENTER_DESCRIPTION', CONFIG)}
3026
</div>
3127
)}
3228

themes/commerce/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ const LayoutIndex = props => {
127127
{/* 产品中心 */}
128128
<ProductCenter {...props} />
129129

130-
{/* 首页企业/品牌介绍 */}
130+
{/* 首页企业/品牌介绍 这里展示公告 */}
131131
{notice && (
132132
<div id='brand-introduction' className='w-full my-4 mx-4'>
133133
<div className='w-full text-center text-4xl font-bold pt-12'>
134-
{siteConfig('TEXT_HOME_ABOUT_US', notice.title)}
134+
{notice.title}
135135
</div>
136136
<NotionPage post={notice} className='text-2xl text-justify' />
137137
</div>

0 commit comments

Comments
 (0)