Skip to content
Merged
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
2 changes: 1 addition & 1 deletion backend/charities/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Meta:
model = Charity
fields = [
"id",
"name",
"charity_name",
"donations_received",
"description",
"logo_path",
Expand Down
6 changes: 6 additions & 0 deletions webapp/public/photos/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions webapp/public/photos/logo_small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions webapp/src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Link from "next/link";

const Footer = () => {
return (
<footer className="bg-white rounded-lg shadow-sm m-4 dark:bg-blue-500">
<footer className="bg-white rounded-lg shadow-sm m-4 dark:bg-sky-900">
<div className="w-full mx-auto max-w-screen-xl p-4 md:flex md:items-center md:justify-between">
<span className="text-sm text-white sm:text-center dark:text-white">
© {new Date().getFullYear()} <Link href="https://stockcharity.com/" className="hover:underline">Stock Charity</Link>. All Rights Reserved.
Expand All @@ -18,7 +18,14 @@ const Footer = () => {
<Link href="/terms-and-conditions" className="hover:underline me-4 md:me-6">Terms and Conditions</Link>
</li>
<li>
<Link href="#" className="hover:underline">Contact Us</Link>
<button
onClick={() => {
window.location.href = 'mailto:therealstockcharity@gmail.com';
}}
className="hover:underline me-4 md:me-6"
>
Contact Us
</button>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRouter } from "next/router";
import NavBar from "./navbar";
import Footer from "./footer";

const showFooterOn = ["/charity-signup", "/about-us", "/home"];
const showFooterOn = ["/charity-signup", "/about-us", "/home", '/donate'];

const Layout = ({ children }: { children: JSX.Element }) => {
const router = useRouter();
Expand Down
34 changes: 22 additions & 12 deletions webapp/src/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { useState } from 'react';
import Link from 'next/link';
import { useCookies } from 'react-cookie';
import { isLoggedIn } from '@/util/request';
import Image from "next/image";



const NavBar: React.FC = () => {
const [menuOpen, setMenuOpen] = useState(false);
Expand All @@ -16,12 +19,19 @@ const NavBar: React.FC = () => {
<header className="flex shadow-lg py-4 px-4 sm:px-10 bg-white font-[sans-serif] min-h-[70px] tracking-wide relative z-50">
<div className="flex flex-wrap items-center justify-between gap-4 w-full">

{/* Screen Logo */}
<Link href="/home" className="lg:absolute max-lg:left-10 lg:top-2/4 lg:left-2/4 lg:-translate-x-1/2 lg:-translate-y-1/2 max-sm:hidden">
<h1>Stock Charity</h1>
{/* Screen Logo (Large screens) */}
<Link
href="/home"
className="lg:absolute max-lg:left-10 lg:top-2/4 lg:left-2/4 lg:-translate-x-1/2 lg:-translate-y-1/2 max-sm:hidden flex items-center space-x-2"
>
<Image src={"/photos/logo.svg" } alt="Stock Charity Logo" width={250} height={30} />
</Link>
<Link href="/home" className="hidden max-sm:block">
<h1>Stock Charity</h1>

<Link
href="/home"
className="hidden max-sm:flex items-center space-x-2"
>
<Image src={"/photos/logo_small.svg" } alt="StockCharity Logo" width={50} height={50} />
</Link>

{/* Mobile Menu */}
Expand All @@ -43,30 +53,30 @@ const NavBar: React.FC = () => {
</Link>
</li>
<li>
<Link href="/home" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">Home</Link>
<Link href="/home" className="hover:text-sky-800 text-[#333] block font-semibold text-[15px]">Home</Link>
</li>
<li className="max-lg:border-b max-lg:py-3 px-3">
<Link href="/about-us" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">About Us</Link>
<Link href="/about-us" className="hover:text-sky-800 text-[#333] block font-semibold text-[15px]">About Us</Link>
</li>
<li className="max-lg:border-b max-lg:py-3 px-3">
<Link href="/account" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">Account</Link>
<Link href="/account" className="hover:text-sky-800 text-[#333] block font-semibold text-[15px]">Account</Link>
</li>
<li className="max-lg:border-b max-lg:py-3 px-3">
<Link href="/donate" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">Donate</Link>
<Link href="/donate" className="hover:text-sky-800 text-[#333] block font-semibold text-[15px]">Donate</Link>
</li>
<li className="max-lg:border-b max-lg:py-3 px-3">
<Link href="/charity-signup" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">Charity Sign-Up</Link>
<Link href="/charity-signup" className="hover:text-sky-900 text-[#333] block font-semibold text-[15px]">Charity Sign-Up</Link>
</li>
</ul>
</div>

{/* Right Side Buttons */}
<div className="flex items-center ml-auto space-x-6">
{loggedIn ?
<button className="text-[#007bff] hover:underline" onClick={() => { removeCookie("token"); removeCookie("refresh"); }}>Logout</button> :
<button className="text-sky-900 hover:underline" onClick={() => { removeCookie("token"); removeCookie("refresh"); }}>Logout</button> :
<>
<button className='.btn-primary'>
<Link href="/login" className="text-[#007bff] hover:underline">Login</Link>
<Link href="/login" className="text-sky-900 hover:underline">Login</Link>
</button>
<button className="px-4 py-2 btn-login">
<Link href="/register">Sign up</Link>
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ h3 {

/* Button Variants */
.btn-primary {
@apply text-sm rounded-md font-bold text-white border-2 border-[#007bff] bg-[#007bff] transition-all ease-in-out duration-300 hover:bg-transparent hover:text-[#007bff];
@apply text-sm rounded-md font-bold text-white border-2 border-sky-900 bg-sky-900 transition-all ease-in-out duration-300 hover:bg-transparent hover:text-sky-900;
}

.btn-secondary {
@apply bg-gray-600 text-white hover:bg-gray-500 focus:ring-gray-600;
}

.btn-login {
@apply text-sm rounded-md font-bold text-white border-2 border-[#007bff] bg-[#007bff] transition-all ease-in-out duration-300 hover:bg-transparent hover:text-[#007bff];
@apply text-sm rounded-md font-bold text-white border-2 border-sky-900 bg-sky-900 transition-all ease-in-out duration-300 hover:bg-transparent hover:text-sky-900;
}

/* Greyed-Out Cardholder Styling */
Expand All @@ -56,7 +56,7 @@ h3 {
}

.input-style {
@apply block w-full rounded-md border border-gray-300 bg-white px-3.5 py-2 text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-600 focus:ring-offset-2;
@apply block w-full rounded-md border border-gray-300 bg-white px-3.5 py-2 text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-sky-900 focus:ring-offset-2;

}

Expand Down
Loading