diff --git a/app/globals.css b/app/globals.css index 91f55f0..60d3b68 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,4 +1,79 @@ +body { + background-image: url('../public/black_back.jpg'); /* Path relative to the public directory */ + background-size: cover; /* Cover the entire viewport */ + background-position: center; /* Center the background image */ + background-repeat: no-repeat; /* Do not repeat the image */ +} + @tailwind base; @tailwind components; @tailwind utilities; - \ No newline at end of file + + +/* Add this CSS to your global styles or a relevant CSS file */ + +:root { + + --glassmorphism-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0) 100%); + --glassmorphism-bg: rgba(255, 255, 255, 0.1); + --glassmorphism-blur: 10px; + --glassmorphism-border: rgba(255, 255, 255, 0.15); +} + +.glassmorphism { + background: var(--glassmorphism-gradient), var(--glassmorphism-bg); + backdrop-filter: blur(var(--glassmorphism-blur)); + border: 1px solid var(--glassmorphism-border); + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + position: relative; + overflow: hidden; /* Ensure noise texture covers the entire element */ +} +.glassmorphism::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: url('../public/acrylic.jpg'); + -webkit-backdrop-filter: blur(50px); + backdrop-filter: blur(50px); + background-repeat: repeat; + opacity: 0.01; + pointer-events: none; +} + +/* globals.css or your relevant CSS file */ +.leaderboard-card { + background: var(--glassmorphism-gradient), var(--glassmorphism-bg); + backdrop-filter: blur(var(--glassmorphism-blur)); + border: 1px solid var(--glassmorphism-border); + margin-bottom: 1rem; + padding: 1rem; + width: 100%; + max-width: 400px; + border-radius: 20px; + display: flex; + flex-direction: column; + justify-content: center; /* Center vertically */ + align-items: center; /* Center horizontally */ + position: relative; +} + + +.leaderboard-card.positive { + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 50px rgba(0, 255, 0, 0.1), 1px 1px 1px rgba(0,255,0,0.3), -1px -1px 1px rgba(100,255,100,0.15); +} + +.leaderboard-card.negative { + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 50px rgba(255, 0, 0, 0.05), 1px 1px 1px rgba(255,0,0,0.3), -1px -1px 1px rgba(255,100,100,0.15); +} + +.leaderboard-container { + display: flex; + flex-direction: column; + align-items: center; /* Center horizontally */ + justify-content: center; /* Center vertically */ + width: 100%; + position:relative; /* Adjust padding as needed */ +} \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index 699e58a..b7cbc1c 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,7 +4,7 @@ import React, { useState, useEffect } from "react"; import { SunIcon, MoonIcon } from "@heroicons/react/solid"; import { PrivyProvider, usePrivy } from "@privy-io/react-auth"; import { FaTwitter, FaWallet } from "react-icons/fa"; -import { CheckIcon } from "@heroicons/react/outline"; // For the check mark icon +import { CheckIcon } from "@heroicons/react/outline"; // Helper functions to generate pseudo data const generateRandomName = () => { @@ -27,7 +27,9 @@ function Home() { const [twitterConnected, setTwitterConnected] = useState(false); // State to track Twitter connection const [walletConnected, setWalletConnected] = useState(false); // State to track Wallet connection const [incrementNumber, setIncrementNumber] = useState(1); - const[leaderboardData, setLeaderboardData] = useState([]); + const [leaderboardData, setLeaderboardData] = useState([]); + const [isJoined, setIsJoined] = useState(false); + useEffect(() => { if (darkMode) { document.documentElement.classList.add("dark"); @@ -86,64 +88,89 @@ function Home() { }, [ready, user]); return ( -
-
-

CallFi

-
- - {ready && user ? ( -
- - - - - -
- ): - !ready ? ( -

Loading...

- ) : - }
-
+ // ${darkMode ? "bg-black text-white" : "bg-white text-black"} +
+
+

CallFi

+
-
-

Leaderboard

+ {ready && user ? ( +
+ + + +
+ ) : !ready ? ( +

Loading...

+ ) : ( + + )} +
+
+ {/* Note card */} + { + ready && user?.twitter &&( +
+
+

Join the Leaderboard

+

Get on the leaderboard by posting a tweet!

+ +
+
+ ) + } + { + ready && !user?.twitter && ( +
+
+

Join the Leaderboard

+

Start by linking your Twitter account!

+ {user ? ( + + ) : ( + + )} + + +
+
+ ) + } + + + {/* Leaderboard */} +
- - - - - - - - - {leaderboardData.map((item, index) => ( - - - - - ))} - -
NamePoints
{item["username"]}{parseFloat(item["points"]).toFixed(2)}x
+ {leaderboardData.map((item) => ( +
= 0 ? 'positive' : 'negative'} mx-auto mb-4`}> +

{item["username"]}

+

{parseFloat(item["points"]).toFixed(2)}x

+
+ ))}
-
diff --git a/public/acrylic.jpg b/public/acrylic.jpg new file mode 100644 index 0000000..ec99d9f Binary files /dev/null and b/public/acrylic.jpg differ diff --git a/public/black_back.jpg b/public/black_back.jpg new file mode 100644 index 0000000..bf9f6f7 Binary files /dev/null and b/public/black_back.jpg differ diff --git a/public/noise.png b/public/noise.png new file mode 100644 index 0000000..dfd44e1 Binary files /dev/null and b/public/noise.png differ diff --git a/public/white-noise-screen.png b/public/white-noise-screen.png new file mode 100644 index 0000000..b62b40c Binary files /dev/null and b/public/white-noise-screen.png differ