-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlayout.tsx
More file actions
77 lines (72 loc) · 5.06 KB
/
layout.tsx
File metadata and controls
77 lines (72 loc) · 5.06 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
import { Footer, Layout, Navbar } from 'nextra-theme-docs'
import { Head } from 'nextra/components'
import { getPageMap } from 'nextra/page-map'
import { Inter } from 'next/font/google'
import 'nextra-theme-docs/style.css'
import './globals.css'
import type { Metadata } from 'next'
const inter = Inter({ subsets: ['latin'] })
export const metadata: Metadata = {
title: {
default: 'Ycode Documentation',
template: '%s | Ycode Docs'
},
description:
'Documentation for Ycode — the visual website builder. Available as open-source self-hosted or as Ycode Cloud at ycode.com. Build, manage, and deploy websites with a powerful drag-and-drop editor.',
openGraph: {
title: 'Ycode Documentation',
description:
'Documentation for Ycode — the visual website builder. Open source or Cloud.',
siteName: 'Ycode Docs',
type: 'website'
}
}
const navbar = (
<Navbar
logo={
<svg
width="91"
height="24"
viewBox="0 0 132 35"
fill="currentColor"
aria-label="Ycode"
role="img"
>
<path d="M15.161,0 L15.161,8.488 L7.339,13.01 L16.886,18.526 L32,9.781 L32,18.278 L3.528,34.752 L3.492,34.772 L3.453,34.747 L0,32.558 L0,24.285 L3.483,26.281 L9.442,22.833 L0,17.254 L0,8.771 L15.161,0 Z M44.789,33 L47.545,26.361 L41,10.234 L44.977,10.234 L49.392,22.008 L53.871,10.234 L57.754,10.234 L48.484,33 L44.789,33 Z M58.537,18.376 C58.537,15.975 59.299,13.955 60.823,12.316 C62.347,10.677 64.288,9.858 66.647,9.858 C68.881,9.858 70.661,10.49 71.986,11.753 C73.312,13.016 74.1,14.472 74.351,16.121 L70.53,16.121 C70.301,15.223 69.836,14.503 69.137,13.96 C68.437,13.418 67.597,13.146 66.616,13.146 C65.301,13.146 64.246,13.632 63.453,14.602 C62.66,15.573 62.263,16.831 62.263,18.376 C62.263,19.921 62.66,21.173 63.453,22.134 C64.246,23.094 65.301,23.574 66.616,23.574 C67.597,23.574 68.437,23.303 69.137,22.76 C69.836,22.217 70.301,21.497 70.53,20.599 L74.351,20.599 C74.1,22.248 73.312,23.705 71.986,24.968 C70.661,26.231 68.881,26.862 66.647,26.862 C64.288,26.862 62.347,26.043 60.823,24.404 C59.299,22.765 58.537,20.756 58.537,18.376 Z M84.685,26.862 C82.18,26.862 80.149,26.038 78.594,24.388 C77.039,22.739 76.261,20.735 76.261,18.376 C76.261,16.017 77.039,14.007 78.594,12.348 C80.149,10.688 82.18,9.858 84.685,9.858 C87.211,9.858 89.252,10.688 90.807,12.348 C92.362,14.007 93.14,16.017 93.14,18.376 C93.14,20.735 92.362,22.739 90.807,24.388 C89.252,26.038 87.211,26.862 84.685,26.862 Z M79.987,18.376 C79.987,19.921 80.431,21.173 81.318,22.134 C82.206,23.094 83.328,23.574 84.685,23.574 C86.063,23.574 87.195,23.094 88.082,22.134 C88.97,21.173 89.413,19.921 89.413,18.376 C89.413,16.81 88.97,15.547 88.082,14.587 C87.195,13.626 86.063,13.146 84.685,13.146 C83.328,13.146 82.206,13.626 81.318,14.587 C80.431,15.547 79.987,16.81 79.987,18.376 Z M108.234,12.363 L108.234,3 L111.96,3 L111.96,26.486 L108.516,26.486 L108.516,24.169 C107.409,25.965 105.582,26.862 103.035,26.862 C100.718,26.862 98.886,26.053 97.54,24.435 C96.193,22.817 95.52,20.798 95.52,18.376 C95.52,15.954 96.193,13.929 97.54,12.301 C98.886,10.672 100.718,9.858 103.035,9.858 C105.395,9.858 107.127,10.693 108.234,12.363 Z M108.39,18.376 C108.39,16.852 107.978,15.599 107.153,14.618 C106.329,13.637 105.217,13.146 103.818,13.146 C102.44,13.146 101.334,13.637 100.499,14.618 C99.664,15.599 99.246,16.852 99.246,18.376 C99.246,19.858 99.664,21.095 100.499,22.087 C101.334,23.078 102.44,23.574 103.818,23.574 C105.217,23.574 106.329,23.084 107.153,22.102 C107.978,21.121 108.39,19.879 108.39,18.376 Z M123.516,9.858 C125.896,9.858 127.821,10.657 129.293,12.254 C130.765,13.851 131.501,15.86 131.501,18.282 L131.47,19.441 L119.1,19.441 C119.246,20.735 119.716,21.763 120.509,22.525 C121.303,23.287 122.347,23.668 123.641,23.668 C124.497,23.668 125.269,23.459 125.958,23.042 C126.647,22.624 127.138,22.061 127.43,21.351 L131.188,21.351 C130.687,23 129.753,24.331 128.385,25.343 C127.018,26.356 125.405,26.862 123.547,26.862 C121.125,26.862 119.168,26.058 117.675,24.451 C116.183,22.843 115.436,20.808 115.436,18.344 C115.436,15.944 116.188,13.929 117.691,12.301 C119.194,10.672 121.136,9.858 123.516,9.858 Z M123.516,12.896 C122.347,12.896 121.376,13.24 120.603,13.929 C119.831,14.618 119.351,15.537 119.163,16.685 L127.806,16.685 C127.639,15.537 127.18,14.618 126.428,13.929 C125.676,13.24 124.706,12.896 123.516,12.896 Z" />
</svg>
}
projectLink="https://github.com/ycode/docs"
/>
)
const footer = (
<Footer>
<span style={{ fontSize: '0.75rem' }}>© {new Date().getFullYear()} Ycode</span>
</Footer>
)
export default async function RootLayout({
children
}: {
children: React.ReactNode
}) {
return (
<html lang="en" dir="ltr" suppressHydrationWarning>
<Head
color={{
hue: 211,
saturation: 100,
lightness: { light: 50, dark: 55 }
}}
/>
<body className={inter.className}>
<Layout
navbar={navbar}
footer={footer}
docsRepositoryBase="https://github.com/ycode/docs/tree/main"
pageMap={await getPageMap()}
>
{children}
</Layout>
</body>
</html>
)
}