UserLayout.js 1.48 KB
Newer Older
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
1
import React, { Fragment } from 'react';
2
import { formatMessage } from 'umi/locale';
zinkey's avatar
zinkey committed
3
import Link from 'umi/link';
4
import { Icon } from 'antd';
5
import GlobalFooter from '@/components/GlobalFooter';
6
import SelectLang from '@/components/SelectLang';
7
import styles from './UserLayout.less';
8
import logo from '../assets/logo.svg';
xiaohu's avatar
xiaohu committed
9

jim's avatar
jim committed
10 11 12
const links = [
  {
    key: 'help',
13
    title: formatMessage({ id: 'layout.user.link.help' }),
jim's avatar
jim committed
14 15 16 17
    href: '',
  },
  {
    key: 'privacy',
18
    title: formatMessage({ id: 'layout.user.link.privacy' }),
jim's avatar
jim committed
19 20 21 22
    href: '',
  },
  {
    key: 'terms',
23
    title: formatMessage({ id: 'layout.user.link.terms' }),
jim's avatar
jim committed
24 25 26
    href: '',
  },
];
27

jim's avatar
jim committed
28 29 30 31 32
const copyright = (
  <Fragment>
    Copyright <Icon type="copyright" /> 2018 ่š‚่š้‡‘ๆœไฝ“้ชŒๆŠ€ๆœฏ้ƒจๅ‡บๅ“
  </Fragment>
);
33

้™ˆๅธ…'s avatar
้™ˆๅธ… committed
34 35 36 37 38 39 40 41 42 43 44 45 46
const UserLayout = ({ children }) => (
  // @TODO <DocumentTitle title={this.getPageTitle()}>
  <div className={styles.container}>
    <div className={styles.lang}>
      <SelectLang />
    </div>
    <div className={styles.content}>
      <div className={styles.top}>
        <div className={styles.header}>
          <Link to="/">
            <img alt="logo" className={styles.logo} src={logo} />
            <span className={styles.title}>Ant Design</span>
          </Link>
47
        </div>
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
48
        <div className={styles.desc}>Ant Design ๆ˜ฏ่ฅฟๆน–ๅŒบๆœ€ๅ…ทๅฝฑๅ“ๅŠ›็š„ Web ่ฎพ่ฎก่ง„่Œƒ</div>
49
      </div>
้™ˆๅธ…'s avatar
้™ˆๅธ… committed
50 51 52 53 54
      {children}
    </div>
    <GlobalFooter links={links} copyright={copyright} />
  </div>
);
55 56

export default UserLayout;