diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9757f6f2..635c12d9 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,12 +1,12 @@ import "@/styles/global.css"; import AdminLink from "@/components/ui/admin-link"; import { TailwindIndicator } from "@/components/ui/tailwind-indicator"; -import { ThemeSelector } from "@/components/ui/theme-selector"; import settings from "@/content/settings/config.json"; import client from "@/tina/__generated__/client"; import { ThemeProvider } from "next-themes"; import { Inter, Roboto_Flex } from "next/font/google"; +import { Footer } from "@/components/docs/footer"; import { TabsLayout } from "@/components/docs/layout/tab-layout"; import type React from "react"; import { TinaClient } from "./tina-client"; @@ -19,7 +19,7 @@ const heading = Roboto_Flex({ variable: "--heading-font", }); -const isThemeSelectorEnabled = +export const isThemeSelectorEnabled = process.env.NODE_ENV === "development" || process.env.NEXT_PUBLIC_ENABLE_THEME_SELECTION === "true"; @@ -44,7 +44,6 @@ export default function RootLayout({ enableSystem={true} disableTransitionOnChange={false} > - {isThemeSelectorEnabled && } {children} @@ -60,6 +59,7 @@ const Content = ({ children }: { children?: React.ReactNode }) => (
{children}
+
); diff --git a/src/components/docs/footer.tsx b/src/components/docs/footer.tsx new file mode 100644 index 00000000..5d85c49f --- /dev/null +++ b/src/components/docs/footer.tsx @@ -0,0 +1,33 @@ +import { isThemeSelectorEnabled } from "@/app/layout"; +import { ThemeSelector } from "@/components/ui/theme-selector"; +import Image from "next/image"; +import Link from "next/link"; + +export const Footer = () => { + return ( +
+
+ + Tina Logo + + Powered by TinaCMS + + +
+ {isThemeSelectorEnabled && } +
+
+
+ ); +}; diff --git a/src/components/ui/theme-selector.tsx b/src/components/ui/theme-selector.tsx index 94f76a11..5a032940 100644 --- a/src/components/ui/theme-selector.tsx +++ b/src/components/ui/theme-selector.tsx @@ -91,7 +91,7 @@ export const ThemeSelector = () => { }; return ( -
+