Skip to content

Commit 4768f23

Browse files
committed
appbar responsive styles completed
1 parent d10ae45 commit 4768f23

2 files changed

Lines changed: 29 additions & 3 deletions

File tree

‎front/src/common-app/components/appbar/appbar.component.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export const AppbarComponent: React.FC<Props> = ({ showLinks }) => {
1515
link,
1616
logo,
1717
} = classes;
18-
console.log(showLinks);
18+
1919
return (
2020
<div className={appbarContainer}>
21-
<CodePasterLogo className={logo} />
21+
<CodePasterLogo className={logo(showLinks)} />
2222
{showLinks && (
2323
<nav className={navContainer}>
2424
<ul className={navList}>

‎front/src/common-app/components/appbar/appbar.styles.ts‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,44 @@ export const appbarContainer = css`
1414
white 90%
1515
);
1616
border-bottom: 2px solid ${palette.text.primary};
17+
18+
@media (max-width: 578px) {
19+
height: auto;
20+
min-height: ${spacing(86)};
21+
flex-direction: column;
22+
justify-content: center;
23+
align-items: center;
24+
background-image: linear-gradient(60deg, white, white);
25+
}
1726
`;
1827

19-
export const logo = css`
28+
export const logo = (showLinks: boolean): string => css`
2029
margin-top: ${spacing(5)};
2130
height: ${spacing(60)};
2231
fill: ${palette.text.primary};
2332
margin-left: 2.4rem;
33+
34+
@media (max-width: 578px) {
35+
margin-left: 0;
36+
margin-top: ${showLinks ? '1.5rem' : '0'};
37+
}
2438
`;
2539

2640
export const navContainer = css`
2741
margin-left: auto;
42+
43+
@media (max-width: 578px) {
44+
margin-left: 0;
45+
}
2846
`;
2947

3048
export const navList = css`
3149
display: flex;
3250
list-style: none;
51+
52+
@media (max-width: 578px) {
53+
padding: 0;
54+
}
3355
`;
3456

3557
export const listItem = css`
@@ -38,6 +60,10 @@ export const listItem = css`
3860
3961
&:last-of-type {
4062
margin-right: 2.4rem;
63+
64+
@media (max-width: 578px) {
65+
margin-right: 0;
66+
}
4167
}
4268
`;
4369

0 commit comments

Comments
 (0)