Skip to content

Commit

Permalink
adding donate button to palestine that go to donate.unrwa.r.org on he…
Browse files Browse the repository at this point in the history
…ading
  • Loading branch information
No0ne003 committed Mar 3, 2024
1 parent 570fee2 commit a9788f7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
Binary file added src/assets/img/bg-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/bg-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/svg/Flag_of_Palestine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 17 additions & 2 deletions src/layouts/header.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Assets
import githubLogoDark from '../assets/svg/github-mark-white.svg';
import githubLogoLight from '../assets/svg/github-mark.svg';
import palestineSvg from '@/assets/svg/Flag_of_Palestine.svg';

// Components
import { useEffect } from 'react';
import { Link } from 'react-router-dom';
import { ModeToggle } from '@/components/mode-toggle';
import NavLinks from '@/components/ui/NavLinks';
import { Button } from '@/components/ui/button'
import { useTheme } from '@/components/theme-provider';
import { useEffect } from 'react';

function Header() {
const { theme, setTheme } = useTheme();
Expand All @@ -21,7 +23,7 @@ function Header() {
});

return (
<header className="container px-6 py-3 flex justify-between items-center backdrop-blur-3xl">
<header className="container px-6 py-3 flex justify-between items-center backdrop-blur-md sticky top-0 z-50">
<Logo />
<Navigation />
</header>
Expand All @@ -44,6 +46,7 @@ function Navigation() {

return (
<nav className="flex items-center gap-6">
<DonateToPalestine />
<NavLinks
logo={theme === 'dark' ? githubLogoDark : githubLogoLight}
name="Github"
Expand All @@ -54,4 +57,16 @@ function Navigation() {
);
}

function DonateToPalestine() {
return (
<Button variant="outline" asChild>
<a className='space-x-2 flex items-center' href="https://donate.unrwa.org/gaza/~my-donation?_cv=1" target='_blank' rel='noopener noreferrer'>
<img className="size-4" src={palestineSvg} alt="Palestine" />
<span>Donate Now</span>
</a>
</Button>
)
}


export default Header;
4 changes: 3 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import tailwindCssAnimate from "tailwindcss-animate";

/** @type {import('tailwindcss').Config} */
export default {
darkMode: ["class"],
Expand Down Expand Up @@ -76,5 +78,5 @@ export default {
},
},
},
plugins: [require("tailwindcss-animate")],
plugins: [tailwindCssAnimate],
}

0 comments on commit a9788f7

Please sign in to comment.