-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
150 lines (146 loc) · 4.42 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
149
150
import type { DocsThemeConfig } from "nextra-theme-docs";
import { useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
const logo = (
<>
<div className="flex flex-col">
<img className="h-9 w-auto dark:hidden" src="/logo_with_text.svg"></img>
<img
className="h-9 w-auto hidden dark:block"
src="/logo_with_text_light.svg"
></img>
</div>
<style jsx>{`
span {
padding: 0.5rem 0.5rem 0.5rem 0;
mask-image: linear-gradient(
60deg,
black 25%,
rgba(0, 0, 0, 0.2) 50%,
black 75%
);
mask-size: 400%;
mask-position: 0%;
}
span:hover {
mask-position: 100%;
transition: mask-position 1s ease, -webkit-mask-position 1s ease;
}
`}</style>
</>
);
const config: DocsThemeConfig = {
project: {
link: "https://github.com/nrl-ai/daisykit",
},
docsRepositoryBase: "https://github.com/nrl-ai/daisykit-docs",
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== "/") {
return {
titleTemplate: "%s – Daisykit",
};
}
},
logo,
head: function useHead() {
const { title } = useConfig();
const { route } = useRouter();
const socialCard =
route === "/" || !title
? "https://daisykit.nrl.ai/og.jpeg"
: `https://daisykit.nrl.ai/api/og?title=${title}`;
return (
<>
<meta name="msapplication-TileColor" content="#fff" />
<meta name="theme-color" content="#fff" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta httpEquiv="Content-Language" content="en" />
<meta
name="description"
content="An easy AI toolkit with face mask detection, pose detection, background matting, barcode detection and more."
/>
<meta
name="og:description"
content="An easy AI toolkit with face mask detection, pose detection, background matting, barcode detection and more."
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content={socialCard} />
<meta name="twitter:site:domain" content="nextra.site" />
<meta name="twitter:url" content="https://nextra.site" />
<meta
name="og:title"
content={title ? title + " – Nextra" : "Nextra"}
/>
<meta name="og:image" content={socialCard} />
<meta name="apple-mobile-web-app-title" content="Nextra" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.png" type="image/png" />
<link
rel="icon"
href="/favicon-dark.svg"
type="image/svg+xml"
media="(prefers-color-scheme: light)"
/>
<link
rel="icon"
href="/favicon-dark.png"
type="image/png"
media="(prefers-color-scheme: light)"
/>
</>
);
},
banner: {
key: "daisykit-releases",
text: (
<a href="https://github.com/nrl-ai/daisykit/releases" target="_blank" rel="noreferrer">
🎉 DaisyKit v0.3.0.5 has been released with bugfixes for macOS 🎉
</a>
),
},
editLink: {
text: "Edit this page on GitHub →",
},
feedback: {
content: "Question? Give us feedback →",
labels: "feedback",
},
sidebar: {
titleComponent({ title, type }) {
if (type === "separator") {
return <span className="cursor-default">{title}</span>;
}
return <>{title}</>;
},
defaultMenuCollapseLevel: 2,
toggleButton: true,
},
footer: {
text: (
<div className="flex w-full flex-col items-center sm:items-start">
<div>
<a
className="flex items-center gap-1 text-current"
target="_blank"
rel="noopener noreferrer"
title="Neural Research Lab Website"
href="https://nrl.ai"
>
<div className="pt-0 mt-0">
Developed by{" "}
<span className="font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-purple-600 to-pink-600 text-bold">
NeuralResearchLab
</span>
.
</div>
</a>
</div>
<p className="mt-2 text-xs">
© {new Date().getFullYear()} The Daisykit Project.
</p>
</div>
),
},
};
export default config;