-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy paththeme.config.tsx
148 lines (129 loc) · 3.98 KB
/
theme.config.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import React, { useEffect, useState } from "react";
import { DocsThemeConfig, Navbar, ThemeSwitch } from "nextra-theme-docs";
import Footer from "@/components/layout/Footer";
import { useTheme } from "nextra-theme-docs";
import { FaGithub, FaXTwitter } from "react-icons/fa6";
import Image from "next/image";
const config: DocsThemeConfig = {
logo: () => {
const { theme } = useTheme();
const [currentTheme, setCurrentTheme] = useState<string | undefined>("");
useEffect(() => {
const matchMedia = window.matchMedia('(prefers-color-scheme: dark)');
const updateTheme = () => {
if (theme === 'system') {
setCurrentTheme(matchMedia.matches ? 'dark' : 'light');
} else {
setCurrentTheme(theme);
}
};
updateTheme();
matchMedia.addEventListener('change', updateTheme);
return () => {
matchMedia.removeEventListener('change', updateTheme);
}
}, [theme]);
if (!currentTheme) {
return null; // or a loading spinner or placeholder
}
return (
<>
{currentTheme === "light" ? (
<Image
className="w-auto h-8"
src="/logo-light.png"
alt="Logo Light"
height={200}
width={200}
/>
) : (
<Image
className="w-auto h-8"
src="/logo-dark.png"
alt="Logo Dark"
height={200}
width={200}
/>
)}
</>
);
},
project: {
link: "https://github.com/Shubham0850/auraui/",
icon: (
<FaGithub className="h-4 text-[#111111] dark:text-gray-400 hover:text-gray-900 dark:hover:text-white transition-all" />
),
},
chat: {
link: "https://x.com/aura__ui",
icon: (
<FaXTwitter className="h-4 text-[#111111] dark:text-gray-400 hover:text-gray-900 dark:hover:text-white transition-all" />
),
},
head: (
<>
<title>AuraUI: Effortlessly Build High-Performance Websites</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Nextra" />
<meta
property="og:title"
content=" AuraUI | Build Stunning React Websites Fast with Tailwind & Next.js"
/>
<meta
property="og:description"
content="Build stunning, high-performance websites with AuraUI's open-source components. Fully customizable and integrated with Next.js and Tailwind CSS."
/>
<meta property="og:image" content="https://www.auraui.com/banner.png" />{" "}
{/* Add the correct path to your image */}
<meta property="og:url" content="https://auraui.com" />
<meta property="og:type" content="website" />
{/* Twitter Meta Tags */}
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:title"
content="AuraUI | Build Stunning React Websites Fast with Tailwind & Next.j"
/>
<meta
name="twitter:description"
content="Build stunning, high-performance websites with AuraUI's open-source components. Fully customizable and integrated with Next.js and Tailwind CSS."
/>
{/* Additional SEO tags */}
<meta
name="keywords"
content="AuraUI, open-source, component library, Next.js, Tailwind CSS, Web Development,React, Frontend development"
/>
<meta name="author" content="AuraUI Team" />
<link rel="canonical" href="https://auraui.com" />
<link rel="icon" href="/ico.png" />
</>
),
navbar: {
extraContent: ThemeSwitch,
},
// banner: {
// text: "It is in Beta ",
// dismissible: false,
// key: "4",
// },
editLink: {
component: null,
},
feedback: {
content: null,
},
primarySaturation: { dark: 0, light: 0 },
sidebar: {
autoCollapse: false,
defaultMenuCollapseLevel: 1,
},
gitTimestamp: null,
footer: {
text: <Footer />,
},
useNextSeoProps() {
return {
titleTemplate: "AuraUI",
};
},
};
export default config;