Skip to content

Commit a95f953

Browse files
feat(adaptive): adaptive for login
1 parent 4d984e3 commit a95f953

File tree

5 files changed

+94
-2
lines changed

5 files changed

+94
-2
lines changed

src/components/entry/entry.module.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@
103103
}
104104
}
105105

106+
&_signIn {
107+
composes: formWrapper_signUp;
108+
109+
@media screen and (max-width: $media-tablet-large) {
110+
padding-top: 72px;
111+
}
112+
113+
@media screen and (max-width: calc($media-mobile-large - 1px)) {
114+
padding: 40px 20px 0;
115+
}
116+
}
117+
106118
&_notSignUp {
107119
@media screen and (max-width: $media-tablet-large) {
108120
padding-top: 72px;

src/components/entry/entry.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ const Entry: FC<IEntryProps> = ({
8080
<div
8181
className={classNames(styles.formWrapper, {
8282
[styles.formWrapper_signUp]: heading === 'Регистрация',
83-
[styles.formWrapper_notSignUp]: heading !== 'Регистрация',
83+
[styles.formWrapper_signIn]: heading === 'Вход в аккаунт',
84+
[styles.formWrapper_notSignUp]:
85+
heading !== 'Регистрация' && heading !== 'Вход в аккаунт',
8486
})}
8587
>
8688
<h2

src/pages/sign-in/sign-in.module.scss

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,69 @@
11
@import 'assets/styles/abstracts/variables/colors';
22
@import 'assets/styles/abstracts/variables/fonts';
3+
@import 'assets/styles/abstracts/variables/media-queries';
4+
@import 'assets/styles/abstracts/functions';
35

46
.inputs {
57
display: flex;
68
flex-direction: column;
79
row-gap: 12px;
10+
11+
div > label {
12+
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
13+
display: block;
14+
}
15+
}
16+
17+
@media screen and (max-width: $media-tablet-large) {
18+
row-gap: 24px;
19+
}
820
}
921

1022
.password {
1123
position: relative;
1224

25+
@media screen and (max-width: $media-tablet-large) {
26+
padding-bottom: 18px;
27+
}
28+
1329
span:first-child {
1430
position: absolute;
1531
top: 0;
1632
right: 0;
33+
34+
@media screen and (max-width: calc($media-desktop-large - 1px)) {
35+
font-size: calc-fluid-element(
36+
calc($font-size-text-medium-small * 10),
37+
calc($font-size-text-medium * 10),
38+
$media-desktop-small,
39+
$media-desktop-large
40+
);
41+
}
42+
43+
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
44+
line-height: $font-line-height-text-medium-small;
45+
top: -4px;
46+
}
47+
48+
@media screen and (max-width: calc($media-desktop-small - 1px)) {
49+
font-size: $font-size-text-medium-small;
50+
}
51+
52+
@media screen and (max-width: $media-tablet-large) {
53+
position: static;
54+
}
55+
}
56+
57+
> div > span {
58+
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
59+
min-height: 12px;
60+
}
61+
}
62+
63+
> div {
64+
@media screen and (max-width: $media-tablet-large) {
65+
padding-bottom: 20px;
66+
}
1767
}
1868
}
1969

@@ -23,4 +73,31 @@
2373
font-weight: 700;
2474
color: $color-neutral-700;
2575
letter-spacing: $font-letter-spacing-main;
76+
77+
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
78+
margin-top: 20px;
79+
font-size: calc-fluid-element(
80+
calc($font-size-text-medium-small * 10),
81+
calc($font-size-text-medium * 10),
82+
$media-tablet-small,
83+
$media-desktop-medium
84+
);
85+
}
86+
87+
@media screen and (max-width: $media-tablet-large) {
88+
line-height: $font-line-height-text-medium-small;
89+
min-width: 335px;
90+
margin-top: 46px;
91+
padding-top: 40px;
92+
border-top: 1px solid rgba(189, 189, 189, 0.36);
93+
text-align: center;
94+
}
95+
96+
@media screen and (max-width: calc($media-tablet-small - 1px)) {
97+
font-size: $font-size-text-medium-small;
98+
}
99+
100+
@media screen and (max-width: calc($media-mobile-small - 1px)) {
101+
min-width: auto;
102+
}
26103
}

src/pages/sign-up/sign-up.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import styles from './sign-up.module.scss';
2828

2929
const SignUpPage: FC = (): ReactElement => {
3030
const [hasAgreement, setHasAgreement] = useState(true);
31-
const [isSuccess, setIsSuccess] = useState(true);
31+
const [isSuccess, setIsSuccess] = useState(false);
3232

3333
const navigate = useNavigate();
3434
const dispatch = useAppDispatch();

src/shared/input/input.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
&--label {
2424
@extend %text-size-medium;
2525
color: $color-neutral-700;
26+
// display: block;
2627

2728
@media screen and (max-width: calc($media-desktop-large - 1px)) {
2829
font-size: calc-fluid-element(

0 commit comments

Comments
 (0)