Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add leaderboard in navbar #50

Merged
merged 1 commit into from
Dec 3, 2024
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
41 changes: 31 additions & 10 deletions components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import dynamic from 'next/dynamic'
import ThemeSwitch from './ThemeSwitch'
import { ExternalLinkIcon } from '@heroicons/react/outline'
import DialectNotifications from './Dialect'
import { useState } from 'react'

const ConnectWalletButtonDynamic = dynamic(
async () => await import('./ConnectWalletButton'),
Expand All @@ -12,21 +13,41 @@ const ConnectWalletButtonDynamic = dynamic(

const NavBar = () => {
const { fmtUrlWithCluster } = useQueryContext()
const [showTempPopup, setShowTempPopup] = useState(false)

return (
<div className="flex flex-col sm:grid sm:grid-cols-12 relative z-20">
<div className="flex items-center justify-between h-20 col-span-12 px-4 xl:col-start-2 xl:col-span-10 md:px-8 xl:px-4">
<Link href={fmtUrlWithCluster('/realms')}>
<div className="flex cursor-pointer sm:items-center min-w-[36px]">
<picture>
<source
srcSet="/img/logotype-realms-blue-white.svg"
media="(min-width: 640px)"
/>
<img src="/img/logo-realms.svg" className="w-8 h-8 sm:w-24" />
</picture>
<div className="flex gap-2 sm:gap-8 items-center relative">
<Link href={fmtUrlWithCluster('/realms')}>
<div className="flex cursor-pointer sm:items-center min-w-[36px]">
<picture>
<source
srcSet="/img/logotype-realms-blue-white.svg"
media="(min-width: 640px)"
/>
<img src="/img/logo-realms.svg" className="w-8 h-8 sm:w-24" />
</picture>
</div>
</Link>
<div
className="text-[#4deeea] neon-text cursor-pointer text-[15px] font-medium relative md:top-[1px]"
onMouseEnter={() => setShowTempPopup(true)}
onMouseLeave={() => setShowTempPopup(false)}
onTouchStart={() => setShowTempPopup(true)}
onTouchEnd={() => setShowTempPopup(false)}
onPointerEnter={() => setShowTempPopup(true)}
onPointerLeave={() => setShowTempPopup(true)}
>
Leaderboard
</div>
</Link>
{
showTempPopup &&
<div className="p-2 border-[1px] border-[#df1fff] rounded-md absolute right-0 top-8 text-sm neon-box">
Coming Soon
</div>
}
</div>
<div className="flex items-center justify-end space-x-2 md:space-x-4">
<a
className="border-b border-transparent items-center cursor-pointer -mb-[1px] transition-colors hidden sm:flex hover:border-white"
Expand Down
8 changes: 8 additions & 0 deletions styles/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ h4.heading-sm {
.input-sm {
font-size: 20px;
}

.neon-text {
text-shadow: 0 0 20px #4deeea, 0 0 30px #4deeea, 0 0 40px #4deeea;
}

.neon-box {
box-shadow: 0 0 20px #df1fff;
}
Loading