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

created a login and register page issue number 421 #446

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 24 additions & 0 deletions login.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";

function Login() {
return (
<div className="auth-container">
<h2>Login</h2>
<form>
<div className="form-group">
<label>Email:</label>
<input type="email" required />
</div>
<div className="form-group">
<label>Password:</label>
<input type="password" required />
</div>
<div className="form-group">
<button type="submit">Login</button>
</div>
</form>
</div>
);
}

export default Login;
24 changes: 24 additions & 0 deletions register.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";

function Register() {
return (
<div className="auth-container">
<h2>Register</h2>
<form>
<div className="form-group">
<label>Email:</label>
<input type="email" required />
</div>
<div className="form-group">
<label>Password:</label>
<input type="password" required />
</div>
<div className="form-group">
<button type="submit">Register</button>
</div>
</form>
</div>
);
}

export default Register;
52 changes: 30 additions & 22 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,40 @@ import InternPage from "./Component/Documetation/Internship/InternPage";
import Footer from "./Component/Footer";
import Contact from "./Component/Contact";
import Blog from "./Component/Documetation/Blog";
import { useState } from "react";

import Login from "./Component/Login";
import Register from "./Component/Register";
import { useState, useEffect } from "react";

function App() {
const [loading, setLoading] = useState(true);
const spinner = document.getElementById("spinner");
if (spinner) {
setTimeout(() => {
spinner.style.display = "none";
setLoading(false);
}, 2000);
}
return(

useEffect(() => {
const spinner = document.getElementById("spinner");
if (spinner) {
setTimeout(() => {
spinner.style.display = "none";
setLoading(false);
}, 2000);
}
}, []);

return (
!loading && (
<div>
<Navbar/>
<Routes>
<Route path="/" element={<Home/>}/>
<Route path="/docs" element={<Doc/>}/>
<Route path="/intern" element={<InternPage/>}/>
<Route path="/blog" element={<Blog />} />
<Route path="/Contact" element={<Contact></Contact>}/>
<Route path="*" element={<Error/>}/>
</Routes>
<Footer/>
</div>)
<div>
<Navbar />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/docs" element={<Doc />} />
<Route path="/intern" element={<InternPage />} />
<Route path="/blog" element={<Blog />} />
<Route path="/contact" element={<Contact />} />
<Route path="/login" element={<Login />} />
<Route path="/register" element={<Register />} />
<Route path="*" element={<Error />} />
</Routes>
<Footer />
</div>
)
);
}

Expand Down
93 changes: 24 additions & 69 deletions src/Component/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,10 @@ import { Link, useNavigate } from "react-router-dom";

function Navbar() {
const navigate = useNavigate();
function handleRedirect() {
navigate("/");
}
let [slidebarClick, setSlidebarClick] = useState(false);

// function slidebarClicked(e){
// // slidebarClick=slidebarClick?false:true;
// // slidebarClick=slidebarClick?false:true;
// // if(slidebarClick==false).?

// console.log(slidebarClick)

// }
const [slidebarClick, setSlidebarClick] = useState(false);

const toggleDarkMode = () => setSlidebarClick(!slidebarClick);

// </div>
return (
<>
<nav className="Navbar">
Expand All @@ -37,90 +24,58 @@ function Navbar() {
</div>
<div
className="left-sight"
onClick={handleRedirect}
onClick={() => navigate("/")}
style={{ textAlign: "center", fontSize: "2em", cursor: "none" }}>
CareerZunction
</div>
<div className="right-sight">
<div className="cart-item">
<Link to="/" className="link">
{" "}
Home
</Link>
<Link to="/" className="link">Home</Link>
</div>
<div className="cart-item">
<Link to="/intern" className="link">Internships</Link>
</div>
<div className="cart-item">
<Link to="/blog" className="link">Blog</Link>
</div>
<div className="cart-item">
<Link to="/intern" className="link">
{" "}
Internships
</Link>
<Link to="/docs" className="link">Documentation</Link>
</div>
<div className="cart-item">
<Link to="/Blog" className="link">
Blog
</Link>
<Link to="https://github.com/HimanshuNarware/CareerZunction_Intern" className="link">GitHub</Link>
</div>
<div className="cart-item">
<Link to="/docs" className="link">
{" "}
Documentation
</Link>
<Link to="/login" className="link">Login</Link>
</div>
<div className="cart-item">
<Link
to="https://github.com/HimanshuNarware/CareerZunction_Intern"
className="link">
{" "}
GitHub
</Link>
<Link to="/register" className="link">Register</Link>
</div>
<div className="cart-item">
<Link to="/Contact" className="link">
{" "}
Contact Us
</Link>
<Link to="/contact" className="link">Contact Us</Link>
</div>
</div>
</nav>

<div className="sidebar ">
<div className="sidebar">
<div className="sidebar-options">
<Link to="/"><FaHome /></Link>
</div>
<div className="sidebar-options">
{
<Link to="/">
<FaHome />
</Link>
}
<Link to="/intern"><FaLaptop /></Link>
</div>
<div className="sidebar-options">
{
<Link to="/intern">
<FaLaptop />
</Link>
}
<Link to="/blog"></Link>
</div>
<div className="sidebar-optionss">{<Link to="/Blog"></Link>}</div>
<div className="sidebar-options">
{
<Link to="/docs">
<BsFiletypeDoc />
</Link>
}
<Link to="/docs"><BsFiletypeDoc /></Link>
</div>
<div className="sidebar-options">
{
<Link
to="https://github.com/HimanshuNarware/CareerZunction_Intern"
target="_blank">
<FaGithub />
</Link>
}
<Link to="https://github.com/HimanshuNarware/CareerZunction_Intern" target="_blank"><FaGithub /></Link>
</div>
<div className="sidebar-optionss">
{<Link to="/Contact" target="_blank"></Link>}
<div className="sidebar-options">
<Link to="/contact" target="_blank"></Link>
</div>
</div>



</>
);
}
Expand Down
50 changes: 50 additions & 0 deletions src/Component/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,53 @@ margin-left: 1% !important;
}
}

body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}

.auth-container {
background-color: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
max-width: 400px;
width: 100%;
}

.auth-container h2 {
margin-bottom: 20px;
}

.form-group {
margin-bottom: 15px;
}

.form-group label {
display: block;
margin-bottom: 5px;
}

.form-group input {
width: 100%;
padding: 10px;
box-sizing: border-box;
}

.form-group button {
width: 100%;
padding: 10px;
background-color: #6200ea;
border: none;
color: white;
cursor: pointer;
}

.form-group button:hover {
background-color: #3700b3;
}