forked from icon-project/xcall.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
132 lines (122 loc) · 4.01 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
import React from 'react'
import { DocsThemeConfig, useConfig, useTheme } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
import Image from 'next/image'
const config: DocsThemeConfig = {
project: {
link: 'https://github.com/icon-project/xcall.dev'
},
chat: {
link: 'https://icon.community/icondiscord/'
},
docsRepositoryBase: 'https://github.com/icon-project/xcall.dev/tree/main/',
useNextSeoProps() {
const { asPath } = useRouter()
if (asPath !== '/') {
return {
titleTemplate: '%s – xCall Documentation'
}
} else {
return {
title: 'Welcome - xCall Documentation',
}
}
},
gitTimestamp: () => {
const { frontMatter } = useConfig();
return (
<div>
{/* Keeping this empty on purpose */}
{/* Last updated on: {frontMatter.gitTimestamp} */}
</div>
);
},
primaryHue: {
dark: 182,
light: 182,
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter()
const { title } = useConfig()
return (
<>
<link rel="icon" type="image/png" href="/images/xcall-favicon.ico" />
<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="A cross-chain messaging interface deployable on any protocol"
/>
<meta
name="og:description"
content="A cross-chain messaging interface deployable on any protocol"
/>
<meta property="twitter:title" content={title && title !== 'Index' ? title + ' – xCall' : ''}></meta>
<meta property="twitter:description" content="A cross-chain messaging interface deployable on any protocol"></meta>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="/images/link-preview.jpg" />
<meta name="twitter:site:domain" content="xcall.dev" />
<meta name="twitter:url" content="https://xcall.dev" />
<meta
name="og:title"
content={title && title !== 'Index' ? title + ' – xCall' : ''}
/>
<meta name="og:image" content="/images/link-preview.jpg" />
<meta property="og:url" content="https://xcall.dev"></meta>
<meta name="apple-mobile-web-app-title" content="xCall" />
</>
)
},
editLink: {
text: 'Contribute to this page →'
},
feedback: {
content: 'Question? Give us feedback →',
labels: 'feedback'
},
logo: () => {
return (
<Image src='/images/xcall.svg' height='50' width='100' alt={'xCall logo'} />
)
},
sidebar: {
titleComponent({ title, type }) {
if (type === 'separator') {
return <span className="cursor-default">{title}</span>
}
return <>{title}</>
},
defaultMenuCollapseLevel: 1,
toggleButton: true
},
banner: {
key: 'banner-2',
text: <span><a href="https://iconfoundation.notion.site/Testnet-Challenges-bc1b7de910894307970841d64ea9548f" className='inline-block underline'>🟢 LIVE NOW - Earn ICX token rewards with xCall Incentivized Testnet Challenges →</a></span>
},
navigation: {
prev: true,
next: true
},
footer: {
text: (
<div className="relative z-40 flex flex-col items-center w-full sm:items-start">
<div>
<a
className="flex items-center gap-1 text-current"
target="_blank"
rel="noopener noreferrer"
title="icon.foundation homepage"
href="https://www.icon.foundation/"
>
<Image className='mx-auto' src='/images/icon-foundation-logo.svg' height='50' width='120' alt={'ICON logo'} />
</a>
</div>
<span className='py-2 mx-auto text-[6px]'>© ICON Foundation 2023</span>
</div>
)
},
faviconGlyph: '🌐',
}
export default config