Skip to content

Commit

Permalink
Merge pull request #154 from ChtiJS/fix/layout
Browse files Browse the repository at this point in the history
fix(layout): fixing css errors and adding height for social
  • Loading branch information
nfroidure authored Dec 12, 2023
2 parents ec3b36b + 1236d71 commit 52ef9b9
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 41 deletions.
34 changes: 34 additions & 0 deletions src/components/footer.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@import "../layouts/variables.scss";

.footer {
display: block;
width: 100%;
background-color: var(--dark);
}
.p {
color: var(--light);
margin: 0 auto;
text-align: center;
line-height: var(--vRythm);
}
.a,
.a:visited,
.a:hover {
color: var(--light);
}
@media screen and (max-width: $CSS_BREAKPOINT_END_S) {
.footer {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 4;
grid-row-end: 5;
}
}
@media screen and (min-width: $CSS_BREAKPOINT_START_M) {
.footer {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 4;
grid-row-end: 5;
}
}
43 changes: 4 additions & 39 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,57 +1,22 @@
import Link from 'next/link';
import Social from './social';
import {
CSS_BREAKPOINT_END_S,
CSS_BREAKPOINT_START_M,
ORGANISATION_NAME,
} from '../utils/constants';
import styles from './footer.module.scss';

const Footer = () => {
return (
<>
<footer>
<p>
<footer className={styles.footer}>
<p className={styles.p}>
© {ORGANISATION_NAME} - Tous droits réservés -{' '}
<Link href="/mentions-legales" legacyBehavior>
<a>Mentions légales</a>
<a className={styles.a}>Mentions légales</a>
</Link>
<Social></Social>
</p>
</footer>
<style jsx>{`
footer {
display: block;
width: 100%;
background-color: var(--dark);
}
p {
color: var(--light);
margin: 0 auto;
text-align: center;
line-height: calc(var(--vRythm) * 2);
}
a,
a:visited,
a:hover {
color: var(--light);
}
@media screen and (max-width: ${CSS_BREAKPOINT_END_S}) {
footer {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 4;
grid-row-end: 5;
}
}
@media screen and (min-width: ${CSS_BREAKPOINT_START_M}) {
footer {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 4;
grid-row-end: 5;
}
}
`}</style>
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/main.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
display: grid;
grid-template-columns: var(--block) 1fr;
grid-template-rows:
calc(var(--vRythm) * 8) auto
calc(var(--vRythm) * 6) auto
auto minmax(calc(var(--vRythm) * 2), auto);
background: var(--tertiary);
}
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Layout = ({ children, title, description = '', image = '' }: Props) => {
/>
<Menu />
<Header />
<div className={styles.content}>{children}</div>
<div className={styles.contents}>{children}</div>
<Footer />
</div>
);
Expand Down

0 comments on commit 52ef9b9

Please sign in to comment.