Skip to content

Commit ca846df

Browse files
footer complete
1 parent 74d3efc commit ca846df

File tree

3 files changed

+98
-101
lines changed

3 files changed

+98
-101
lines changed
Lines changed: 31 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,40 @@
11
import React from "react";
22
import "./style.scss";
33

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",
4+
type link = {
5+
href: string;
6+
text: string;
7+
};
738

74-
text: "click me",
75-
},
76-
{
77-
href: "http://www.google.com",
78-
text: "click me",
79-
},
80-
],
81-
},
82-
];
9+
type category = {
10+
title: string;
11+
links: link[];
12+
};
8313

84-
interface Props {}
14+
interface Props {
15+
data: category[];
16+
}
8517

86-
export const Footer: React.FC<Props> = ({}) => {
18+
export const Footer: React.FC<Props> = ({ data }) => {
8719
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>
20+
<>
21+
<footer className="footer-grid ">
22+
{data.map((category, i) => {
23+
return (
24+
<div className="footer-grid-item" key={i}>
25+
<h2>{category.title}</h2>
26+
{category.links.map((link, i) => {
27+
return (
28+
<a className="footer-grid-link" href={link.href} key={i}>
29+
{link.text}
30+
</a>
31+
);
32+
})}
33+
</div>
34+
);
35+
})}
36+
</footer>
37+
<div className="copyright">Dzcode.io Algerian Open Source Community</div>
38+
</>
10439
);
10540
};

frontend/src/apps/main/components/footer/style.scss

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,29 @@
1010
background-color: #202325;
1111

1212
h2 {
13-
color: #fff;
13+
color: rgba($color: #fff, $alpha: 0.9);
1414
}
1515
&-item {
1616
display: flex;
1717
flex-direction: column;
18+
justify-content: flex-start;
1819
align-items: center;
20+
height: 60%;
1921
}
2022
&-link {
21-
font-size: 1.1rem;
23+
font-size: 1.2rem;
2224
text-decoration: none;
2325
padding: 15px;
24-
color: #fff;
26+
color: rgba($color: #fff, $alpha: 0.8);
2527
}
2628
}
29+
.copyright {
30+
background-color: #202325;
31+
color: #fff;
32+
font-size: 1.3rem;
33+
font-weight: bold;
34+
display: flex;
35+
align-items: center;
36+
justify-content: center;
37+
padding-bottom: 5rem;
38+
}

frontend/src/apps/main/entry/index.tsx

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const Landing = lazy(() => import("t9/apps/main/scenes/landing"));
1212
const Articles = lazy(() => import("t9/apps/main/scenes/articles"));
1313
const Learn = lazy(() => import("t9/apps/main/scenes/learn"));
1414

15-
// Temp data: Todo: replace with props from the store
15+
// Temp data:
16+
17+
// TODO: replace with props from the store
1618

1719
const navItems = [
1820
{ id: 1, to: "/Learn/Getting_Started", name: "Learn" },
@@ -21,6 +23,54 @@ const navItems = [
2123
{ id: 4, to: "/articles", name: "Articles" },
2224
];
2325

26+
// Temp Footer Data
27+
const data = [
28+
{
29+
title: "Recent Articles",
30+
links: [
31+
{
32+
href: "https://staging.dzcode.io/Articles/Welcome_to_dzCode",
33+
text: "Welcome To dzCode.io",
34+
},
35+
{
36+
href: "https://staging.dzcode.io/Learn/Getting_Started",
37+
text: "Getting Started dzCode.io",
38+
},
39+
],
40+
},
41+
{
42+
title: "Recent Projects",
43+
links: [
44+
{
45+
href: "https://staging.dzcode.io/",
46+
text: "Algerian Education Hierarchy",
47+
},
48+
{
49+
href: "https://staging.dzcode.io/",
50+
text: "Algerian Users",
51+
},
52+
{
53+
href: "https://staging.dzcode.io/",
54+
text: "Algerian Wilaya",
55+
},
56+
],
57+
},
58+
{
59+
title: "Social Media",
60+
links: [
61+
{
62+
href: "www.facebook.com/dzcode.io",
63+
text: "Facebook",
64+
},
65+
{
66+
href:
67+
"https://www.youtube.com/channel/UCqWze7IcHI-_2mvByYeGTJg?view_as=subscriber",
68+
text: "Youtube",
69+
},
70+
],
71+
},
72+
];
73+
2474
export const App: React.SFC<{}> = () => {
2575
return (
2676
<BrowserRouter>
@@ -33,7 +83,7 @@ export const App: React.SFC<{}> = () => {
3383
<Route render={() => <Redirect to="/" />} />
3484
</Switch>
3585
</Suspense>
36-
<Footer />
86+
<Footer data={data} />
3787
</BrowserRouter>
3888
);
3989
};

0 commit comments

Comments
 (0)