Commit e5584792 authored by ganjingcun's avatar ganjingcun

add database link

parent 7ef247ed
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
"OperationSystem": "操作系统", "OperationSystem": "操作系统",
"Home": "首页", "Home": "首页",
"BBS": "社区", "BBS": "社区",
"DataBase": "决斗数据库",
"Download": "立即安装", "Download": "立即安装",
"CardTitle1": "新世界的入口", "CardTitle1": "新世界的入口",
"CardTitle2": "为了爱而存在的萌立方", "CardTitle2": "为了爱而存在的萌立方",
......
import React from 'react' import React from 'react'
import { Menu ,Icon } from 'antd' import { Menu, Icon } from 'antd'
import { FormattedMessage } from 'react-intl' import { FormattedMessage } from 'react-q'
export default class Nav_Mobile extends React.Component{ export default class Nav_Mobile extends React.Component {
constructor(props){ constructor(props) {
super(props); super(props);
this.state = { this.state = {
classMenu: false, classMenu: false,
}; };
} }
menu=()=>{ menu = () => {
this.setState({classMenu:!this.state.classMenu}); this.setState({ classMenu: !this.state.classMenu });
} }
render() { render() {
var classMenu=this.state.classMenu; var classMenu = this.state.classMenu;
if(!this.props.isMobile){ if (!this.props.isMobile) {
return ( return (
<div> <div>
<div className="App-Logo"> <div className="App-Logo">
<img alt="img" src={require("../public/logo.png")} style={{width: '140px', margin: '10px'}}/> <img alt="img" src={require("../public/logo.png")} style={{ width: '140px', margin: '10px' }} />
</div> </div>
<Menu <Menu
theme="dark" theme="dark"
...@@ -28,36 +28,41 @@ export default class Nav_Mobile extends React.Component{ ...@@ -28,36 +28,41 @@ export default class Nav_Mobile extends React.Component{
style={{ lineHeight: '64px' }}> style={{ lineHeight: '64px' }}>
<Menu.Item key="1"> <Menu.Item key="1">
<FormattedMessage id={"Home"}/> <FormattedMessage id={"Home"} />
</Menu.Item> </Menu.Item>
<Menu.Item key="2"> <Menu.Item key="2">
<a href="https://ygobbs.com/"> <a href="https://ygobbs.com/">
<FormattedMessage id={"BBS"}/> <FormattedMessage id={"BBS"} />
</a>
</Menu.Item>
<Menu.Item key="3">
<a href="https://mycard.moe/ygopro/arena/index.html">
<FormattedMessage id={"DataBase"} />
</a> </a>
</Menu.Item> </Menu.Item>
</Menu> </Menu>
</div> </div>
); );
}else{ } else {
return ( return (
<div> <div>
<div style={{position:'fixed',zIndex:10,width:'100%',background:'#404040'}}> <div style={{ position: 'fixed', zIndex: 10, width: '100%', background: '#404040' }}>
<div className="App-Logo"> <div className="App-Logo">
<img alt="img" src={require("../public/logo.png")} style={{width: '140px', margin: '10px'}}/> <img alt="img" src={require("../public/logo.png")} style={{ width: '140px', margin: '10px' }} />
</div> </div>
<div className="square" onClick={this.menu}> <div className="square" onClick={this.menu}>
<Icon type="down-circle-o" /> <Icon type="down-circle-o" />
</div> </div>
</div> </div>
<ul className={ classMenu ? "menu cshow" : "menu chidden" }> <ul className={classMenu ? "menu cshow" : "menu chidden"}>
<a href="#"> <a href="#">
<li> <li>
<FormattedMessage id={"Home"}/> <FormattedMessage id={"Home"} />
</li> </li>
</a> </a>
<a href="https://ygobbs.com/"> <a href="https://ygobbs.com/">
<li> <li>
<FormattedMessage id={"BBS"}/> <FormattedMessage id={"BBS"} />
</li> </li>
</a> </a>
</ul> </ul>
......
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