forked from aiken-lang/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
184 lines (182 loc) · 6.22 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import { useTheme } from "next-themes";
import blazeLogo from './public/blaze_white.webp';
const config: DocsThemeConfig = {
// Ideally, we'd simply use a <picture> + <source media="(prefers-color-scheme: ...)"/>,
// but next-themes which handles theme changes isn't handling those properly.
//
// I have no interest in fixing next-themes right now, so going the hacky way.
logo: () => {
const { resolvedTheme } = useTheme();
return (
<>
<img
style={{ height: "var(--nextra-navbar-height)" }}
src={
blazeLogo.src
}
/>
</>
);
},
head: (
<>
<link rel="icon" type="image/svg+xml" sizes="any" href="/icon.png"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Expletus+Sans:wght@700&display=swap" />
<meta name="twitter:image" content="https://aiken-lang.org/open-graph.png" />
<meta name="twitter:site:domain" content="aiken-lang.org" />
<style>{`
.nextra-nav-container > nav > a:nth-child(3) > span {
background-image: linear-gradient(90deg, black 0%, black 90%, #ab31e4 86%, #620df8 92%, #ab31e4 96%);
background-repeat: repeat;
background-clip: text;
-webkit-background-clip: text;
background-size: 200% auto;
color: transparent;
animation: textclip 5s linear infinite;
}
html[class~="dark"] .nextra-nav-container > nav > a:nth-child(3) > span {
background-image: linear-gradient(90deg, rgba(243,244,246) 0%, rgba(243,244,246) 90%, #ab31e4 86%, #620df8 92%, #ab31e4 96%);
}
@keyframes textclip {
0% { background-position: 0% center; }
30% { background-position: 200% center; }
100% { background-position: 200% center; }
}`}</style>
</>
),
project: {
link: "https://github.com/aiken-lang/aiken",
},
chat: {
link: "https://discord.gg/Vc3x8N9nz2",
},
toc: {
extraContent: <></>,
},
i18n: [
{
locale: "en",
text: "English",
},
],
docsRepositoryBase: "https://github.com/aiken-lang/site/blob/main",
useNextSeoProps() {
const { title } = useConfig();
const description = "A modern smart contract platform for Cardano";
return {
titleTemplate: "Blaze | %s",
description,
canonical: "https://aiken-lang.org/",
openGraph: {
url: "https://aiken-lang.org/",
description,
images: [
{
url: "https://aiken-lang.org/open-graph.png",
width: 800,
height: 418,
alt: "Blaze - A modern smart contract platform for Cardano",
type: "image/png",
},
],
},
siteName: "Blaze",
twitter: {
handle: "@butaneprotcool",
site: "https://aiken-lang.org",
cardType: "summary_large_image",
},
};
},
footer: {
component: (<>
<footer>
<aside>
<img
src={
blazeLogo.src
}
/>
<p>The practical Cardano SDK</p>
</aside>
<nav>
<h2><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> Quick Links</h2>
<ul>
<li><a href="https://aiken-lang.github.io/prelude">Prelude</a></li>
<li><a href="https://aiken-lang.github.io/stdlib">Standard library</a></li>
<li><a href="https://play.aiken-lang.org">Playground</a></li>
</ul>
</nav>
<nav>
<h2><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>Community</h2>
<ul>
<li><a href="https://discord.gg/Vc3x8N9nz2">Discord</a></li>
<li><a href="https://twitter.com/butaneprotocol">Twitter</a></li>
</ul>
</nav>
<nav>
<h2><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>Brought to you by</h2>
<ul>
<li><a href="https://butane.dev">Butane</a></li>
</ul>
</nav>
</footer>
<style jsx>{`
footer {
background: #000000;
color: #FFFFFF;
display: flex;
justify-content: space-between;
margin: 0 auto;
padding: 2rem 12.5vw;
}
footer aside {
display: flex;
flex-direction: column;
font-variant: small-caps;
font-size: 0.75em;
}
footer aside p {
padding: 0 0.15rem;
}
footer aside img {
width: 4rem;
height: auto;
}
@media(max-width: 1000px) {
footer {
padding: 2rem 5%;
}
}
@media(max-width: 600px) {
footer {
flex-direction: column;
}
footer aside + nav,
footer nav + nav {
margin-top: 1rem;
}
}
footer nav {
display: flex;
flex-direction: column;
}
footer nav h2 {
font-weight: bold;
display: flex;
margin-bottom: 0.35rem;
}
footer nav h2 > svg {
width: 1em;
height: auto;
margin-right: 0.5rem;
}
footer nav ul {
font-size: 0.9em;
}
`}</style>
</>)
}
};
export default config;