Skip to content

Commit

Permalink
fixed all conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
nishant0708 committed Jun 16, 2024
2 parents cceea8a + 6b3b3f8 commit 0a701bb
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 97 deletions.
25 changes: 12 additions & 13 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.


Fixes # (issue)


## Type of change

Please give a X on it which is applicable
Please mark with an X the type that applies:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Refactor Code
- [ ] A documentation update
- [ ] Others(mentioned in the issue number)
- [ ] Refactor code
- [ ] Documentation update
- [ ] Other (mentioned in the issue number)

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce them. Please also list any relevant details for your test configuration.

**_Test A: Describe here_**

**_Test A Describe here_**
**_Test B: Describe here (if required)_**

**_Test B Describe here (if Requred)_**
# Screenshots and Videos

# Screenshorts and Vedios:
Please provide screenshots and videos of the changes you made.

give screenshorts and vedio of the changes you made
# Checklist

# Checklist:
give a X on it which is applicable
Please mark with an X the items that apply:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
Expand Down
34 changes: 13 additions & 21 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { motion, AnimatePresence, useScroll } from "framer-motion";
import { IoClose } from "react-icons/io5";
import { GiHamburgerMenu } from "react-icons/gi";
import { ThemeContext } from '../themeContext';

const Navbar = () => {
const { theme, toggleTheme } = useContext(ThemeContext);
const [isOpen, setIsOpen] = useState(false);
Expand All @@ -16,29 +17,22 @@ const Navbar = () => {

return (
<>
<nav className="text-white p-3 shadow-lg top-0 bg-gradient-to-t from-blue-950 via-blue-950 to-gray-900 w-full fixed z-40 dark:bg-cadetblue dark:bg-none">
<motion.div
className="left-0 top-0 w-full h-1 bg-blue-500 fixed z-50"
style={{ scaleX: scrollYProgress }}
/>
<div className="max-w-full mx-auto px-4 sm:px-6 lg:px-12">
<div className="flex items-center justify-between h-16">

{/* Foodies Web Logo */}
<div className="flex-shrink-0">
<nav className="text-white p-3 shadow-lg top-0 bg-gradient-to-t from-blue-950 via-blue-950 to-gray-900 w-full fixed z-40 dark:bg-cadetblue dark:bg-none">
<motion.div
className="left-0 top-0 w-full h-1 bg-blue-500 fixed z-50"
style={{ scaleX: scrollYProgress }}
/>
<div className="max-w-full mx-auto px-4 sm:px-6 lg:px-12">
<div className="flex items-center justify-between h-16">
{/* Foodies Web Logo */}
<div className="flex-shrink-0">
<Link to="/home" className="flex items-center">
<img src={logo} alt="Logo" className="h-12" />
</Link>
</div>

<div className="hidden md:block">

<div className="hidden md:block">
<div className="ml-16 flex gap-6 items-baseline space-x-4">

<NavItem to="/home">Home</NavItem>
<NavItem to="/about">About</NavItem>
<NavItem to="/news">News</NavItem>
<NavItem to="/contact">Contact</NavItem>
<NavItem to="/home" icon={<IconHome />}>Home</NavItem>
<NavItem to="/about" icon={<IconAbout />}>About</NavItem>
<NavItem to="/news" icon={<IconNews />}>News</NavItem>
Expand Down Expand Up @@ -136,11 +130,11 @@ const NavItem = ({ icon, to, children }) => {
};

const MobileNavItem = ({ to, children }) => {
let classname = "z-[2] text-gray-300 text-center hover:text-white block px-3 py-2 rounded-md text-xl font-medium ";
const classname = "z-[2] text-gray-300 text-center hover:text-white block px-3 py-2 rounded-md text-xl font-medium ";
return (
<Link
to={to}
className={ children.type === "button" ? classname : classname + "hover:bg-gray-700" }
className={classname + "hover:bg-gray-700"}
>
{children}
</Link>
Expand All @@ -153,6 +147,4 @@ const IconAbout = () => <span>ℹ️</span>;
const IconNews = () => <span>📰</span>;
const IconRateUs = () => <span></span>;


export default Navbar;

6 changes: 4 additions & 2 deletions src/pages/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import { AiOutlineEye, AiOutlineEyeInvisible } from "react-icons/ai";
import { Link, useNavigate } from "react-router-dom";
import { toast } from "react-hot-toast";
import axios from "axios";

import logo from "../assets/logo2.png";
import Loader from "../components/Loader/Loader";
import Loader from "../components/Loader/Loader"; // Ensure this path is correct
import { useAuth } from "../authContext";

function Login() {
Expand Down Expand Up @@ -42,6 +41,9 @@ function Login() {

function rememberMeHandler(event) {
setRememberMe(event.target.checked);
if (!event.target.checked) {
localStorage.removeItem("rememberedEmail");
}
}

async function submitHandler(event) {
Expand Down
85 changes: 24 additions & 61 deletions src/pages/Signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Signup() {

setFormData((prevData) => ({
...prevData,
[event.target.name]: event.target.value,
[event.target.name]: value,
}));
}

Expand Down Expand Up @@ -96,11 +96,8 @@ function Signup() {
<div className="relative overflow-hidden md:flex w-1/2 bg-gradient-to-t from-blue-950 via-blue-950 to-gray-900 bg-no-repeat justify-around items-center hidden">
<div>
<img src={logo} alt="logo" className="w-48 h-12 mb-2" />
<p className="text-white mt-1 ml-3">
Connecting You to Your College Canteens
</p>
<p className="text-white mt-1 ml-3">Connecting You to Your College Canteens</p>
</div>

<div className="absolute -bottom-32 -left-40 w-80 h-80 border-4 rounded-full border-opacity-30 border-t-8"></div>
<div className="absolute -bottom-40 -left-20 w-80 h-80 border-4 rounded-full border-opacity-30 border-t-8"></div>
<div className="absolute -top-40 -right-0 w-80 h-80 border-4 rounded-full border-opacity-30 border-t-8"></div>
Expand Down Expand Up @@ -160,7 +157,7 @@ function Signup() {
value={formData.accountType}
className="mt-1 p-2 w-full border rounded-2xl"
>
<option value="" disabled selected hidden>
<option value="" disabled hidden>
Login as
</option>
<option value="User">User</option>
Expand All @@ -178,15 +175,8 @@ function Signup() {
value={formData.password}
onChange={PasswordChecker}
/>
<span
className="absolute right-3 top-3 cursor-pointer"
onClick={() => setShowPassword((prev) => !prev)}
>
{showPassword ? (
<AiOutlineEye size={20} />
) : (
<AiOutlineEyeInvisible size={20} />
)}
<span className="absolute right-3 top-3 cursor-pointer" onClick={() => setShowPassword((prev) => !prev)}>
{showPassword ? <AiOutlineEyeInvisible size={20} />: <AiOutlineEye size={20} /> }
</span>
</div>

Expand Down Expand Up @@ -221,73 +211,46 @@ function Signup() {
</button>

<Link to="/login">
<span className="text-sm ml-2 hover:text-blue-500 cursor-pointer">Already have an account? Login</span>
<span className="text-sm ml-2 hover:text-blue-500 cursor-pointer">
Already have an account? Login
</span>
</Link>

<main className='tracker-box text-sm font-normal text-red-600'>
<div className={lowerValidated ? 'validated text-green-600' : 'not-validated'}>
{lowerValidated ? (
<span className='list-icon green'>
<Icon icon={arrows_circle_check} />
</span>
) : (
<span className='list-icon'>
<Icon icon={arrows_exclamation} />
</span>
)}
<span className='list-icon'>
<Icon icon={lowerValidated ? arrows_circle_check : arrows_exclamation} />
</span>
At least one lowercase letter
</div>
<div className={upperValidated ? 'validated text-green-600' : 'not-validated'}>
{upperValidated ? (
<span className='list-icon green'>
<Icon icon={arrows_circle_check} />
</span>
) : (
<span className='list-icon'>
<Icon icon={arrows_exclamation} />
</span>
)}
<span className='list-icon'>
<Icon icon={upperValidated ? arrows_circle_check : arrows_exclamation} />
</span>
At least one uppercase letter
</div>
<div className={numberValidated ? 'validated text-green-600' : 'not-validated'}>
{numberValidated ? (
<span className='list-icon green'>
<Icon icon={arrows_circle_check} />
</span>
) : (
<span className='list-icon'>
<Icon icon={arrows_exclamation} />
</span>
)}
<span className='list-icon'>
<Icon icon={numberValidated ? arrows_circle_check : arrows_exclamation} />
</span>
At least one number
</div>
<div className={specialValidated ? 'validated text-green-600' : 'not-validated'}>
{specialValidated ? (
<span className='list-icon green'>
<Icon icon={arrows_circle_check} />
</span>
) : (
<span className='list-icon'>
<Icon icon={arrows_exclamation} />
</span>
)}
<span className='list-icon'>
<Icon icon={specialValidated ? arrows_circle_check : arrows_exclamation} />
</span>
At least one special character
</div>
<div className={lengthValidated ? 'validated text-green-600' : 'not-validated'}>
{lengthValidated ? (
<span className='list-icon green'>
<Icon icon={arrows_circle_check} />
</span>
) : (
<span className='list-icon'>
<Icon icon={arrows_exclamation} />
</span>
)}
<span className='list-icon'>
<Icon icon={lengthValidated ? arrows_circle_check : arrows_exclamation} />
</span>
At least 8 characters
</div>
</main>
</form>
</div>

<style jsx global>
{`
.tracker-box{
Expand Down

0 comments on commit 0a701bb

Please sign in to comment.