Commit 15761c57 authored by AI Bot's avatar AI Bot

单语言站点移除语言切换入口(Header 桌面/移动弹层、Footer)

- SITE_LANG 固定时四处切换按钮都不渲染,两站完全独立
- 本地 dev 不带 SITE_LANG 仍保留站内 toggle
Co-Authored-By: 's avatarClaude Code <noreply@anthropic.com>
parent 5de31a78
...@@ -87,41 +87,45 @@ export default class Footer extends React.Component { ...@@ -87,41 +87,45 @@ export default class Footer extends React.Component {
<div className="limitw footer-limitw"> <div className="limitw footer-limitw">
<div className="footer-group1"> <div className="footer-group1">
<div className="lang"> <div className="lang">
<span className="lang-col lang-col-img"></span> {!IS_SINGLE_LANG && (
<span <React.Fragment>
onClick={(e) => { <span className="lang-col lang-col-img"></span>
e.stopPropagation() <span
if (IS_SINGLE_LANG) { onClick={(e) => {
jumpToSite(false) e.stopPropagation()
return if (IS_SINGLE_LANG) {
} jumpToSite(false)
setLang(false) return
}} }
className={classnames({ setLang(false)
'lang-col': true, }}
'lang-col1': true, className={classnames({
active: !en 'lang-col': true,
})} 'lang-col1': true,
> active: !en
中文 })}
</span> >
<span 中文
onClick={(e) => { </span>
e.stopPropagation() <span
if (IS_SINGLE_LANG) { onClick={(e) => {
jumpToSite(true) e.stopPropagation()
return if (IS_SINGLE_LANG) {
} jumpToSite(true)
setLang(true) return
}} }
className={classnames({ setLang(true)
'lang-col': true, }}
'lang-col2': true, className={classnames({
active: en 'lang-col': true,
})} 'lang-col2': true,
> active: en
English })}
</span> >
English
</span>
</React.Fragment>
)}
</div> </div>
<div className="contact"> <div className="contact">
{this.genContactRow( {this.genContactRow(
......
...@@ -102,6 +102,9 @@ export class Header extends React.PureComponent { ...@@ -102,6 +102,9 @@ export class Header extends React.PureComponent {
)} )}
</div> */} </div> */}
<div className="lang modal-header-lang"> <div className="lang modal-header-lang">
{/* 单语言站点不渲染语言切换入口 */}
{!IS_SINGLE_LANG && (
<React.Fragment>
{/* <span className="lang-col lang-col-img modal-header-col"></span> */} {/* <span className="lang-col lang-col-img modal-header-col"></span> */}
<span <span
onClick={(e) => { onClick={(e) => {
...@@ -141,6 +144,8 @@ export class Header extends React.PureComponent { ...@@ -141,6 +144,8 @@ export class Header extends React.PureComponent {
> >
English English
</span> </span>
</React.Fragment>
)}
</div> </div>
</div> </div>
</Modal> </Modal>
...@@ -195,7 +200,7 @@ export class Header extends React.PureComponent { ...@@ -195,7 +200,7 @@ export class Header extends React.PureComponent {
)} )}
{this.genLink(en, curPage + '.html', 'news.html', news, newsEN)} {this.genLink(en, curPage + '.html', 'news.html', news, newsEN)}
{this.genLink(en, curPage + '.html', 'post.html', warn, warnEN, {t: "news", d: "20240124014133435"}, true)} {this.genLink(en, curPage + '.html', 'post.html', warn, warnEN, {t: "news", d: "20240124014133435"}, true)}
{!collapse && en !== null && ( {!IS_SINGLE_LANG && !collapse && en !== null && (
<span <span
className={classnames({ className={classnames({
'header-index': true 'header-index': true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment