Skip to content

Commit

Permalink
Merge pull request #12 from TartejBrothers/Changes
Browse files Browse the repository at this point in the history
Project page added
  • Loading branch information
TartejBrothers authored Jan 9, 2024
2 parents 7751e06 + 5d4eab6 commit ecd75f4
Show file tree
Hide file tree
Showing 9 changed files with 202 additions and 11 deletions.
126 changes: 126 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-datepicker": "^4.25.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.1",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
Expand Down
11 changes: 10 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import HomePage from "./components/home";
import ProjectPage from "./components/project";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";

function App() {
return (
<div className="App">
<HomePage />
<Router>
<Routes>
<Route path="/" element={<HomePage />} />
<Route path="/project" element={<ProjectPage />} />
<Route path="/home" element={<HomePage />} />
</Routes>
</Router>
</div>
);
}
Expand Down
9 changes: 6 additions & 3 deletions src/components/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import homeright from "./images/homeright.png";
import vector1 from "./images/vectors/vector1.png";
import vector2 from "./images/vectors/vector2.png";
import vector3 from "./images/vectors/vector3.png";
import { Link } from "react-router-dom";
export default function homepage() {
const changeType = () => {
var passwordfield = document.getElementById("password");
Expand Down Expand Up @@ -55,9 +56,11 @@ export default function homepage() {
<input type="checkbox" name="remember" />
<p>Remember Me</p>
</div>
<button type="submit" className="loginbutton">
Login
</button>
<Link to="/project">
<button type="submit" className="loginbutton">
Login
</button>
</Link>
</div>
</form>
</div>
Expand Down
Binary file added src/components/images/projectpage/Background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions src/components/project.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React, { useState } from "react";
import DatePicker from "react-datepicker";
import "./styles/project.css";
import "react-datepicker/dist/react-datepicker.css";
import "./styles/global.css";
export default function ProjectPage() {
const [startDate, setStartDate] = useState(new Date());
const [endDate, setEndDate] = useState(null);

return (
<div className="projectbody">
<h1>
SRM ATTEND<font color="#00ADB5">EASE</font>
</h1>
<h5>Pick a single date or add a range</h5>
<div>
<div className="dateform">
<DatePicker
wrapperClassName="date"
selected={startDate}
selectsStart
startDate={startDate}
placeholderText="Select Start Date"
endDate={endDate}
onChange={(date) => setStartDate(date)}
/>
<DatePicker
wrapperClassName="date"
selected={endDate}
selectsEnd
startDate={startDate}
placeholderText="Select End Date"
endDate={endDate}
minDate={startDate}
onChange={(date) => setEndDate(date)}
/>
</div>
</div>
</div>
);
}
11 changes: 11 additions & 0 deletions src/components/styles/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");
* {
font-family: "Poppins", sans-serif;
}
html {
overflow-x: hidden;
color: #fff;
}
a {
text-decoration: none;
}
8 changes: 1 addition & 7 deletions src/components/styles/home.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");
* {
font-family: "Poppins", sans-serif;
}
html {
overflow-x: hidden;
}

.homecontent {
display: flex;
height: 100vh;
Expand Down
5 changes: 5 additions & 0 deletions src/components/styles/project.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
html {
background-image: url("../images/projectpage/Background.png");
padding: 20px;

}

0 comments on commit ecd75f4

Please sign in to comment.