feat: support configs for light & dark logos

This commit is contained in:
javayhu 2025-04-05 13:30:19 +08:00
parent f5600631f7
commit 5953031bee
49 changed files with 76 additions and 61 deletions

View File

@ -434,7 +434,7 @@
}, },
"billing": { "billing": {
"title": "Billing", "title": "Billing",
"description": "Manage your billing information", "description": "Manage your subscription and billing details",
"status": { "status": {
"active": "Active", "active": "Active",
"trial": "Trial", "trial": "Trial",

View File

@ -145,7 +145,7 @@
"signInWithGitHub": "使用 GitHub 登录", "signInWithGitHub": "使用 GitHub 登录",
"showPassword": "显示密码", "showPassword": "显示密码",
"hidePassword": "隐藏密码", "hidePassword": "隐藏密码",
"or": "或" "or": "或"
}, },
"register": { "register": {
"title": "注册", "title": "注册",
@ -429,7 +429,7 @@
}, },
"billing": { "billing": {
"title": "账单", "title": "账单",
"description": "管理您的账单信息", "description": "管理您的订阅和账单信息",
"status": { "status": {
"active": "已激活", "active": "已激活",
"trial": "试用中", "trial": "试用中",

BIN
public/logo-dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 KiB

View File

@ -1,4 +1,4 @@
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { PropsWithChildren } from 'react'; import { PropsWithChildren } from 'react';
import '@/styles/mdx.css'; import '@/styles/mdx.css';

View File

@ -1,4 +1,4 @@
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { PropsWithChildren } from 'react'; import { PropsWithChildren } from 'react';
export default function PageLayout({ children }: PropsWithChildren) { export default function PageLayout({ children }: PropsWithChildren) {

View File

@ -1,5 +1,5 @@
import { BlogCategoryFilter } from '@/components/blog/blog-category-filter'; import { BlogCategoryFilter } from '@/components/blog/blog-category-filter';
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { HeaderSection } from '@/components/shared/header-section'; import { HeaderSection } from '@/components/shared/header-section';
import { PropsWithChildren } from 'react'; import { PropsWithChildren } from 'react';
import { allCategories } from 'content-collections'; import { allCategories } from 'content-collections';

View File

@ -1,4 +1,4 @@
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { PropsWithChildren } from 'react'; import { PropsWithChildren } from 'react';
export default function BlogPostLayout({ children }: PropsWithChildren) { export default function BlogPostLayout({ children }: PropsWithChildren) {

View File

@ -1,4 +1,4 @@
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { PricingTable } from '@/components/payment/pricing-table'; import { PricingTable } from '@/components/payment/pricing-table';
import { HeaderSection } from '@/components/shared/header-section'; import { HeaderSection } from '@/components/shared/header-section';
import { constructMetadata } from '@/lib/metadata'; import { constructMetadata } from '@/lib/metadata';

View File

@ -1,6 +1,6 @@
import { XTwitterIcon } from '@/components/icons/x'; import { XTwitterIcon } from '@/components/icons/x';
import { ModeSwitcher } from '@/components/layout/mode-switcher'; import { ModeSwitcher } from '@/components/layout/mode-switcher';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { websiteConfig } from '@/config'; import { websiteConfig } from '@/config';
import { LOCALE_LIST } from '@/i18n/routing'; import { LOCALE_LIST } from '@/i18n/routing';
import { docsI18nConfig } from '@/lib/docs/i18n'; import { docsI18nConfig } from '@/lib/docs/i18n';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { LocaleLink } from '@/i18n/navigation'; import { LocaleLink } from '@/i18n/navigation';
import { useTranslations } from 'next-intl'; import { useTranslations } from 'next-intl';

View File

@ -1,5 +1,5 @@
'use client'; 'use client';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Activity, Map as MapIcon, MessageCircle } from 'lucide-react'; import { Activity, Map as MapIcon, MessageCircle } from 'lucide-react';
import DottedMap from 'dotted-map'; import DottedMap from 'dotted-map';
import { Area, AreaChart, CartesianGrid } from 'recharts'; import { Area, AreaChart, CartesianGrid } from 'recharts';

View File

@ -3,7 +3,7 @@ import Link from 'next/link';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
const enterpriseLinks = [ const enterpriseLinks = [
{ href: '#', label: 'About' }, { href: '#', label: 'About' },

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import Link from 'next/link'; import Link from 'next/link';
const links = [ const links = [

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import Link from 'next/link'; import Link from 'next/link';
const links = [ const links = [

View File

@ -1,7 +1,7 @@
'use client'; 'use client';
import React from 'react'; import React from 'react';
import Link from 'next/link'; import Link from 'next/link';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { ArrowRight, Menu, Rocket, X } from 'lucide-react'; import { ArrowRight, Menu, Rocket, X } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import Image from 'next/image'; import Image from 'next/image';

View File

@ -1,5 +1,5 @@
'use client'; 'use client';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import Link from 'next/link'; import Link from 'next/link';
import { useState } from 'react'; import { useState } from 'react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';

View File

@ -8,7 +8,7 @@ import 'swiper/css/navigation';
import 'swiper/css/pagination'; import 'swiper/css/pagination';
import 'swiper/css/effect-coverflow'; import 'swiper/css/effect-coverflow';
import Link from 'next/link'; import Link from 'next/link';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { ArrowRight, Menu, Rocket, X } from 'lucide-react'; import { ArrowRight, Menu, Rocket, X } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';

View File

@ -1,5 +1,5 @@
'use client'; 'use client';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { ArrowRight, Mail, Menu, SendHorizonal, X } from 'lucide-react'; import { ArrowRight, Mail, Menu, SendHorizonal, X } from 'lucide-react';
import Image from 'next/image'; import Image from 'next/image';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';

View File

@ -1,4 +1,4 @@
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input'; import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label'; import { Label } from '@/components/ui/label';

View File

@ -1,7 +1,7 @@
'use client'; 'use client';
import { BottomLink } from '@/components/auth/bottom-link'; import { BottomLink } from '@/components/auth/bottom-link';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { import {
Card, Card,
CardContent, CardContent,

View File

@ -1,6 +1,6 @@
'use client'; 'use client';
import Link from 'next/link'; import Link from 'next/link';
import { Logo } from '../logo'; import { Logo } from '../shared/logo';
import { Menu, X } from 'lucide-react'; import { Menu, X } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import React from 'react'; import React from 'react';

View File

@ -1,6 +1,6 @@
'use client'; 'use client';
import Link from 'next/link'; import Link from 'next/link';
import { Logo } from '../logo'; import { Logo } from '../shared/logo';
import { Menu, X } from 'lucide-react'; import { Menu, X } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import React from 'react'; import React from 'react';

View File

@ -1,6 +1,6 @@
'use client'; 'use client';
import Link from 'next/link'; import Link from 'next/link';
import { Logo } from '../logo'; import { Logo } from '../shared/logo';
import { Menu, X } from 'lucide-react'; import { Menu, X } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import React from 'react'; import React from 'react';

View File

@ -1,6 +1,6 @@
'use client'; 'use client';
import Link from 'next/link'; import Link from 'next/link';
import { Logo } from '../logo'; import { Logo } from '../shared/logo';
import { Menu, X } from 'lucide-react'; import { Menu, X } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import React from 'react'; import React from 'react';

View File

@ -1,4 +1,4 @@
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { Category } from 'content-collections'; import { Category } from 'content-collections';
import { BlogCategoryListDesktop } from './blog-category-list-desktop'; import { BlogCategoryListDesktop } from './blog-category-list-desktop';
import { BlogCategoryListMobile } from './blog-category-list-mobile'; import { BlogCategoryListMobile } from './blog-category-list-mobile';

View File

@ -16,7 +16,7 @@ import { useCurrentUser } from '@/hooks/use-current-user';
import { LocaleLink } from '@/i18n/navigation'; import { LocaleLink } from '@/i18n/navigation';
import { useTranslations } from 'next-intl'; import { useTranslations } from 'next-intl';
import * as React from 'react'; import * as React from 'react';
import { Logo } from '../logo'; import { Logo } from '../shared/logo';
import { SidebarUpgradeCard } from './sidebar-upgrade-card'; import { SidebarUpgradeCard } from './sidebar-upgrade-card';
export function DashboardSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) { export function DashboardSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {

View File

@ -1,6 +1,6 @@
'use client'; 'use client';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { useLocaleRouter } from '@/i18n/navigation'; import { useLocaleRouter } from '@/i18n/navigation';
import { Loader2Icon } from 'lucide-react'; import { Loader2Icon } from 'lucide-react';

View File

@ -1,8 +1,8 @@
'use client'; 'use client';
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { ModeSwitcherHorizontal } from '@/components/layout/mode-switcher-horizontal'; import { ModeSwitcherHorizontal } from '@/components/layout/mode-switcher-horizontal';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import BuiltWithButton from '@/components/shared/built-with-button'; import BuiltWithButton from '@/components/shared/built-with-button';
import { getFooterLinks, getSocialLinks } from '@/config'; import { getFooterLinks, getSocialLinks } from '@/config';
import { LocaleLink } from '@/i18n/navigation'; import { LocaleLink } from '@/i18n/navigation';

View File

@ -2,7 +2,7 @@
import LocaleSelector from '@/components/layout/locale-selector'; import LocaleSelector from '@/components/layout/locale-selector';
import { ModeSwitcherHorizontal } from '@/components/layout/mode-switcher-horizontal'; import { ModeSwitcherHorizontal } from '@/components/layout/mode-switcher-horizontal';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button, buttonVariants } from '@/components/ui/button'; import { Button, buttonVariants } from '@/components/ui/button';
import { import {
Collapsible, Collapsible,

View File

@ -1,11 +1,11 @@
'use client'; 'use client';
import { LoginWrapper } from '@/components/auth/login-wrapper'; import { LoginWrapper } from '@/components/auth/login-wrapper';
import Container from '@/components/container'; import Container from '@/components/shared/container';
import { ModeSwitcher } from '@/components/layout/mode-switcher'; import { ModeSwitcher } from '@/components/layout/mode-switcher';
import { NavbarMobile } from '@/components/layout/navbar-mobile'; import { NavbarMobile } from '@/components/layout/navbar-mobile';
import { UserButton } from '@/components/layout/user-button'; import { UserButton } from '@/components/layout/user-button';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { import {
NavigationMenu, NavigationMenu,

View File

@ -1,15 +0,0 @@
import { cn } from '@/lib/utils';
import Image from 'next/image';
export function Logo({ className }: { className?: string }) {
return (
<Image
src="/logo.png"
alt="Logo"
title="Logo"
width={96}
height={96}
className={cn('size-8 rounded-md', className)}
/>
);
}

View File

@ -1,5 +1,5 @@
'use client'; 'use client';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Activity, Map as MapIcon, MessageCircle } from 'lucide-react'; import { Activity, Map as MapIcon, MessageCircle } from 'lucide-react';
import DottedMap from 'dotted-map'; import DottedMap from 'dotted-map';
import { Area, AreaChart, CartesianGrid } from 'recharts'; import { Area, AreaChart, CartesianGrid } from 'recharts';

View File

@ -1,5 +1,5 @@
'use client'; 'use client';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { ArrowRight, Mail, Menu, SendHorizonal, X } from 'lucide-react'; import { ArrowRight, Mail, Menu, SendHorizonal, X } from 'lucide-react';
import Image from 'next/image'; import Image from 'next/image';

View File

@ -8,7 +8,7 @@ import 'swiper/css/navigation';
import 'swiper/css/pagination'; import 'swiper/css/pagination';
import 'swiper/css/effect-coverflow'; import 'swiper/css/effect-coverflow';
import Link from 'next/link'; import Link from 'next/link';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import { ArrowRight, Menu, Rocket, X } from 'lucide-react'; import { ArrowRight, Menu, Rocket, X } from 'lucide-react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';

View File

@ -1,5 +1,5 @@
'use client'; 'use client';
import { Logo } from '@/components/logo'; import { Logo } from '@/components/shared/logo';
import Link from 'next/link'; import Link from 'next/link';
import { useState } from 'react'; import { useState } from 'react';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';

View File

@ -11,7 +11,7 @@ import { LocaleLink } from '@/i18n/navigation';
import { formatDate, formatPrice } from '@/lib/formatter'; import { formatDate, formatPrice } from '@/lib/formatter';
import { getAllPlans } from '@/payment'; import { getAllPlans } from '@/payment';
import { PlanIntervals, Subscription } from '@/payment/types'; import { PlanIntervals, Subscription } from '@/payment/types';
import { RefreshCwIcon, RocketIcon } from 'lucide-react'; import { RefreshCwIcon } from 'lucide-react';
import { useTranslations } from 'next-intl'; import { useTranslations } from 'next-intl';
import { useEffect, useMemo, useState } from 'react'; import { useEffect, useMemo, useState } from 'react';

View File

@ -1,7 +1,7 @@
import { buttonVariants } from '@/components/ui/button'; import { buttonVariants } from '@/components/ui/button';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
import Link from 'next/link'; import Link from 'next/link';
import { MkSaaSLogo } from '@/components/logo-mksaas'; import { MkSaaSLogo } from '@/components/shared/logo-mksaas';
export default function BuiltWithButton() { export default function BuiltWithButton() {
return ( return (

View File

@ -0,0 +1,22 @@
import { websiteConfig } from '@/config';
import { cn } from '@/lib/utils';
import { useTheme } from 'next-themes';
import Image from 'next/image';
export function Logo({ className }: { className?: string }) {
const theme = useTheme();
const logoLight = websiteConfig.logo.light ?? '/logo.png';
const logoDark = websiteConfig.logo.dark ?? '/logo-dark.png';
const logo = theme.theme === 'dark' ? logoDark : logoLight;
return (
<Image
src={logo}
alt="Logo"
title="Logo"
width={96}
height={96}
className={cn('size-8 rounded-md', className)}
/>
);
}

View File

@ -54,6 +54,10 @@ export const websiteConfig: WebsiteConfig = {
metadata: { metadata: {
image: '/og.png', image: '/og.png',
}, },
logo: {
light: '/logo.png',
dark: '/logo-dark.png',
},
mail: { mail: {
from: 'support@mksaas.com', from: 'support@mksaas.com',
to: 'support@mksaas.com', to: 'support@mksaas.com',
@ -64,9 +68,9 @@ export const websiteConfig: WebsiteConfig = {
}, },
social: { social: {
github: 'https://github.com/MkSaaSHQ', github: 'https://github.com/MkSaaSHQ',
twitter: 'https://x.com/MkSaaSHQ', twitter: 'https://x.com/mksaascom',
youtube: 'https://www.youtube.com/@MkSaaS',
blueSky: 'https://bsky.app/profile/mksaas.com', blueSky: 'https://bsky.app/profile/mksaas.com',
youtube: 'https://www.youtube.com/@MkSaaSHQ',
linkedin: 'https://linkedin.com/company/mksaas', linkedin: 'https://linkedin.com/company/mksaas',
facebook: 'https://facebook.com/mksaas', facebook: 'https://facebook.com/mksaas',
instagram: 'https://instagram.com/mksaas', instagram: 'https://instagram.com/mksaas',

View File

@ -8,6 +8,10 @@ export type WebsiteConfig = {
metadata: { metadata: {
image?: string; image?: string;
}; };
logo: {
light?: string;
dark?: string;
};
mail: { mail: {
from?: string; from?: string;
to?: string; to?: string;