Skip to content

Commit 5877000

Browse files
committed
remove links header and footer
1 parent 7fcd9bd commit 5877000

6 files changed

Lines changed: 11 additions & 134 deletions

File tree

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

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,12 @@ import React from 'react';
22
import { ReactComponent as CodePasterLogo } from 'assets/logo.svg';
33
import * as classes from './appbar.styles';
44

5-
interface Props {
6-
showLinks: boolean;
7-
}
8-
9-
export const AppbarComponent: React.FC<Props> = ({ showLinks }) => {
10-
const {
11-
appbarContainer,
12-
navContainer,
13-
navList,
14-
listItem,
15-
link,
16-
logo,
17-
} = classes;
5+
export const AppbarComponent: React.FC = () => {
6+
const { appbarContainer, logo } = classes;
187

198
return (
209
<div className={appbarContainer}>
21-
<CodePasterLogo className={logo(showLinks)} />
22-
{showLinks && (
23-
<nav className={navContainer}>
24-
<ul className={navList}>
25-
<li className={listItem}>
26-
<a className={link} href="#">
27-
About
28-
</a>
29-
</li>
30-
<li className={listItem}>
31-
<a className={link} href="#">
32-
Credits
33-
</a>
34-
</li>
35-
<li className={listItem}>
36-
<a className={link} href="#">
37-
License
38-
</a>
39-
</li>
40-
</ul>
41-
</nav>
42-
)}
10+
<CodePasterLogo className={logo} />
4311
</div>
4412
);
4513
};

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

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,57 +30,13 @@ export const appbarContainer = css`
3030
}
3131
`;
3232

33-
export const logo = (showLinks: boolean): string => css`
33+
export const logo = css`
3434
height: ${spacing(7.5)};
3535
margin-top: ${spacing(0.625)};
3636
margin-left: ${spacing(4.8)};
3737
fill: ${color.secondary};
3838
@media (max-width: ${breakpoints.values.sm}px) {
39-
margin-top: ${showLinks ? spacing(3) : 0};
39+
margin-top: spacing(3);
4040
margin-left: 0;
4141
}
4242
`;
43-
44-
export const navContainer = css`
45-
margin-left: auto;
46-
@media (max-width: ${breakpoints.values.sm}px) {
47-
margin-left: 0;
48-
}
49-
`;
50-
51-
export const navList = css`
52-
display: flex;
53-
list-style: none;
54-
@media (max-width: ${breakpoints.values.sm}px) {
55-
padding: 0;
56-
}
57-
`;
58-
59-
export const listItem = css`
60-
margin-right: ${spacing(3)};
61-
overflow: hidden;
62-
&:last-of-type {
63-
margin-right: ${spacing(4.8)};
64-
@media (max-width: ${breakpoints.values.sm}px) {
65-
margin-right: 0;
66-
}
67-
}
68-
`;
69-
70-
export const link = css`
71-
position: relative;
72-
display: inline-block;
73-
margin-top: ${spacing(0.4)};
74-
padding-bottom: ${spacing(0.4)};
75-
font-size: 1.1rem;
76-
text-decoration: none;
77-
color: ${color.secondary};
78-
border-bottom: 2px solid transparent;
79-
transition: all 0.3s ease;
80-
-webkit-transition: all 0.3s ease;
81-
&:hover {
82-
padding-bottom: ${spacing(0.375)};
83-
border-bottom: 2px solid ${color.alertLight};
84-
color: ${color.alertLight};
85-
}
86-
`;

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

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@ import TwitterIcon from '@material-ui/icons/Twitter';
66
import EmailRoundedIcon from '@material-ui/icons/EmailRounded';
77
import LanguageIcon from '@material-ui/icons/Language';
88

9-
interface Props {
10-
showLinks: boolean;
11-
}
12-
13-
export const FooterComponent: React.FC<Props> = ({ showLinks }) => {
9+
export const FooterComponent: React.FC = () => {
1410
const {
1511
footerContainer,
16-
topContainer,
1712
topContainerCenter,
18-
linkList,
19-
link,
2013
lemoncodeIcon,
2114
bottomContainer,
2215
iconContainer,
@@ -27,28 +20,7 @@ export const FooterComponent: React.FC<Props> = ({ showLinks }) => {
2720
} = classes;
2821
return (
2922
<footer className={footerContainer}>
30-
<div className={showLinks ? topContainer : topContainerCenter}>
31-
{showLinks && (
32-
<nav>
33-
<ul className={linkList}>
34-
<li>
35-
<a className={link} href="#">
36-
About
37-
</a>
38-
</li>
39-
<li>
40-
<a className={link} href="#">
41-
Credits
42-
</a>
43-
</li>
44-
<li>
45-
<a className={link} href="#">
46-
License
47-
</a>
48-
</li>
49-
</ul>
50-
</nav>
51-
)}
23+
<div className={topContainerCenter}>
5224
<LemoncodeLogo className={lemoncodeIcon} />
5325
</div>
5426
<div className={bottomContainer}>

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,6 @@ export const topContainerCenter = css`
4141
padding: 0 ${spacing(2)};
4242
`;
4343

44-
export const linkList = css`
45-
margin: 0;
46-
padding: 0;
47-
list-style: none;
48-
@media (max-width: ${breakpoints.values.xs}px) {
49-
margin-top: ${spacing(2.4)};
50-
text-align: center;
51-
}
52-
`;
53-
54-
export const link = css`
55-
font-size: 1.1rem;
56-
text-decoration: none;
57-
color: ${color.greyLight};
58-
&:hover {
59-
color: ${color.primary};
60-
}
61-
`;
62-
6344
export const bottomContainer = css`
6445
display: flex;
6546
justify-content: space-between;

‎front/src/layout/app-layout.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { AppbarComponent, FooterComponent } from 'common-app';
44
export const AppLayout: React.FC = props => {
55
return (
66
<>
7-
<AppbarComponent showLinks={true} />
7+
<AppbarComponent />
88
{props.children}
9-
<FooterComponent showLinks={true} />
9+
<FooterComponent />
1010
</>
1111
);
1212
};

‎front/src/layout/session-layout.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { AppbarComponent, FooterComponent } from 'common-app';
44
export const SessionLayout: React.FC = props => {
55
return (
66
<>
7-
<AppbarComponent showLinks={false} />
7+
<AppbarComponent />
88
{props.children}
9-
<FooterComponent showLinks={false} />
9+
<FooterComponent />
1010
</>
1111
);
1212
};

0 commit comments

Comments
 (0)