Commit a54cb62b authored by 吕祺's avatar 吕祺 ⛹🏽

add warning

parent 9d2ded96
......@@ -19,7 +19,7 @@ export class Header extends React.PureComponent {
this.renderLinks = this.renderLinks.bind(this)
this.renderCollapse = this.renderCollapse.bind(this)
}
genLink(en, curPage, path, txt, txtEN) {
genLink(en, curPage, path, txt, txtEN, query=null) {
return (
<span
className={classnames({
......@@ -27,7 +27,7 @@ export class Header extends React.PureComponent {
active: curPage === path
})}
>
<Link prefetch={false} href={{ pathname: '/' + path }}>
<Link prefetch={false} href={{ pathname: '/' + path, query }} passHref="true">
<a style={{ height: '100%', display: 'inline-block' }}>
{en === null ? '' : en ? txtEN : txt}
</a>
......@@ -149,7 +149,9 @@ export class Header extends React.PureComponent {
ronghui,
ronghuiEN,
news,
newsEN
newsEN,
warn,
warnEN
}
} = head
const { en, curPage, setLang } = this.props
......@@ -174,6 +176,7 @@ export class Header extends React.PureComponent {
ronghuiEN
)}
{this.genLink(en, curPage + '.html', 'news.html', news, newsEN)}
{this.genLink(en, curPage + '.html', 'post.html', warn, warnEN, {t: "news", d: "20210514014133435"})}
{!collapse && en !== null && (
<span
className={classnames({
......
......@@ -6,10 +6,12 @@ portfolio: 投资企业
team: 团队
ronghui: 榕汇
news: 动态
warn: 免责声明
aboutEN: About
portfolioEN: Portfolio
teamEN: Team
ronghuiEN: Community
newsEN: News
warnEN: Disclaimer
---
......@@ -324,11 +324,13 @@ collections:
- { label: "Team", name: "team", widget: "string" }
- { label: "Ronghui", name: "ronghui", widget: "string" }
- { label: "News", name: "news", widget: "string" }
- { label: "Warn", name: "warn", widget: "string" }
- { label: "AboutEN", name: "aboutEN", widget: "string" }
- { label: "PortfolioEN", name: "portfolioEN", widget: "string" }
- { label: "TeamEN", name: "teamEN", widget: "string" }
- { label: "RonghuiEN", name: "ronghuiEN", widget: "string" }
- { label: "NewsEN", name: "newsEN", widget: "string" }
- { label: "WarnEN", name: "warnEN", widget: "string" }
- label: "Foot"
name: "foot"
file: "content/foot.md"
......
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