Sword/src/layouts/UserLayout.js

68 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { Fragment } from 'react';
import { formatMessage } from 'umi/locale';
import Link from 'umi/link';
import { Icon } from 'antd';
import GlobalFooter from '@/components/GlobalFooter';
import SelectLang from '@/components/SelectLang';
import styles from './UserLayout.less';
import logo from '../assets/logo.svg';
const links = [
{
key: 'help',
title: formatMessage({ id: 'layout.user.link.help' }),
href: '',
},
{
key: 'privacy',
title: formatMessage({ id: 'layout.user.link.privacy' }),
href: '',
},
{
key: 'terms',
title: formatMessage({ id: 'layout.user.link.terms' }),
href: '',
},
];
const copyright = (
<Fragment>
Copyright <Icon type="copyright" /> 2020 SpringBlade{' '}
<a
key="github"
title="git"
target="_blank"
rel="noopener noreferrer"
href="https://gitee.com/smallc/SpringBlade"
>
<Icon type="github" />{' '}
</a>
</Fragment>
);
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}>Sword 企业级开发平台</span>
</Link>
</div>
<div className={styles.desc}>
Sword是SpringBlade前端UI项目基于react ant designumidva等流行技术栈
</div>
</div>
{children}
</div>
<GlobalFooter links={links} copyright={copyright} />
</div>
);
export default UserLayout;