Skip to content

Commit

Permalink
style and perf issues
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed May 19, 2024
1 parent 0880fd2 commit 835f7d2
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
22 changes: 9 additions & 13 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@ export default function RootLayout({ children }: PropsWithChildren) {
return (
<html lang="en">
<body
className={`${openSans.variable} scroll-smooth bg-background font-sans text-white antialiased selection:bg-primary selection:text-white`}
className={`${openSans.variable} scroll-smooth bg-background font-sans text-white antialiased selection:bg-primary selection:text-white flex min-h-screen flex-col`}
>
<Providers>
<div className="flex flex-col">
<div className="flex min-h-screen flex-col">
<div className="flex-1">
<NavbarContainer />
{children}
</div>

<Footer />
</div>
<div className="flex-1">
<NavbarContainer />
{children}
</div>

<Footer />
</Providers>

<svg style={{ width: 0, height: 0, position: "absolute" }} aria-hidden="true" focusable="false">
<svg className="size-0 absolute" aria-hidden="true" focusable="false">
<linearGradient
id="icon-gradient-tertiary"
x1="-4"
Expand All @@ -46,7 +42,7 @@ export default function RootLayout({ children }: PropsWithChildren) {
</linearGradient>
</svg>

<svg style={{ width: 0, height: 0, position: "absolute" }} aria-hidden="true" focusable="false">
<svg className="size-0 absolute" aria-hidden="true" focusable="false">
<linearGradient
id="icon-gradient-primary"
x1="5.00012"
Expand All @@ -60,7 +56,7 @@ export default function RootLayout({ children }: PropsWithChildren) {
</linearGradient>
</svg>

<svg style={{ width: 0, height: 0, position: "absolute" }} aria-hidden="true" focusable="false">
<svg className="size-0 absolute" aria-hidden="true" focusable="false">
<defs>
<linearGradient id="percentual-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stopColor="#FFE87C" />
Expand Down
8 changes: 6 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,14 @@ export default async function Homepage() {
function StartLevelingButton() {
return (
<ExternalLink
className="relative bg-gradient-radial w-72 z-[1] text-black text-center px-3 py-2 text-3xl font-bold rounded-lg before:absolute before:inset-0 before:bg-gradient-radial-hover before:z-[-1] before:transition-opacity before:duration-300 before:opacity-0 before:rounded-lg hover:before:opacity-100"
className="group bg-gradient-radial w-72 text-center p-0.5 text-3xl font-bold rounded-lg"
href={BOT_INVITE}
>
Start Leveling
<div className="group-hover:bg-background rounded-lg transition-colors size-full py-2">
<div className="text-black group-hover:bg-gradient-radial group-hover:text-transparent group-hover:bg-clip-text transition-colors h-full text-center flex items-center justify-center">
Start Leveling
</div>
</div>
</ExternalLink>
);
}
Expand Down
Binary file removed src/assets/logo-small.png
Binary file not shown.
Binary file added src/assets/logo-small.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import logoSmallImg from "@/assets/logo-small.png";
import logoSmallImg from "@/assets/logo-small.webp";
import { ExternalLink } from "@/components/ExternalLink.tsx";
import { ProfileButton } from "@/components/Profile.tsx";
import { SignInButton } from "@/components/SignIn.tsx";
Expand Down
1 change: 1 addition & 0 deletions src/components/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function ProfileButton({ avatar, globalName, id, username }: ReturnType<t
height={24}
width={24}
unoptimized={Boolean(avatar)}
priority
/>

<p className="max-w-16 md:max-w-32 xl:max-w-56 truncate">{globalName ?? username}</p>
Expand Down
2 changes: 1 addition & 1 deletion theme.config.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "@/app/globals.css";

import faviconImg from "@/app/icon.png";
import logoSmallImg from "@/assets/logo-small.png";
import logoSmallImg from "@/assets/logo-small.webp";
import { Footer } from "@/components/Footer.tsx";
import { Discord } from "@/components/icons/Discord.tsx";
import { GitHub } from "@/components/icons/GitHub.tsx";
Expand Down

0 comments on commit 835f7d2

Please sign in to comment.