Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second Deliverable #82

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3ffa74d
created the Navbar folder that contains the Navbar component file, th…
Jul 18, 2021
e33026d
Removed styles and all of the content we had in the repo,
Jul 18, 2021
021f06e
working on the navbar component, changing css files to scss
Jul 19, 2021
6dfcafb
Adding general styles
Jul 19, 2021
e07d928
will start working on the sidebar menu
Jul 19, 2021
8ef2462
Refactoring the navbar, work in progress, sidebar has been created now
Jul 19, 2021
bbd7f3a
sidebar menu is ready, its working now
Jul 19, 2021
ab3eaa1
The navbar is almost finished, it is responsive already, it contains the
Jul 19, 2021
1e7606e
Navbar is now complete, all requested components have been added, navbar
Jul 20, 2021
4897a9e
Merge branch 'feature/navbar' into develop
Jul 20, 2021
87fd95e
Added a data folder in the utils folder that contains the mockup data…
Jul 20, 2021
5cdeaaa
removed unneeded code from the Home page
Jul 20, 2021
1804de6
videoList component is now ready
Jul 23, 2021
9466df7
videoList component has been finished now
Jul 23, 2021
3ad238d
Merge branch 'feature/home-view' into develop
Jul 23, 2021
64b82ee
changing scss files back to css files as per the recommendation of my…
Jul 23, 2021
834c9c9
working on the tests of the HomePage component
Jul 31, 2021
27f3bd9
testing the Layout component
Aug 2, 2021
6c26caa
testing of the Layout component is ready
Aug 2, 2021
5ecd674
Home component tests are ready
Aug 2, 2021
7b28b74
VideoList component tests are ready
Aug 2, 2021
7021901
Navbar tests are ready
Aug 2, 2021
2155a33
Created the search context, and using it in the navbar component so n…
Aug 3, 2021
2a43dbf
Working on the VideoList Provider, able to get 23 videos from the you…
Aug 3, 2021
1fe2bdd
Able to display videos from the youtube api
Aug 3, 2021
2041a58
Added React.lazy and suspense
Aug 4, 2021
17a158c
created the VideoDetails component, it already displays the selectd v…
Aug 4, 2021
4681482
refactored the code, I have moved the styled components to separate f…
Aug 5, 2021
40ed78e
I have created a useFetch custom hook for fetching data
Aug 5, 2021
13063be
I have added react lazy and suspense to the app component for it to w…
Aug 5, 2021
5ea2603
RecommendedVideos component is ready, able to display the videos that…
Aug 5, 2021
c3d4da9
the web app now scrolls to top when changing to another video
Aug 6, 2021
ffec758
test of the useFetch custom hooks has been completed
Aug 6, 2021
503a5b2
finished the testing for the Navbar
Aug 9, 2021
37e0579
RecommendedVideos tests have been finished
Aug 9, 2021
57385e9
finished with the tests for the second deliverable
Aug 9, 2021
1e6986a
started working with the useReducer functionality
Aug 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
will start working on the sidebar menu
  • Loading branch information
unknown committed Jul 19, 2021
commit e07d92832b2f6b4b780921dcc3a325764fbb0ea6
Binary file modified public/favicon.ico
Binary file not shown.
7 changes: 6 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap"
rel="stylesheet"
/>
<title>React App</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>

<title>YouTube clone App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
35 changes: 26 additions & 9 deletions src/components/Navbar/Navbar.component.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import React, { useState } from 'react';

import { GiHamburgerMenu } from 'react-icons/gi';
import { FaUserCircle } from 'react-icons/fa';

import './Navbar.styles.scss';
import styled from 'styled-components';
import { Link } from 'react-router-dom';

const Header = styled.header`
background-color: aqua;
Expand All @@ -29,19 +29,36 @@ const SearchInput = styled.input`
}
`;

const HamburgerIcon = styled.i`
font-size: 3rem;
margin: 0 2rem;
cursor: pointer;
`;

const Navbar = () => {
const [navigation, setNavigation] = useState(false);

const showNavbar = () => {
console.log('button has been clicked!!');
setNavigation(!navigation);
};

return (
<Header>
<div className="navbar">
<nav className="navbar">
<div className="navbar__left-section">
{/* icon */}
<Button onClick={showNavbar}>
<GiHamburgerMenu size="2em" />
</Button>
{/* sidebar */}
{/* <input type="checkbox" id="check" />
<label htmlFor="check">
<i className="fa fa-bars" id="btn"></i>
<i className="fa fa-close" id="close"></i>
</label>
<div className="sidebar">
<Link to="/">
<i className="fa fa-home"></i>Home
</Link>
</div> */}
<HamburgerIcon className="fa fa-bars" id="btn"></HamburgerIcon>

{/* inpu */}
<SearchInput type="text" placeholder="Search a video..." />
</div>
Expand All @@ -50,7 +67,7 @@ const Navbar = () => {
<FaUserCircle size="2.5em" />
</Button>
</div>
</div>
</nav>
</Header>
);
};
Expand Down
56 changes: 56 additions & 0 deletions src/components/Navbar/Navbar.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,59 @@
padding: 5px;
}
}

// #check {
// display: none;
// }

// label #btn,
// label #close {
// font-size: 3rem;
// position: absolute;
// cursor: pointer;
// }

// label #btn {
// left: 3rem;
// top: 30px;
// color: #fff;
// transition: all 0.3s ease;
// }

// #close {
// z-index: 1111;
// left: -195px;
// transition: all 0.3s ease;
// }

// .sidebar {
// position: fixed;
// left: -250px;
// width: 250px;
// height: 100%;
// background: #202a3c;
// color: #fff;
// transition: all 0.3s ease;
// }

// #check:checked ~ .sidebar {
// left: 0;
// }

// #check:checked ~ label #btn {
// left: 250px;
// }

@media only screen and (max-width: 900px) {
.navbar {
&__left-section {
& input {
width: 80%;
}
}

&__right-section {
display: none;
}
}
}
3 changes: 3 additions & 0 deletions src/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ $bp-smallest: 31.25em; // 500px / 16px
html {
box-sizing: border-box;
font-size: 62.5%;
@media only screen and(max-width: $bp-large) {
font-size: 50%;
}
}

body {
Expand Down