-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.config.tsx
More file actions
140 lines (136 loc) · 4.19 KB
/
theme.config.tsx
File metadata and controls
140 lines (136 loc) · 4.19 KB
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
import type { DocsThemeConfig } from "nextra-theme-docs";
import { useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
const logo = (
<>
<div className="flex flex-row align-middle justify-center">
<img className="h-12 w-auto rounded-md" src="/logo.png"></img>
<h1 className="text-2xl ml-2 font-bold inline-block" style={{lineHeight: "3rem"}}>AnyLabeling</h1>
</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/vietanhdev/anylabeling",
},
docsRepositoryBase: "https://github.com/vietanhdev/anylabeling-docs",
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== "/") {
return {
titleTemplate: "%s – AnyLabeling",
};
}
},
logo,
head: function useHead() {
const { title } = useConfig();
const { route } = useRouter();
const socialCard =
route === "/" || !title
? "https://anylearning.nrl.ai/og.jpeg"
: `https://anylearning.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="Effortless AI-assisted data labeling with AI support from Segment Anything and YOLO!"
/>
<meta
name="og:description"
content="Effortless AI-assisted data labeling with AI support from Segment Anything and YOLO!"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content={socialCard} />
<meta name="twitter:site:domain" content="anylearning.nrl.ai" />
<meta name="twitter:url" content="https://anylearning.nrl.ai" />
<meta
name="og:title"
content={title ? title + " – AnyLabeling" : "AnyLabeling"}
/>
<meta name="og:image" content={socialCard} />
<meta name="apple-mobile-web-app-title" content="AnyLabeling" />
<link rel="icon" href="/favicon.png" type="image/png" />
<link
rel="icon"
href="/favicon-dark.png"
type="image/png"
media="(prefers-color-scheme: light)"
/>
</>
);
},
banner: {
key: "anylearning-beta",
text: (
<a href="https://anylearning.nrl.ai" target="_blank" rel="noreferrer">
🎉 Use AnyLearning for both data labeling and model training! 🎉
</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://www.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">
Neural Research Lab
</span>
.
</div>
</a>
</div>
<p className="mt-2 text-xs">
© {new Date().getFullYear()} The AnyLabeling Project.
</p>
</div>
),
},
};
export default config;