-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy paththeme.config.tsx
More file actions
162 lines (154 loc) · 4.29 KB
/
theme.config.tsx
File metadata and controls
162 lines (154 loc) · 4.29 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
import { flex, hstack } from '@onbeam/business-styled-system/patterns';
import { useCookieConsentStore } from '@onbeam/utils';
import { DocsThemeConfig } from 'nextra-theme-docs';
import { useConfig } from 'nextra-theme-docs';
import { BeamIcon } from './components/beam-icons';
import { token } from '@onbeam/business-styled-system/tokens';
const linkStyle = flex({
position: 'relative',
align: 'center',
truncate: true,
_before: {
content: '""',
position: 'absolute',
bottom: '[3px]',
left: '0',
w: '[0]',
h: '[1px]',
bgColor: '[currentColor]',
transitionProperty: 'width',
transitionDuration: '[250ms]',
transitionTimingFunction: 'ease',
},
_supportsHover: {
_hover: {
_before: {
w: 'full',
},
},
},
_focusActive: {
_before: {
w: 'full',
},
},
});
const config: DocsThemeConfig = {
logo: BeamIcon,
project: {
link: 'https://github.com/BuildOnBeam/beam-docs',
},
docsRepositoryBase: 'https://github.com/BuildOnBeam/beam-docs/tree/main',
head: () => {
const config = useConfig();
const title = config.frontMatter.title || config.title;
const ogTitle = `${
title ? title : 'Hello Beam!'
} | Beam Docs: Your Gateway to Web3 Frontier Tech Development`;
const ogDescription =
config.frontMatter.description ||
"Discover Beam's SDK and developer resources for Web3. Access API docs, tutorials, and integration guides for building with Beam.";
const ogImage = 'https://docs.onbeam.com/opengraph-image.png';
return (
<>
{/* Favicons, meta */}
<link
rel="apple-touch-icon"
sizes="180x180"
href="/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon-16x16.png"
/>
{/* <link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg" /> */}
<link rel="manifest" href="/site.webmanifest" />
{/* <link
rel="mask-icon"
href="/favicon/safari-pinned-tab.svg"
color="#000000"
/> */}
<title>{ogTitle}</title>
<meta httpEquiv="Content-Language" content="en-US" />
<meta name="msapplication-TileColor" content="#000000" />
<meta name="apple-mobile-web-app-title" content="Beam" />
<meta name="description" content={ogDescription} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@buildonbeam" />
<meta name="twitter:image" content={ogImage} />
<meta property="og:title" content={ogTitle} />
<meta property="og:description" content={ogDescription} />
<meta property="og:image" content={ogImage} />
<meta property="og:locale" content="en_US" />
</>
);
},
footer: {
component: () => {
const open = useCookieConsentStore((store) => store.openConsentModal);
return (
<footer
className={hstack({
align: 'center',
gap: '4',
px: '4',
py: '4',
textStyle: 'body-sm',
color: 'mono.tertiary',
})}
>
<span>GPL v.3.0 {new Date().getFullYear()} © Beam</span>
<a
href="https://onbeam.com/terms"
target="_blank"
rel="noopener noreferrer"
className={linkStyle}
>
Terms of Use
</a>
<a
href="https://onbeam.com/privacy-policy"
target="_blank"
rel="noopener noreferrer"
className={linkStyle}
>
Privacy Policy
</a>
<button type="button" className={linkStyle} onClick={open}>
Cookies
</button>
</footer>
);
},
},
sidebar: {
defaultMenuCollapseLevel: 1,
},
color: {
hue: 0,
saturation: 0,
lightness: {
light: 50,
dark: 100,
},
},
backgroundColor: {
light: token('colors.mono.primaryFg'),
dark: token('colors.mono.primaryFg'),
},
feedback: {
content: null,
},
nextThemes: {
defaultTheme: 'light',
},
};
export default config;