Skip to content

Commit e9ebe3d

Browse files
committed
Started with integrating documentation
1 parent f1f6806 commit e9ebe3d

12 files changed

Lines changed: 71 additions & 5 deletions

File tree

app/docs/layout.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import '../index.css'
2+
import DocSidebar from "../../src/components/DocSidebar";
3+
4+
export default function({
5+
children,
6+
}: {
7+
children: React.ReactNode
8+
}) {
9+
return (<html lang="en">
10+
<head>
11+
<meta name="globalsign-domain-verification" content="9buOUAsm68lg97yJaT2W5IBeTkSrlGbOrsVwziHjIw"/>
12+
<title>Etherpad</title>
13+
<link rel="shortcut icon" href="favicon.ico"/>
14+
<meta name="google-site-verification" content="bVuuj6GwPO2TG1ZmB67XFvKxM0YSMrQIw5rYcG5RwVw"/>
15+
</head>
16+
<body>
17+
<div className="flex-row!">
18+
<DocSidebar/>
19+
<div id="root">{children}</div>
20+
</div>
21+
</body>
22+
</html>)
23+
}

app/docs/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default function Page () {
2+
return <div className="dark:bg-gray-800">
3+
4+
</div>
5+
}

app/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
--color-primary: #44b492;
77
--color-secondary: #f0f0f0;
88
--color-secondary-dark: rgba(15, 17, 17, 1);
9+
--color-accent: rgb(46, 46, 50);
910

1011
--radius-lg: var(--radius);
1112
--radius-md: calc(var(--radius) - 2px);

next.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
const nextConfig: import('next').NextConfig = {
33
output: 'export', // Outputs a Single-Page Application (SPA).
44
distDir: './dist', // Changes the build output directory to `./dist/`.
5+
images: {
6+
unoptimized: true
7+
},
58
rewrites: async () => {
69
return [
710
{

public/doc/v1.1.5/documentation.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ <h2>Table of Contents</h2>
1515
<ul>
1616
<li><a href="#documentation_about_this_documentation">About this Documentation</a></li>
1717
</ul>
18-
1918
</div>
2019

2120
<div id="apicontent">

src/Constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ export const PATH_TO_ISSUES = PATH_TO_GITHUB+"/issues"
1616

1717
export const DOC_PAGE = `/doc/v${CURRENT_VERSION}/index.html`
1818

19-
export const GITHUB_HELP = "https://help.github.com"
19+
export const GITHUB_HELP = "https://docs.github.com"
2020

2121
export const TRACKING_ID = 'UA-19303815-1'

src/components/DocSidebar.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import brandSvg from '../../public/favicon.ico';
2+
import Image from "next/image";
3+
import {Hr} from "@/components/Hr.tsx";
4+
import {TopHeading} from "@/components/TopHeading.tsx";
5+
import {SubHeading} from "@/components/SubHeading.tsx";
6+
7+
8+
export default function () {
9+
return (
10+
<div className="bg-gray-900 p-5 h-[100vh]">
11+
<div className="flex">
12+
<Image className="w-10" src={brandSvg} alt="Etherpad logo" />
13+
<div className="text-white mt-auto mb-auto ml-2">Etherpad Documentation</div>
14+
</div>
15+
<Hr/>
16+
<TopHeading>API</TopHeading>
17+
<SubHeading>Test</SubHeading>
18+
</div>
19+
)
20+
}

src/components/Hr.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const Hr = ()=>{
2+
return <div className="h-[1px] mt-4 bg-accent"></div>
3+
}

src/components/SubHeading.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from "react";
2+
import {clsx} from "clsx";
3+
4+
export const SubHeading = (props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>)=>{
5+
return <div className={clsx("text-gray-300", "pt-2")} {...props}/>
6+
}

src/components/TopHeading.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from "react";
2+
import {clsx} from "clsx";
3+
4+
export const TopHeading = (props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>)=>{
5+
return <div className={clsx("text-white")} {...props}/>
6+
}

0 commit comments

Comments
 (0)