Skip to content

Commit 84c4945

Browse files
committed
Adds banner and media queries
1 parent 9a61148 commit 84c4945

File tree

7 files changed

+68
-9
lines changed

7 files changed

+68
-9
lines changed

src/Layout/styles.ts

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,27 @@ import styled from 'styled-components';
99

1010
export const Grid = styled.div`
1111
display: grid;
12-
grid-template-columns: 71px 240px auto 240px;
13-
grid-template-rows: 46px auto 52px;
14-
grid-template-areas:
15-
'SL SN CI CI'
16-
'SL CL CD UL'
17-
'SL UI CD UL';
1812
height: 100vh;
13+
14+
grid-template-columns: 65px auto;
15+
grid-template-rows: 46px auto;
16+
grid-template-areas:
17+
'SL CI'
18+
'SL CD';
19+
20+
@media (min-width: 598px) {
21+
grid-template-columns: 71px 240px auto 240px;
22+
grid-template-rows: 46px auto 52px;
23+
grid-template-areas:
24+
'SL SN CI CI'
25+
'SL CL CD CD'
26+
'SL UI CD CD';
27+
}
28+
29+
@media (min-width: 868px) {
30+
grid-template-areas:
31+
'SL SN CI CI'
32+
'SL CL CD UL'
33+
'SL UI CD UL';
34+
}
1935
`;

src/assets/img/banner.png

588 KB
Loading

src/components/ChannelList/styles.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export const Container = styled.div`
77
flex-direction: column;
88
padding: 24px 9.5px 0 16px;
99
background-color: var(--secondary);
10+
11+
@media (max-width: 598px) {
12+
display: none;
13+
}
1014
`;
1115

1216
export const Category = styled.div`

src/components/ServerButton/styles.ts

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ export const Container = styled.div<Props>`
66
width: 48px;
77
height: 48px;
88
position: relative;
9-
margin-bottom: 15px;
9+
margin-bottom: 10px;
10+
11+
@media (max-width: 598px) {
12+
width: 35px;
13+
height: 35px;
14+
}
1015
`;
1116

1217
export const Button = styled.button<Props>`
@@ -18,7 +23,7 @@ export const Button = styled.button<Props>`
1823
height: 48px;
1924
border-radius: 50%;
2025
margin-bottom: 15px;
21-
background-color: ${(props) => (props.color ? props.color : 'var(--primary)')};
26+
background-color: ${(props) => (props.color ? props.color : 'var(--primary)')};
2227
/* ${(props) => (props.isHome ? 'var(--rocketseat)' : 'var(--primary)')}; */
2328
position: relative;
2429
cursor: pointer;
@@ -52,7 +57,7 @@ export const Button = styled.button<Props>`
5257
font-weight: bold;
5358
color: var(--white);
5459
content: '${(props) => props.mentions && props.mentions}';
55-
display: ${(props) => (props.mentions && props.mentions > 0 ? 'inline' : 'none')}
60+
display: ${(props) => (props.mentions && props.mentions > 0 ? 'inline' : 'none')};
5661
}
5762
transition: border-radius 0.2s, background-color 0.2s;
5863
&.active,
@@ -64,6 +69,25 @@ export const Button = styled.button<Props>`
6469
visibility: visible;
6570
opacity: 1;
6671
}
72+
73+
@media (max-width: 598px) {
74+
width: 30px;
75+
height: 30px;
76+
margin-bottom: 10px;
77+
&::before {
78+
width: 5px;
79+
height: 5px;
80+
left: -13px;
81+
}
82+
> img {
83+
width: 25px;
84+
height: 25px;
85+
}
86+
&::after {
87+
height: 10px;
88+
font-size: 7px;
89+
}
90+
}
6791
`;
6892

6993
export const Tooltip = styled.div<Props>`
@@ -108,4 +132,8 @@ export const Tooltip = styled.div<Props>`
108132
visibility: visible;
109133
opacity: 1;
110134
}
135+
136+
@media (max-width: 598px) {
137+
width: 15px;
138+
}
111139
`;

src/components/ServerName/styles.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export const Container = styled.div`
99
background-color: var(--secondary);
1010
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px 0px;
1111
z-index: 2;
12+
13+
@media (max-width: 598px) {
14+
display: none;
15+
}
1216
`;
1317

1418
export const Title = styled.h1`

src/components/UserInfo/styles.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ export const Container = styled.div`
1010
padding: 10px;
1111
background-color: var(--quaternary);
1212
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px 0px;
13+
14+
@media (max-width: 598px) {
15+
display: none;
16+
}
1317
`;
1418

1519
export const Profile = styled.div`

src/components/UserList/styles.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export const Container = styled.div`
1818
::-webkit-scrollbar-track {
1919
background-color: var(--secondary);
2020
}
21+
@media (max-width: 868px) {
22+
display: none;
23+
}
2124
`;
2225

2326
export const Role = styled.span`

0 commit comments

Comments
 (0)