2025-04-17 02:43:14 +02:00
|
|
|
import { PostHogProvider } from "@/components/PostHogProvider"
|
|
|
|
import { Footer } from "@/components/footer"
|
2025-04-17 02:43:32 +02:00
|
|
|
import { HeaderWrapper } from "@/components/header-wrapper"
|
2025-04-17 02:43:14 +02:00
|
|
|
import { LicenseNotice } from "@/components/license-notice"
|
2025-04-17 18:03:13 +02:00
|
|
|
import { getTotalIcons } from "@/lib/api"
|
2025-04-17 02:43:14 +02:00
|
|
|
import type { Metadata, Viewport } from "next"
|
|
|
|
import { Inter } from "next/font/google"
|
|
|
|
import { Toaster } from "sonner"
|
|
|
|
import "./globals.css"
|
2025-04-24 18:22:15 +02:00
|
|
|
import { BASE_URL, getDescription, WEB_URL, websiteTitle } from "@/constants"
|
2025-04-22 11:31:10 +02:00
|
|
|
import { ThemeProvider } from "./theme-provider"
|
2025-04-16 16:18:20 +02:00
|
|
|
|
|
|
|
const inter = Inter({
|
|
|
|
variable: "--font-inter",
|
|
|
|
subsets: ["latin"],
|
2025-04-17 02:43:14 +02:00
|
|
|
})
|
2025-04-16 16:18:20 +02:00
|
|
|
|
|
|
|
export const viewport: Viewport = {
|
|
|
|
width: "device-width",
|
|
|
|
initialScale: 1,
|
2025-04-17 02:43:14 +02:00
|
|
|
minimumScale: 1,
|
|
|
|
maximumScale: 5,
|
|
|
|
userScalable: true,
|
2025-04-16 16:18:20 +02:00
|
|
|
themeColor: "#ffffff",
|
2025-04-17 02:43:14 +02:00
|
|
|
viewportFit: "cover",
|
|
|
|
}
|
2025-04-16 16:18:20 +02:00
|
|
|
|
2025-04-16 22:51:23 +02:00
|
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
|
|
const { totalIcons } = await getTotalIcons()
|
|
|
|
|
|
|
|
return {
|
2025-04-24 18:22:15 +02:00
|
|
|
metadataBase: new URL(WEB_URL),
|
2025-04-18 12:39:37 +02:00
|
|
|
title: websiteTitle,
|
|
|
|
description: getDescription(totalIcons),
|
2025-04-17 02:43:14 +02:00
|
|
|
keywords: ["dashboard icons", "service icons", "application icons", "tool icons", "web dashboard", "app directory"],
|
2025-04-16 22:51:23 +02:00
|
|
|
robots: {
|
|
|
|
index: true,
|
|
|
|
follow: true,
|
|
|
|
googleBot: "index, follow",
|
2025-04-16 16:18:20 +02:00
|
|
|
},
|
2025-04-16 22:51:23 +02:00
|
|
|
openGraph: {
|
2025-04-24 18:22:15 +02:00
|
|
|
siteName: WEB_URL,
|
2025-04-18 12:39:37 +02:00
|
|
|
title: websiteTitle,
|
2025-04-24 18:22:15 +02:00
|
|
|
url: BASE_URL,
|
2025-04-18 12:39:37 +02:00
|
|
|
description: getDescription(totalIcons),
|
2025-04-16 22:51:23 +02:00
|
|
|
images: [
|
|
|
|
{
|
|
|
|
url: "/og-image.png",
|
|
|
|
width: 1200,
|
|
|
|
height: 630,
|
2025-04-24 18:22:15 +02:00
|
|
|
alt: "Dashboard Icons - Dashboard icons for self hosted services",
|
2025-04-16 22:51:23 +02:00
|
|
|
type: "image/png",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
twitter: {
|
|
|
|
card: "summary_large_image",
|
2025-04-24 18:22:15 +02:00
|
|
|
title: WEB_URL,
|
2025-04-18 12:39:37 +02:00
|
|
|
description: getDescription(totalIcons),
|
2025-04-16 22:51:23 +02:00
|
|
|
images: ["/og-image.png"],
|
|
|
|
},
|
2025-04-24 18:22:15 +02:00
|
|
|
applicationName: WEB_URL,
|
|
|
|
alternates: {
|
|
|
|
canonical: BASE_URL,
|
|
|
|
},
|
|
|
|
|
2025-04-16 22:51:23 +02:00
|
|
|
appleWebApp: {
|
|
|
|
title: "Dashboard Icons",
|
|
|
|
statusBarStyle: "default",
|
|
|
|
capable: true,
|
|
|
|
},
|
|
|
|
icons: {
|
|
|
|
icon: [
|
|
|
|
{ url: "/favicon.ico", sizes: "any" },
|
|
|
|
{ url: "/favicon-16x16.png", sizes: "16x16", type: "image/png" },
|
|
|
|
{ url: "/favicon-32x32.png", sizes: "32x32", type: "image/png" },
|
|
|
|
],
|
2025-04-17 02:43:14 +02:00
|
|
|
apple: [{ url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" }],
|
2025-04-16 22:51:23 +02:00
|
|
|
},
|
|
|
|
manifest: "/site.webmanifest",
|
|
|
|
}
|
|
|
|
}
|
2025-04-16 16:18:20 +02:00
|
|
|
|
2025-04-17 02:43:14 +02:00
|
|
|
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
2025-04-16 16:18:20 +02:00
|
|
|
return (
|
|
|
|
<html lang="en" suppressHydrationWarning>
|
2025-04-17 02:43:14 +02:00
|
|
|
<body className={`${inter.variable} antialiased bg-background flex flex-col min-h-screen`}>
|
2025-04-16 16:18:20 +02:00
|
|
|
<PostHogProvider>
|
2025-04-17 02:43:14 +02:00
|
|
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
2025-04-17 02:43:32 +02:00
|
|
|
<HeaderWrapper />
|
2025-04-17 02:43:14 +02:00
|
|
|
<main className="flex-grow">{children}</main>
|
|
|
|
<Footer />
|
2025-04-16 16:18:20 +02:00
|
|
|
<Toaster />
|
|
|
|
<LicenseNotice />
|
|
|
|
</ThemeProvider>
|
|
|
|
</PostHogProvider>
|
|
|
|
</body>
|
|
|
|
</html>
|
2025-04-17 02:43:14 +02:00
|
|
|
)
|
2025-04-16 16:18:20 +02:00
|
|
|
}
|