Skip to content

Commit bf2a264

Browse files
Website for Theia Trace Extension documentation
Adds a website in the "doc" folder to hold the documentation for Theia Trace Extension. Website built with [Svelte Kit](https://kit.svelte.dev). This PR replaces eclipse-cdt-cloud#776, which accomplishes the same goal but uses GatsbyJS. The proposal to replace Gatsby with Svelte aims at reducing the code base and adopting more modern solutions for the problem of rendering static documentation sites. Signed-off-by: Rodrigo Pinto ([email protected])
1 parent 0e40ac1 commit bf2a264

File tree

15 files changed

+1331
-0
lines changed

15 files changed

+1331
-0
lines changed

doc/web-doc/.eslintignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

doc/web-doc/.eslintrc.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['eslint:recommended', 'prettier'],
4+
plugins: ['svelte3'],
5+
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
6+
parserOptions: {
7+
sourceType: 'module',
8+
ecmaVersion: 2020
9+
},
10+
env: {
11+
browser: true,
12+
es2017: true,
13+
node: true
14+
}
15+
};

doc/web-doc/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
vite.config.js.timestamp-*
10+
vite.config.ts.timestamp-*

doc/web-doc/.prettierignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

doc/web-doc/.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"pluginSearchDirs": ["."],
8+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
9+
}

doc/web-doc/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Documentation framework for Theia Trace Extension
2+
3+
## Installation
4+
5+
Requirements: NodeJS version 16 or above.
6+
7+
```bash
8+
cd doc/web-doc
9+
yarn
10+
```
11+
12+
Run site
13+
14+
```bash
15+
yarn dev
16+
17+
# or start the server and open the app in a new browser tab
18+
yarn dev --open
19+
```
20+
21+
The site will be running at `http://localhost:5173`.
22+
23+
## Code style
24+
25+
Run Prettier from the root.
26+
27+
Check code style:
28+
29+
yarn lint
30+
31+
Fix code style:
32+
33+
yarn format
34+
35+
## Development
36+
37+
Website created with [SvelteKit](https://kit.svelte.dev)

doc/web-doc/package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "web-doc",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"lint": "prettier --plugin-search-dir . --check . && eslint .",
10+
"format": "prettier --plugin-search-dir . --write ."
11+
},
12+
"devDependencies": {
13+
"@sveltejs/adapter-auto": "^1.0.0",
14+
"@sveltejs/kit": "^1.0.0",
15+
"eslint": "^8.28.0",
16+
"eslint-config-prettier": "^8.5.0",
17+
"eslint-plugin-svelte3": "^4.0.0",
18+
"prettier": "^2.8.0",
19+
"prettier-plugin-svelte": "^2.8.1",
20+
"svelte": "^3.54.0",
21+
"vite": "^4.0.0"
22+
},
23+
"type": "module"
24+
}

doc/web-doc/src/app.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6+
<meta name="viewport" content="width=device-width" />
7+
%sveltekit.head%
8+
</head>
9+
<body data-sveltekit-preload-data="hover">
10+
<div style="display: contents">%sveltekit.body%</div>
11+
</body>
12+
</html>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<script>
2+
import Header from '$lib/components/Header.svelte';
3+
import Sidebar from '$lib/components/Sidebar.svelte';
4+
</script>
5+
6+
<div class="app">
7+
<Header />
8+
9+
<main>
10+
<div class="content">
11+
<Sidebar />
12+
<div class="inner-page">
13+
<slot />
14+
</div>
15+
</div>
16+
</main>
17+
18+
<footer>
19+
<p>
20+
<a href="https://github.com/eclipse-cdt-cloud/theia-trace-extension">Theia Trace Extension</a>
21+
</p>
22+
</footer>
23+
</div>
24+
25+
<style>
26+
.app {
27+
display: flex;
28+
flex-direction: column;
29+
min-height: 100vh;
30+
}
31+
32+
.content {
33+
flex: 1;
34+
display: flex;
35+
flex-direction: row;
36+
}
37+
38+
main {
39+
flex: 1;
40+
display: flex;
41+
flex-direction: column;
42+
padding: 1rem;
43+
width: 100%;
44+
max-width: 64rem;
45+
margin: 0 auto;
46+
box-sizing: border-box;
47+
}
48+
49+
.inner-page {
50+
flex: 1;
51+
display: flex;
52+
flex-direction: column;
53+
}
54+
55+
footer {
56+
display: flex;
57+
flex-direction: column;
58+
justify-content: center;
59+
align-items: center;
60+
padding: 12px;
61+
}
62+
63+
footer a {
64+
font-weight: bold;
65+
}
66+
67+
@media (min-width: 480px) {
68+
footer {
69+
padding: 12px 0;
70+
}
71+
}
72+
</style>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<script>
2+
import tteImage from '$lib/images/theia-trace-extension-0.0.3.png';
3+
</script>
4+
5+
<div class="content">
6+
<h1>Welcome to Theia Trace Extension</h1>
7+
<img src={tteImage} alt="Trace Compass" />
8+
</div>
9+
10+
<style>
11+
.content {
12+
text-align: center;
13+
}
14+
15+
img {
16+
width: 40em;
17+
}
18+
</style>

0 commit comments

Comments
 (0)