Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit db6c623

Browse files
committed
Update login page UI view
1 parent 9422664 commit db6c623

File tree

2 files changed

+67
-38
lines changed

2 files changed

+67
-38
lines changed

src/pages/Login/Login.module.scss

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,35 @@
55
height: 100%;
66
font-size: 72px;
77
overflow: hidden;
8-
background-color: #ffffff;
9-
// background-image: url('/images/background.svg');
8+
background-color: #f8f8f8;
9+
}
10+
11+
.container {
12+
width: 380px;
13+
padding: 40px;
14+
border-radius: 2px;
15+
box-sizing: border-box;
16+
background-color: #fff;
17+
overflow: hidden;
18+
perspective: 2000px;
19+
box-shadow: 0 1px 5px rgba(0, 0, 0, .08);
20+
}
21+
22+
.loginForm {
23+
padding-top: 40px;
24+
text-align: left;
25+
26+
:global(.ant-input) {
27+
border-radius: 20px;
28+
}
29+
30+
:global(.ant-input:focus) {
31+
box-shadow: none;
32+
}
33+
34+
:global(.ant-btn) {
35+
font-size: 16px;
36+
}
1037
}
1138

1239
.Header__svg {
@@ -70,7 +97,7 @@
7097
// some lovely sass fun to stagger the animation
7198

7299
@for $i from 1 to 12 {
73-
.Header__shape:nth-child(#{$i}) {
100+
.Header__shape:nth-child(#{$i}) {
74101
animation-delay: $i * 0.16s;
75102
}
76103
}

src/pages/Login/Login.tsx

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class Login extends PureComponent<InternalProps> {
3939

4040
return (
4141
<div className={styles.login}>
42-
<svg className="Header__svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1337.97 684.43">
42+
{/* <svg className="Header__svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1337.97 684.43">
4343
<path
4444
className="Header__shape bigSquare" fill="#16d5d1"
4545
d="M546.519 349.271l86.383-56.098 56.097 86.383-86.383 56.098z"
@@ -65,40 +65,42 @@ export class Login extends PureComponent<InternalProps> {
6565
className="Header__shape littleCircle"
6666
fill="#0f1c70" cx="1036.52" cy="203.17" r="27"
6767
/>
68-
</svg>
69-
<Form style={{ width: 320 }} onSubmit={this.onSubmit}>
70-
<Form.Item>
71-
{getFieldDecorator('email', {
72-
rules: [
73-
{ required: true, message: 'Please input email!' },
74-
{ pattern: EmailRxp, message: 'Please input right email!' },
75-
],
76-
})(
77-
<Input
78-
prefix={<Icon type="inbox" style={{ color }} />}
79-
placeholder="Email"
80-
/>
81-
)}
82-
</Form.Item>
83-
<Form.Item>
84-
{getFieldDecorator('password', {
85-
rules: [
86-
{ required: true, message: 'Please input password!' },
87-
],
88-
})(
89-
<Input
90-
type="password"
91-
prefix={<Icon type="key" style={{ color }} />}
92-
placeholder="Password"
93-
/>
94-
)}
95-
</Form.Item>
96-
<Form.Item>
97-
<Button block type="primary" htmlType="submit" loading={loading}>
98-
登录
99-
</Button>
100-
</Form.Item>
101-
</Form>
68+
</svg> */}
69+
<div className={styles.container}>
70+
<Form onSubmit={this.onSubmit}>
71+
<Form.Item>
72+
{getFieldDecorator('email', {
73+
rules: [
74+
{ required: true, message: 'Please input email!' },
75+
{ pattern: EmailRxp, message: 'Please input right email!' },
76+
],
77+
})(
78+
<Input
79+
prefix={<Icon type="inbox" style={{ color }} />}
80+
placeholder="Email"
81+
/>
82+
)}
83+
</Form.Item>
84+
<Form.Item>
85+
{getFieldDecorator('password', {
86+
rules: [
87+
{ required: true, message: 'Please input password!' },
88+
],
89+
})(
90+
<Input
91+
type="password"
92+
prefix={<Icon type="key" style={{ color }} />}
93+
placeholder="Password"
94+
/>
95+
)}
96+
</Form.Item>
97+
<Form.Item>
98+
<Button block type="primary" htmlType="submit" loading={loading}>
99+
登录
100+
</Button>
101+
</Form.Item>
102+
</Form>
103+
</div>
102104
</div>
103105
);
104106
}

0 commit comments

Comments
 (0)