fix: dark mode logo variants + increase logo size to 40px
This commit is contained in:
@@ -38,7 +38,7 @@ export const COMPANIES: Record<CompanyId, Company> = {
|
|||||||
city: "Cluj-Napoca",
|
city: "Cluj-Napoca",
|
||||||
logo: {
|
logo: {
|
||||||
light: "/logos/logo-us-light.svg",
|
light: "/logos/logo-us-light.svg",
|
||||||
dark: "/logos/logo-us-light.svg",
|
dark: "/logos/logo-us-dark.svg",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"studii-de-teren": {
|
"studii-de-teren": {
|
||||||
@@ -51,7 +51,7 @@ export const COMPANIES: Record<CompanyId, Company> = {
|
|||||||
city: "Cluj-Napoca",
|
city: "Cluj-Napoca",
|
||||||
logo: {
|
logo: {
|
||||||
light: "/logos/logo-sdt-light.svg",
|
light: "/logos/logo-sdt-light.svg",
|
||||||
dark: "/logos/logo-sdt-light.svg",
|
dark: "/logos/logo-sdt-dark.svg",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
group: {
|
group: {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import Image from "next/image";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { usePathname } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
import { useMemo, useState, useCallback, useEffect } from "react";
|
import { useMemo, useState, useCallback, useEffect } from "react";
|
||||||
|
import { useTheme } from "next-themes";
|
||||||
import * as Icons from "lucide-react";
|
import * as Icons from "lucide-react";
|
||||||
import { buildNavigation } from "@/config/navigation";
|
import { buildNavigation } from "@/config/navigation";
|
||||||
import { COMPANIES } from "@/config/companies";
|
import { COMPANIES } from "@/config/companies";
|
||||||
@@ -85,6 +86,7 @@ function SidebarLogos() {
|
|||||||
const [animatingId, setAnimatingId] = useState<string | null>(null);
|
const [animatingId, setAnimatingId] = useState<string | null>(null);
|
||||||
const [comboProgress, setComboProgress] = useState(0);
|
const [comboProgress, setComboProgress] = useState(0);
|
||||||
const [showConfetti, setShowConfetti] = useState(false);
|
const [showConfetti, setShowConfetti] = useState(false);
|
||||||
|
const { resolvedTheme } = useTheme();
|
||||||
|
|
||||||
// Reset combo after 3 seconds of inactivity
|
// Reset combo after 3 seconds of inactivity
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -128,10 +130,13 @@ function SidebarLogos() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative flex items-center gap-1">
|
<div className="relative flex items-center gap-1.5">
|
||||||
{LOGO_COMPANIES.map((companyId, index) => {
|
{LOGO_COMPANIES.map((companyId, index) => {
|
||||||
const company = COMPANIES[companyId];
|
const company = COMPANIES[companyId];
|
||||||
const logoSrc = company?.logo?.light;
|
const logoSrc =
|
||||||
|
resolvedTheme === "dark"
|
||||||
|
? (company?.logo?.dark ?? company?.logo?.light)
|
||||||
|
: company?.logo?.light;
|
||||||
if (!logoSrc) return null;
|
if (!logoSrc) return null;
|
||||||
const isAnimating = animatingId === companyId;
|
const isAnimating = animatingId === companyId;
|
||||||
const animation = isAnimating
|
const animation = isAnimating
|
||||||
@@ -154,9 +159,9 @@ function SidebarLogos() {
|
|||||||
<Image
|
<Image
|
||||||
src={logoSrc}
|
src={logoSrc}
|
||||||
alt={company.shortName}
|
alt={company.shortName}
|
||||||
width={32}
|
width={40}
|
||||||
height={32}
|
height={40}
|
||||||
className="h-8 w-8 object-contain"
|
className="h-10 w-10 object-contain"
|
||||||
suppressHydrationWarning
|
suppressHydrationWarning
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user