Commit d81f5b62 authored by Andreas Cederström's avatar Andreas Cederström Committed by ddcat1115

move background on login page to correct position on large screens (#665)

* move background on login page to correct position on large screens

* promote antd layout and content - tweak mobile styles

* simplify width in login and register page
parent 03e3a2dd
...@@ -89,7 +89,7 @@ class Login extends Component { ...@@ -89,7 +89,7 @@ class Login extends Component {
} }
}); });
return ( return (
<div className={classNames(className, styles.main)}> <div className={classNames(className, styles.login)}>
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>
{ {
tabs.length ? ( tabs.length ? (
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
.main { .login {
width: 368px;
margin: 0 auto;
.tabs { .tabs {
padding: 0 2px; padding: 0 2px;
......
...@@ -4,6 +4,10 @@ body, ...@@ -4,6 +4,10 @@ body,
height: 100%; height: 100%;
} }
:global(.ant-layout) {
min-height: 100%;
}
canvas { canvas {
display: block; display: block;
} }
......
...@@ -177,7 +177,6 @@ class BasicLayout extends React.PureComponent { ...@@ -177,7 +177,6 @@ class BasicLayout extends React.PureComponent {
onNoticeVisibleChange={this.handleNoticeVisibleChange} onNoticeVisibleChange={this.handleNoticeVisibleChange}
/> />
<Content style={{ margin: '24px 24px 0', height: '100%' }}> <Content style={{ margin: '24px 24px 0', height: '100%' }}>
<div style={{ minHeight: 'calc(100vh - 260px)' }}>
<Switch> <Switch>
{ {
redirectData.map(item => redirectData.map(item =>
...@@ -201,7 +200,7 @@ class BasicLayout extends React.PureComponent { ...@@ -201,7 +200,7 @@ class BasicLayout extends React.PureComponent {
<Redirect exact from="/" to={bashRedirect} /> <Redirect exact from="/" to={bashRedirect} />
<Route render={NotFound} /> <Route render={NotFound} />
</Switch> </Switch>
</div> </Content>
<GlobalFooter <GlobalFooter
links={[{ links={[{
key: 'Pro 首页', key: 'Pro 首页',
...@@ -225,7 +224,6 @@ class BasicLayout extends React.PureComponent { ...@@ -225,7 +224,6 @@ class BasicLayout extends React.PureComponent {
</div> </div>
} }
/> />
</Content>
</Layout> </Layout>
</Layout> </Layout>
); );
......
...@@ -38,6 +38,7 @@ class UserLayout extends React.PureComponent { ...@@ -38,6 +38,7 @@ class UserLayout extends React.PureComponent {
return ( return (
<DocumentTitle title={this.getPageTitle()}> <DocumentTitle title={this.getPageTitle()}>
<div className={styles.container}> <div className={styles.container}>
<div className={styles.content}>
<div className={styles.top}> <div className={styles.top}>
<div className={styles.header}> <div className={styles.header}>
<Link to="/"> <Link to="/">
...@@ -60,7 +61,8 @@ class UserLayout extends React.PureComponent { ...@@ -60,7 +61,8 @@ class UserLayout extends React.PureComponent {
)} )}
<Redirect exact from="/user" to="/user/login" /> <Redirect exact from="/user" to="/user/login" />
</Switch> </Switch>
<GlobalFooter className={styles.footer} links={links} copyright={copyright} /> </div>
<GlobalFooter links={links} copyright={copyright} />
</div> </div>
</DocumentTitle> </DocumentTitle>
); );
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
.container { .container {
background: #f0f2f5; display: flex;
background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg'); flex-direction: column;
width: 100%;
min-height: 100%; min-height: 100%;
}
.content {
padding: 32px 0;
flex: 1;
}
@media (min-width: @screen-md-min) {
.container {
background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center 110px;
background-size: 100%; background-size: 100%;
padding: 110px 0 144px 0; }
position: relative;
.content {
padding: 112px 0 24px 0;
}
} }
.top { .top {
...@@ -45,9 +57,3 @@ ...@@ -45,9 +57,3 @@
margin-top: 12px; margin-top: 12px;
margin-bottom: 40px; margin-bottom: 40px;
} }
.footer {
position: absolute;
width: 100%;
bottom: 0;
}
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