Skip to content

Commit 7d4e318

Browse files
authored
Merge pull request #56 from Souhaib-Benbouzid/master
add footer / fix overflow
2 parents 169b1f9 + 74d3efc commit 7d4e318

File tree

3 files changed

+129
-5
lines changed

3 files changed

+129
-5
lines changed
Lines changed: 103 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,105 @@
11
import React from "react";
2-
import "./style";
2+
import "./style.scss";
33

4-
export const Footer = () => <div className="footer">Footer</div>;
4+
// Temp Data
5+
const Data = [
6+
{
7+
title: "Category",
8+
links: [
9+
{
10+
href: "http://www.google.com",
11+
12+
text: "click me",
13+
},
14+
{
15+
href: "http://www.google.com",
16+
17+
text: "click me",
18+
},
19+
{
20+
href: "http://www.google.com",
21+
22+
text: "click me",
23+
},
24+
{
25+
href: "http://www.google.com",
26+
27+
text: "click me",
28+
},
29+
],
30+
},
31+
{
32+
title: "Category",
33+
34+
links: [
35+
{
36+
href: "http://www.google.com",
37+
38+
text: "click me",
39+
},
40+
{
41+
href: "http://www.google.com",
42+
43+
text: "click me",
44+
},
45+
{
46+
href: "http://www.google.com",
47+
48+
text: "click me",
49+
},
50+
{
51+
href: "http://www.google.com",
52+
53+
text: "click me",
54+
},
55+
],
56+
},
57+
{
58+
title: "Category",
59+
60+
links: [
61+
{
62+
href: "http://www.google.com",
63+
64+
text: "click me",
65+
},
66+
{
67+
href: "http://www.google.com",
68+
69+
text: "click me",
70+
},
71+
{
72+
href: "http://www.google.com",
73+
74+
text: "click me",
75+
},
76+
{
77+
href: "http://www.google.com",
78+
text: "click me",
79+
},
80+
],
81+
},
82+
];
83+
84+
interface Props {}
85+
86+
export const Footer: React.FC<Props> = ({}) => {
87+
return (
88+
<footer className="footer-grid ">
89+
{Data.map((gridElemnt, i) => {
90+
return (
91+
<div className="footer-grid-item" key={i}>
92+
<h2>{gridElemnt.title}</h2>
93+
{gridElemnt.links.map((link, i) => {
94+
return (
95+
<a className="footer-grid-link" href={link.href} key={i}>
96+
{link.text}
97+
</a>
98+
);
99+
})}
100+
</div>
101+
);
102+
})}
103+
</footer>
104+
);
105+
};
Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
.footer {
2-
height: 400px;
3-
background-color: darken($color: #fff, $amount: 30);
1+
.footer-grid {
2+
width: 100%;
3+
min-height: 400px;
4+
display: grid;
5+
gap: 15px;
6+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
7+
justify-content: center;
8+
align-items: center;
9+
10+
background-color: #202325;
11+
12+
h2 {
13+
color: #fff;
14+
}
15+
&-item {
16+
display: flex;
17+
flex-direction: column;
18+
align-items: center;
19+
}
20+
&-link {
21+
font-size: 1.1rem;
22+
text-decoration: none;
23+
padding: 15px;
24+
color: #fff;
25+
}
426
}

frontend/src/common/style/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
body {
44
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
55
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
6+
overflow-x: hidden;
67
}

0 commit comments

Comments
 (0)