Skip to content

Commit f14b65a

Browse files
committed
chore: mobile layout adjustments
1 parent 7168630 commit f14b65a

File tree

9 files changed

+100
-53
lines changed

9 files changed

+100
-53
lines changed

app/src/theme/variants/_svpervnder.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* stylelint-disable CssSyntaxError */
2-
body[data-theme="lease-721"] {
2+
body[data-theme="svpervnder"] {
33
// Status colors
44
--color-status-info: #5356fc;
55
--color-status-info-light: rgba(83, 86, 252, 0.7);

app/src/ui/modal/Modal.module.scss

+27-8
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@
7272
}
7373

7474
&--fullscreen {
75-
@include fullscreen();
76-
77-
&-on-mobile {
78-
@media (max-width: $mq-medium) {
79-
@include fullscreen();
80-
}
75+
@include atLargeTablet {
76+
width: 75vw;
8177
}
78+
position: absolute;
79+
align-self: center;
80+
width: 95vw;
81+
max-height: 95%;
82+
overflow-y: auto;
8283
}
8384

8485
&--pullup {
@@ -94,13 +95,29 @@
9495

9596
&__header {
9697
@include font-properties($typography-headline-2);
98+
@include atLargeTablet {
99+
padding: $space-ml;
100+
}
101+
display: flex;
102+
justify-content: space-between;
97103
border-bottom: 1px solid var(--color-background);
98104
border-top-left-radius: $border-radius-modal;
99105
border-top-right-radius: $border-radius-modal;
100-
padding: $space-ml;
106+
padding: $space-default;
101107
color: var(--color-typography-text);
102108
background-color: var(--color-background);
103109

110+
&--left,
111+
&--right {
112+
display: block;
113+
114+
&-item {
115+
display: flex;
116+
flex-direction: column;
117+
justify-content: center;
118+
}
119+
}
120+
104121
&--on-close {
105122
display: flex;
106123
justify-content: flex-end;
@@ -113,8 +130,10 @@
113130

114131
&__content {
115132
@include font-properties($typography-text);
133+
@include atLargeTablet {
134+
padding: $space-ml;
135+
}
116136
max-height: 65vh;
117-
padding: $space-ml;
118137
overflow-y: auto;
119138
background-color: var(--color-background-contrast);
120139

app/src/ui/modal/Modal.module.scss.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ export type Styles = {
66
modal__content: string;
77
modal__flat: string;
88
modal__header: string;
9+
"modal__header--left": string;
10+
"modal__header--left-item": string;
911
"modal__header--on-close": string;
1012
"modal__header--on-close-icon": string;
13+
"modal__header--right": string;
14+
"modal__header--right-item": string;
1115
modal__overlay: string;
1216
modal__wrapper: string;
1317
"modal__wrapper--fullscreen": string;
14-
"modal__wrapper--fullscreen-on-mobile": string;
1518
"modal__wrapper--large": string;
1619
"modal__wrapper--medium": string;
1720
"modal__wrapper--pullup": string;

app/src/ui/modal/Modal.tsx

+7-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { createPortal } from "react-dom";
44
import { CSSTransition } from "react-transition-group";
55

66
import { Button } from "ui/button/Button";
7-
import { Grid } from "ui/grid/Grid";
87
import { Icon } from "ui/icon/Icon";
98
import { IconButton } from "../iconButton/IconButton";
109
import { CloseIcon } from "../icons/CloseIcon";
@@ -104,7 +103,6 @@ export const Modal = ({
104103
aria-modal="true"
105104
className={clsx(styles.modal__wrapper, className, {
106105
[styles["modal__wrapper--fullscreen"]]: fullscreenVariant === "default",
107-
[styles["modal__wrapper--fullscreen-on-mobile"]]: fullscreenVariant === "mobile-only",
108106
[styles["modal__wrapper--small"]]: size === "s",
109107
[styles["modal__wrapper--medium"]]: size === "m",
110108
[styles["modal__wrapper--large"]]: size === "l",
@@ -126,11 +124,11 @@ Modal.Header = ({ children, className, onClose, ...props }: ModalHeaderProps) =>
126124
if (onClose) {
127125
return (
128126
<div className={clsx(styles.modal__header, className)} {...props}>
129-
<Grid.Row justify="between" align="center">
130-
<Grid.Col lg={8} xs={8}>
131-
{children}
132-
</Grid.Col>
133-
<Grid.Col lg={4} xs={4}>
127+
<div className={styles["modal__header--left"]}>
128+
<div className={styles["modal__header--left-item"]}>{children}</div>
129+
</div>
130+
<div className={styles["modal__header--right"]}>
131+
<div className={styles["modal__header--right-item"]}>
134132
<div className={styles["modal__header--on-close"]}>
135133
<Button
136134
size="xs"
@@ -142,8 +140,8 @@ Modal.Header = ({ children, className, onClose, ...props }: ModalHeaderProps) =>
142140
<Icon name="icon-cross" />
143141
</Button>
144142
</div>
145-
</Grid.Col>
146-
</Grid.Row>
143+
</div>
144+
</div>
147145
</div>
148146
);
149147
}

app/src/ui/svpervnder/collections/larskristo_hellheads/LarsKristoHellheads.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export const LarsKristoHellheads: React.FC<LatestCollectionProps> = ({ className
3636
<div className={styles["latest-collection__intro"]}>
3737
<Typography.Headline5>Latest Collection</Typography.Headline5>
3838
<Typography.Headline4 className={styles["latest-collection__intro--artist-name"]}>
39-
larskristo: hellheads
39+
Lars Kristo: Hellheadz
4040
</Typography.Headline4>
41-
<Typography.Description>31/150 Sold</Typography.Description>
41+
<Typography.Description>31/222 Sold</Typography.Description>
4242
<Typography.Text>
4343
In 2022, Larskristo ventured deeper into the abyss, exploring the unsettling terrain of AI dark art.
44-
This foray birthed HellheadS—a chilling fusion of the ordinary and the grotesque. Here, everyday
44+
This foray birthed Hellheadz — a chilling fusion of the ordinary and the grotesque. Here, everyday
4545
objects metamorphosed into eerie spectacles, blurring the lines between reality and nightmare.
4646
</Typography.Text>
4747
<Grid.Row>

app/src/ui/svpervnder/collections/larskristo_hellheads/details-modal/DetailsModal.module.scss

+37-7
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,32 @@
66

77
&__header {
88
&--row {
9-
display: flex;
10-
11-
> div {
9+
@include atLargeTablet {
1210
display: flex;
13-
flex-direction: column;
14-
justify-content: center;
15-
margin-right: $space-default;
11+
12+
> div {
13+
display: flex;
14+
flex-direction: column;
15+
justify-content: center;
16+
margin-right: $space-default;
17+
}
1618
}
1719
}
20+
21+
&--token-id {
22+
@include atLargeTablet {
23+
margin-bottom: 0;
24+
}
25+
margin-bottom: $space-default;
26+
}
1827
}
1928

2029
&__img-container {
30+
@include atLargeTablet {
31+
padding-top: 0;
32+
}
2133
margin-bottom: $space-default;
34+
padding-top: $space-default;
2235

2336
img {
2437
width: 100%;
@@ -42,9 +55,22 @@
4255

4356
&__forge-card {
4457
&--row {
58+
@include atLargeTablet {
59+
margin-bottom: $space-s;
60+
}
4561
display: flex;
4662
justify-content: space-between;
47-
margin-bottom: $space-s;
63+
64+
&:not(:last-child) {
65+
margin-bottom: $space-ml;
66+
}
67+
68+
&-price {
69+
@include atLargeTablet {
70+
padding: 0;
71+
}
72+
padding: $space-default;
73+
}
4874

4975
&-price,
5076
&-button {
@@ -66,7 +92,11 @@
6692
}
6793

6894
&-details {
95+
@include atLargeTablet {
96+
justify-content: start;
97+
}
6998
display: flex;
99+
justify-content: space-between;
70100

71101
p {
72102
margin-right: $space-m;

app/src/ui/svpervnder/collections/larskristo_hellheads/details-modal/DetailsModal.module.scss.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type Styles = {
1010
"details-modal__forge-card--row-img": string;
1111
"details-modal__forge-card--row-price": string;
1212
"details-modal__header--row": string;
13+
"details-modal__header--token-id": string;
1314
"details-modal__img-container": string;
1415
"details-modal__price-block": string;
1516
"details-modal__price-block--buy-now": string;

app/src/ui/svpervnder/collections/larskristo_hellheads/details-modal/DetailsModal.tsx

+15-13
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const DetailsModal: React.FC<DetailsModalProps> = ({ onClose, className,
7777
<div>
7878
<Typography.Headline4 flat>{item.name} </Typography.Headline4>
7979
</div>
80-
<div>
80+
<div className={styles["details-modal__header--token-id"]}>
8181
<Button variant="outlined" color="secondary" size="xs">
8282
Token ID: {item.id!}
8383
</Button>
@@ -297,18 +297,20 @@ export const DetailsModal: React.FC<DetailsModalProps> = ({ onClose, className,
297297
This foray birthed HellheadS—a chilling fusion of the ordinary and the grotesque. Here, everyday
298298
objects metamorphosed into eerie spectacles, blurring the lines between reality and nightmare.
299299
</Typography.Text>
300-
<Grid.Row justify="end">
301-
<Grid.Col lg={1}>
302-
<Typography.Anchor>
303-
<Icon name="icon-instagram" />
304-
</Typography.Anchor>
305-
</Grid.Col>
306-
<Grid.Col lg={1}>
307-
<Typography.Anchor>
308-
<Icon name="icon-tiktok" />
309-
</Typography.Anchor>
310-
</Grid.Col>
311-
</Grid.Row>
300+
<Grid.Container>
301+
<Grid.Row justify="end">
302+
<Grid.Col lg={1} xs={1}>
303+
<Typography.Anchor>
304+
<Icon name="icon-instagram" />
305+
</Typography.Anchor>
306+
</Grid.Col>
307+
<Grid.Col lg={1} xs={1}>
308+
<Typography.Anchor>
309+
<Icon name="icon-tiktok" />
310+
</Typography.Anchor>
311+
</Grid.Col>
312+
</Grid.Row>
313+
</Grid.Container>
312314
</Card.Content>
313315
</Card>
314316
<Card className={styles["details-modal__details-card"]}>

app/src/ui/svpervnder/collections/larskristo_hellheads/grid-item/GridItem.tsx

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import clsx from "clsx";
2-
import { useState } from "react";
2+
import { useEffect, useState } from "react";
33

44
import { Grid } from "ui/grid/Grid";
55
import { Card } from "ui/card/Card";
@@ -17,7 +17,7 @@ export const GridItem: React.FC<GridItemProps> = ({ item, index, handleExpand, c
1717

1818
const ERC721 = useLarskristoHellheadsContext();
1919

20-
const handleMouseEnter = async () => {
20+
useEffect(() => {
2121
if (tokenPrice) {
2222
return;
2323
}
@@ -30,8 +30,8 @@ export const GridItem: React.FC<GridItemProps> = ({ item, index, handleExpand, c
3030
setTokenPrice(result);
3131

3232
setIsFetchingTokenPrice(false);
33-
}, 500);
34-
};
33+
}, 100 * (index + 1));
34+
}, [tokenPrice?.rawValue]);
3535

3636
const renderTokenPrice = () => {
3737
if (tokenPrice?.rawValue === BigInt(0)) {
@@ -50,13 +50,7 @@ export const GridItem: React.FC<GridItemProps> = ({ item, index, handleExpand, c
5050
};
5151

5252
return (
53-
<Grid.Col
54-
lg={3}
55-
xs={6}
56-
key={item.thumbnail}
57-
className={clsx(styles["grid-item"], className)}
58-
onMouseEnter={handleMouseEnter}
59-
>
53+
<Grid.Col lg={3} xs={12} key={item.thumbnail} className={clsx(styles["grid-item"], className)}>
6054
<Card className={styles["grid-item"]} withSpotlightEffect>
6155
<div className={styles["grid-item__img"]}>
6256
<img src={item.thumbnail} alt={item.name} />

0 commit comments

Comments
 (0)