Skip to content

Commit

Permalink
Updated UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushhaabhhh committed Oct 2, 2024
1 parent 1060cd1 commit 833d011
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 76 deletions.
3 changes: 0 additions & 3 deletions frontend/app/create-ride/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";
import { useSearchParams } from "next/navigation";
import Header from "@components/Header";
import Footer from "@components/Footer";

const registerlayout = ({ children }) => {
const searchParams = useSearchParams();
Expand All @@ -16,8 +15,6 @@ const registerlayout = ({ children }) => {
role={role}
/>
{children}

<Footer />
</div>
);
};
Expand Down
8 changes: 4 additions & 4 deletions frontend/app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ body {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.header {
/* .header {
background-color:yellow;
display: flex;
flex-direction: row;
Expand All @@ -84,12 +84,12 @@ body {
padding: 10px;
border-radius: 15px;
transition: background-color 0.3s, color 0.3s;
}
} */

.header-ele-links:hover {
/* .header-ele-links:hover {
background-color: white;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19);
}
} */

.footer {
margin-bottom : auto;
Expand Down
3 changes: 0 additions & 3 deletions frontend/app/my-rides/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";
import React from "react";
import Header from "@components/Header";
import Footer from "@components/Footer";
import { useSearchParams } from "next/navigation";

const myRidesLayout = ({ children }) => {
Expand All @@ -17,8 +16,6 @@ const myRidesLayout = ({ children }) => {
role={role}
/>
{children}

<Footer />
</div>
);
};
Expand Down
1 change: 1 addition & 0 deletions frontend/app/my-rides/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const MyRides = () => {
flexDirection: "column",
alignItems: "center",
minHeight: "82vh",
marginTop: "25px",
}}
>
{role === "not chosen" || myRides.length == 0 ? (
Expand Down
3 changes: 0 additions & 3 deletions frontend/app/register/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import React from "react";
import Header from "@components/Header";
import { useSearchParams } from "next/navigation";
import Footer from "@components/Footer";

const registerlayout = ({ children }) => {
const searchParams = useSearchParams();
Expand All @@ -17,8 +16,6 @@ const registerlayout = ({ children }) => {
role={role}
/>
{children}

<Footer />
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/styles/get-rides.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
flex-direction: column;
align-items: center;
padding: 20px;
/* flex-grow: 1; */
margin-top: 55px;
}

.filterContainer {
Expand Down
1 change: 1 addition & 0 deletions frontend/app/styles/user-registration.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
max-width: 40%;
margin: auto;
min-height: 80vh;
margin-top: 55px;
}

.formGroup {
Expand Down
50 changes: 0 additions & 50 deletions frontend/components/Footer.jsx

This file was deleted.

44 changes: 32 additions & 12 deletions frontend/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,41 @@ const Header = ({ role, balance, connectedAccount }) => {

return (
<AppBar
position="static"
position="relative"
sx={{
backgroundColor: "#1e1e1e",
boxShadow: "0 4px 10px rgba(0, 0, 0, 0.3)",
padding: "8px",
background: "none",
}}
>
<Toolbar sx={{ display: "flex", alignItems: "center" }}>
<svg
width="105%"
height="120"
viewBox="0 0 200 100"
preserveAspectRatio="none"
style={{
position: "absolute",
top: 0,
left: 0,
transform: "rotate(180deg)",
zIndex: 0,
}}
>
<path d="M0,60 Q20,0 50,30 Q80,60 100,30 Q120,0 150,30 Q180,60 200,30 L200,100 L0,100 Z" fill="#ad520c" />
</svg>

<Toolbar
sx={{
position: "relative",
zIndex: 1,
display: "flex",
alignItems: "center",
}}
>
<Avatar
alt="Logo"
src="../images/ewLogo.png"
sx={{
width: 50,
height: 50,
width: 60,
height: 60,
marginRight: 2,
cursor: "pointer",
"&:hover": {
Expand Down Expand Up @@ -93,8 +114,8 @@ const Header = ({ role, balance, connectedAccount }) => {
</Link>
</div>


<div style={{
<div
style={{
marginRight: "30px",
display: "inline-block",
transition: "transform 0.2s ease-in-out",
Expand All @@ -104,8 +125,8 @@ const Header = ({ role, balance, connectedAccount }) => {
}}
onMouseLeave={(e) => {
e.currentTarget.style.transform = "scale(1)";
}}>
}}
>
<Link
href={{
pathname: "/my-rides",
Expand All @@ -129,7 +150,6 @@ const Header = ({ role, balance, connectedAccount }) => {
</Link>
</div>


<Typography
variant="body1"
sx={{
Expand Down

0 comments on commit 833d011

Please sign in to comment.