header & footer

This commit is contained in:
Sewmina 2025-03-28 16:53:22 +05:30
parent 72c497496a
commit ae64342e76
44 changed files with 320 additions and 106 deletions

22
package-lock.json generated
View File

@ -8,9 +8,11 @@
"name": "duelfi",
"version": "0.1.0",
"dependencies": {
"@fontsource/manrope": "^5.2.5",
"next": "15.2.4",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"react-dom": "^19.0.0",
"react-icons": "^5.5.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
@ -208,6 +210,15 @@
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@fontsource/manrope": {
"version": "5.2.5",
"resolved": "https://registry.npmjs.org/@fontsource/manrope/-/manrope-5.2.5.tgz",
"integrity": "sha512-4mYUAhsuF8KoXseG8T9woWUc/foznUVluFtE6fCKAqe76WM3kmDNedaINWjzWB73+wly0duFvVpDBma3NXXT0g==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@humanfs/core": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
@ -4742,6 +4753,15 @@
"react": "^19.0.0"
}
},
"node_modules/react-icons": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.5.0.tgz",
"integrity": "sha512-MEFcXdkP3dLo8uumGI5xN3lDFNsRtrjbOEKDLD7yv76v4wpnEq2Lt2qeHaQOr34I/wPN3s3+N08WkQ+CW37Xiw==",
"license": "MIT",
"peerDependencies": {
"react": "*"
}
},
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",

View File

@ -9,19 +9,21 @@
"lint": "next lint"
},
"dependencies": {
"@fontsource/manrope": "^5.2.5",
"next": "15.2.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "15.2.4"
"react-icons": "^5.5.0"
},
"devDependencies": {
"typescript": "^5",
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@tailwindcss/postcss": "^4",
"tailwindcss": "^4",
"eslint": "^9",
"eslint-config-next": "15.2.4",
"@eslint/eslintrc": "^3"
"tailwindcss": "^4",
"typescript": "^5"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 397.7 311.7" style="enable-background:new 0 0 397.7 311.7;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:url(#SVGID_2_);}
.st2{fill:url(#SVGID_3_);}
</style>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="360.8791" y1="351.4553" x2="141.213" y2="-69.2936" gradientTransform="matrix(1 0 0 -1 0 314)">
<stop offset="0" style="stop-color:#00FFA3"/>
<stop offset="1" style="stop-color:#DC1FFF"/>
</linearGradient>
<path class="st0" d="M64.6,237.9c2.4-2.4,5.7-3.8,9.2-3.8h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5
c-5.8,0-8.7-7-4.6-11.1L64.6,237.9z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="264.8291" y1="401.6014" x2="45.163" y2="-19.1475" gradientTransform="matrix(1 0 0 -1 0 314)">
<stop offset="0" style="stop-color:#00FFA3"/>
<stop offset="1" style="stop-color:#DC1FFF"/>
</linearGradient>
<path class="st1" d="M64.6,3.8C67.1,1.4,70.4,0,73.8,0h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5
c-5.8,0-8.7-7-4.6-11.1L64.6,3.8z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="312.5484" y1="376.688" x2="92.8822" y2="-44.061" gradientTransform="matrix(1 0 0 -1 0 314)">
<stop offset="0" style="stop-color:#00FFA3"/>
<stop offset="1" style="stop-color:#DC1FFF"/>
</linearGradient>
<path class="st2" d="M333.1,120.1c-2.4-2.4-5.7-3.8-9.2-3.8H6.5c-5.8,0-8.7,7-4.6,11.1l62.7,62.7c2.4,2.4,5.7,3.8,9.2,3.8h317.4
c5.8,0,8.7-7,4.6-11.1L333.1,120.1z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
public/duelfiassets/win.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,8 +1,12 @@
@import "tailwindcss";
/* Import the Manrope font with different weights from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Azeret+Mono:wght@400;600&display=swap');
:root {
--background: #ffffff;
--foreground: #171717;
--background: rgb(22,22,22);
--foreground: #fffff;
}
@theme inline {
@ -14,7 +18,7 @@
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--background: rgb(22,22,22);
--foreground: #ededed;
}
}
@ -22,5 +26,8 @@
body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
font-family: "Manrope", sans-serif;
font-optical-sizing: auto;
font-weight: 400;
font-style: normal;
}

View File

@ -1,103 +1,12 @@
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import Image from "next/image";
export default function Home() {
return (
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={180}
height={38}
priority
/>
<ol className="list-inside list-decimal text-sm/6 text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2 tracking-[-.01em]">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold">
src/app/page.tsx
</code>
.
</li>
<li className="tracking-[-.01em]">
Save and see your changes instantly.
</li>
</ol>
<div className="flex gap-4 items-center flex-col sm:flex-row">
<a
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:w-auto"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={20}
height={20}
/>
Deploy now
</a>
<a
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 w-full sm:w-auto md:w-[158px]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Read our docs
</a>
</div>
</main>
<footer className="row-start-3 flex gap-[24px] flex-wrap items-center justify-center">
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/file.svg"
alt="File icon"
width={16}
height={16}
/>
Learn
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
Examples
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
Go to nextjs.org
</a>
</footer>
<div className="bg-[rgb(22,22,22)]">
<Header/>
<Footer/>
</div>
);
}

73
src/components/Footer.tsx Normal file
View File

@ -0,0 +1,73 @@
"use client";
import Image from "next/image";
import Link from "next/link";
export default function Footer() {
return (
<footer className="w-full bg-[rgb(17,17,17)] text-white py-8">
<div className="container max-w-[1200px] mx-auto px-6 flex flex-col">
{/* Big Logo */}
<Image
src="/duelfiassets/logo.png"
alt="DuelFi Logo"
width={400}
height={200}
className="mb-6"
/>
{/* Join the Community */}
<p className="text-lg font-bold mb-4">Join the community</p>
{/* Social Buttons */}
<div className="flex gap-4">
<a
href="https://t.me/yourchannel"
target="_blank"
rel="noopener noreferrer"
className="transition-transform duration-300 hover:scale-110"
>
<Image
src="/duelfiassets/telegram (1).png"
alt="Telegram"
width={40}
height={40}
/>
</a>
<a
href="https://twitter.com/yourhandle"
target="_blank"
rel="noopener noreferrer"
className="transition-transform duration-300 hover:scale-110"
>
<Image
src="/duelfiassets/xlogo.png"
alt="X (Twitter)"
width={40}
height={40}
/>
</a>
</div>
{/* Spacer */}
<div className="h-6"></div>
{/* Splitter */}
<div className="w-full border-t border-gray-600 my-6"></div>
{/* Footer Bottom Section */}
<div className="w-full flex justify-between items-center text-sm opacity-80 font-mono">
<p>2025 DuelFi - Made By Sewmina D</p>
<div className="flex gap-4">
<Link href="/privacy-policy" className="hover:underline">
Privacy Policy
</Link>
<Link href="/terms-of-service" className="hover:underline">
Terms of Service
</Link>
</div>
</div>
</div>
</footer>
);
}

175
src/components/Header.tsx Normal file
View File

@ -0,0 +1,175 @@
"use client";
import Link from "next/link";
import Image from "next/image";
import { FaTelegram, FaXTwitter } from "react-icons/fa6";
import { useState } from "react";
export default function Header() {
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
// Toggle the nav drawer
const toggleDrawer = () => {
setIsDrawerOpen(!isDrawerOpen);
};
return (
<header className="w-full bg-[rgb(22,22,22)] shadow-md">
<div className="container mx-auto flex items-center justify-between p-12 max-w-screen-xl w-full">
{/* Logo */}
<div className="flex items-center w-40 mr-20">
<Image src="/duelfiassets/logo.png" alt="Logo" width={100} height={40} />
</div>
{/* Navigation Links (hidden on mobile, visible on md+) */}
<nav className="hidden md:flex gap-6 ml-6">
<Link
href="/whitepaper"
className="text-white transition-colors duration-[500ms] hover:text-[rgb(248,144,22)]"
>
Whitepaper
</Link>
<Link
href="/support"
className="text-white transition-colors duration-[500ms] hover:text-[rgb(248,144,22)]"
>
Support
</Link>
</nav>
{/* Spacer (for centering) */}
<div className="flex-grow"></div>
{/* Socials & Login (hidden on mobile, visible on md+) */}
<div className="hidden md:flex items-center gap-6">
<a
href="https://t.me/yourchannel"
target="_blank"
rel="noopener noreferrer"
className="transition-transform duration-300 hover:scale-120"
>
<Image
src="/duelfiassets/telegram (1).png"
alt="Telegram"
width={40}
height={40}
/>
</a>
<a
href="https://twitter.com/yourhandle"
target="_blank"
rel="noopener noreferrer"
className="transition-transform duration-300 hover:scale-120"
>
<Image
src="/duelfiassets/xlogo.png"
alt="X (Twitter)"
width={40}
height={40}
/>
</a>
{/* Login Button */}
<button className="px-15 py-3 bg-[rgb(248,144,22)] text-black font-bold rounded-lg transition-transform duration-300 hover:scale-115 hover:bg-white hover:text-[rgb(248,144,22)]">
Connected
</button>
</div>
{/* Mobile-only view (Logo & Login) */}
<div className="flex md:hidden items-center gap-4">
{/* Hamburger Button */}
<button className="px-4 py-2 bg-[rgb(248,144,22)] text-white rounded-lg transition-colors duration-300 hover:bg-white hover:text-[rgb(248,144,22)]">
Login
</button>
<button
onClick={toggleDrawer}
className="text-white"
aria-label="Open Menu"
>
<svg
className="w-6 h-6"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M4 6h16M4 12h16M4 18h16"
/>
</svg>
</button>
</div>
</div>
{/* Mobile Drawer */}
{isDrawerOpen && (
<div className="fixed inset-0 bg-black bg-opacity-50 z-50">
<div className="absolute top-0 right-0 bg-[rgb(22,22,22)] w-64 h-full p-6">
{/* Close button */}
<button
onClick={toggleDrawer}
className="text-white mb-4"
aria-label="Close Menu"
>
<svg
className="w-6 h-6"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
{/* Mobile Navigation Links */}
<div className="flex flex-col gap-6">
<Link
href="/whitepaper"
className="text-white transition-colors duration-[500ms] hover:text-[rgb(248,144,22)]"
onClick={() => setIsDrawerOpen(false)} // Close drawer on link click
>
Whitepaper
</Link>
<Link
href="/support"
className="text-white transition-colors duration-[500ms] hover:text-[rgb(248,144,22)]"
onClick={() => setIsDrawerOpen(false)} // Close drawer on link click
>
Support
</Link>
{/* Socials */}
<a
href="https://t.me/yourchannel"
target="_blank"
rel="noopener noreferrer"
className="text-white transition-colors duration-[500ms] hover:text-[rgb(248,144,22)]"
onClick={() => setIsDrawerOpen(false)}
>
<FaTelegram size={24} />
</a>
<a
href="https://twitter.com/yourhandle"
target="_blank"
rel="noopener noreferrer"
className="text-white transition-colors duration-[500ms] hover:text-[rgb(248,144,22)]"
onClick={() => setIsDrawerOpen(false)}
>
<FaXTwitter size={24} />
</a>
</div>
</div>
</div>
)}
</header>
);
}