Skip to content

Commit 5b9f605

Browse files
committed
fix: all styling has been redone and Redux module has been added along with Axios
App styling has been improved and new modules added for use with a future API
1 parent 74d72fe commit 5b9f605

File tree

18 files changed

+701
-676
lines changed

18 files changed

+701
-676
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
# misc
1515
.DS_Store
16+
.env
1617
.env.local
1718
.env.development.local
1819
.env.test.local

package-lock.json

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
"@testing-library/jest-dom": "^5.16.1",
1111
"@testing-library/react": "^12.1.2",
1212
"@testing-library/user-event": "^13.5.0",
13+
"axios": "^0.25.0",
1314
"react": "^17.0.2",
1415
"react-dom": "^17.0.2",
16+
"react-redux": "^7.2.6",
1517
"react-scripts": "5.0.0",
18+
"redux": "^4.1.2",
1619
"web-vitals": "^2.1.3"
1720
},
1821
"scripts": {

public/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
1212
<link rel="preconnect" href="https://fonts.googleapis.com">
1313
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
14-
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;700&display=swap" rel="stylesheet">
15-
14+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;400;500;700&display=swap" rel="stylesheet">
1615
<title>Discover</title>
1716
</head>
1817

src/App.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.App {
2-
width: 100%;
3-
height: 100%;
2+
min-width: 100%;
3+
min-height: 100%;
44
background: rgb(28, 18, 53);
55
background: linear-gradient(
66
57deg,
@@ -11,8 +11,8 @@
1111

1212
@media (min-width: 660px) and (max-width: 768px) {
1313
.App {
14-
width: 100%;
15-
height: 100%;
14+
min-width: 100%;
15+
min-height: 100%;
1616
background: rgb(28, 18, 53);
1717
background: linear-gradient(
1818
57deg,
@@ -25,8 +25,8 @@
2525

2626
@media (min-width: 768px) and (max-width: 1280px) {
2727
.App {
28-
width: 100%;
29-
height: 100%;
28+
min-width: 100%;
29+
min-height: 100%;
3030
background: rgb(28, 18, 53);
3131
background: linear-gradient(
3232
57deg,

src/App.jsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,33 @@
11
import "./App.css";
2+
import AreaPhotos from "./components/AreaPhotos";
23
import Banner from "./components/Banner";
34
import Header from "./components/Header";
5+
import React, { useEffect, useState } from "react";
46

57
function App() {
8+
const [headerBackground, setHeaderBackground] = useState(false);
9+
10+
useEffect(() => {
11+
const scrollListener = () => {
12+
if (window.scrollY > 10) {
13+
setHeaderBackground(true);
14+
} else {
15+
setHeaderBackground(false);
16+
}
17+
};
18+
19+
window.addEventListener("scroll", scrollListener);
20+
21+
return () => {
22+
window.removeEventListener("scroll", scrollListener);
23+
};
24+
}, []);
25+
626
return (
727
<div className="App">
8-
<Header />
28+
<Header background={headerBackground} />
929
<Banner />
30+
<AreaPhotos />
1031
</div>
1132
);
1233
}

src/components/AreaPhotos/AreaSearch.jsx

Whitespace-only changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from "react";
2+
import "./style.css";
3+
4+
export default function AreaPhotos() {
5+
return (
6+
<section id="areaPhotos">
7+
<div id="titleAreaPhotos">
8+
<h1>Photos</h1>
9+
</div>
10+
<div id="searchPhotos">
11+
<label htmlFor="search">Search for Date:</label>
12+
<input type="Date" id="search" />
13+
</div>
14+
15+
<div className="gridPhotos">
16+
<span>
17+
foto1
18+
</span>
19+
<span>
20+
foto1
21+
</span>
22+
<span>
23+
foto1
24+
</span>
25+
<span>
26+
foto1
27+
</span>
28+
</div>
29+
</section>
30+
);
31+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#areaPhotos{
2+
width: 100%;
3+
height: auto;
4+
/* background-color: red; */
5+
margin-top: 50px;
6+
padding: 10px;
7+
}

src/components/Banner/CardVideo.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
import React from "react";
22
import { PlayCircle} from "@mui/icons-material/"
3-
3+
import { Instagram, Facebook, Twitter} from "@mui/icons-material/";
44
export default function CardVideo() {
55
return (
66
<div id="infoCard">
7+
<div id="contactArea">
8+
<Instagram style={{ color: "#fff", fontSize: 30, cursor: "pointer" }} />
9+
<Facebook style={{ color: "#fff", fontSize: 30, cursor: "pointer" }} />
10+
<Twitter style={{ color: "#fff", fontSize: 30, cursor: "pointer" }} />
11+
</div>
712
<span id="boxVideo">
813
<PlayCircle
914
style={{ fontSize: 50, color: "#fc5560", cursor: "pointer" }}
1015
/>
1116
</span>
1217
<span id="card-description">
13-
<h3>Meet with the future</h3>
18+
<h3>Meet with the<br/> future</h3>
1419
<small>Technology</small>
1520
</span>
1621
</div>

0 commit comments

Comments
 (0)