Skip to content

Commit 9af528b

Browse files
committed
setting up docs
1 parent c1d7700 commit 9af528b

File tree

18 files changed

+241
-97
lines changed

18 files changed

+241
-97
lines changed

.prettierrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@
44
"tabWidth": 2,
55
"printWidth": 120,
66
"plugins": ["prettier-plugin-organize-imports"],
7-
"htmlWhitespaceSensitivity": "ignore"
7+
"htmlWhitespaceSensitivity": "ignore",
8+
"overrides": [
9+
{
10+
"files": "*.analog",
11+
"options": {
12+
"parser": "angular"
13+
}
14+
}
15+
]
816
}

.ws-context

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"framework": "angular",
3+
"angular-template-syntax": "V_17",
4+
"apps/**/*.analog": {
5+
"framework": "angular",
6+
"angular-template-syntax": "V_17"
7+
}
8+
}
9+

apps/docs/index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>MyApp</title>
5+
<title>Angular Three</title>
66
<base href="/" />
77
<meta name="viewport" content="width=device-width, initial-scale=1" />
88
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
99
<link rel="stylesheet" href="/src/styles.css" />
10+
<link rel="preconnect" href="https://fonts.googleapis.com" />
11+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
12+
<link
13+
href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap"
14+
rel="stylesheet"
15+
/>
1016
</head>
1117
<body>
1218
<docs-root></docs-root>

apps/docs/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"type": "module"
2+
"type": "module",
3+
"web-types": [
4+
"../../node_modules/angular-three/web-types.json",
5+
"../../node_modules/angular-three-soba/web-types.json"
6+
]
37
}

apps/docs/public/ngt-logo.svg

Lines changed: 12 additions & 0 deletions
Loading

apps/docs/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { RouterOutlet } from '@angular/router';
66
standalone: true,
77
imports: [RouterOutlet],
88
template: `
9-
<router-outlet></router-outlet>
9+
<router-outlet />
1010
`,
1111
})
1212
export class AppComponent {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script lang="ts">
2+
import TopNavigationBar from './(home)/top-navigation-bar.analog' with { analog: 'imports' };
3+
import Experience from './(home)/experience/experience.analog' with { analog: 'imports' };
4+
</script>
5+
6+
<template class="h-screen">
7+
<TopNavigationBar />
8+
<Experience />
9+
</template>

apps/docs/src/app/pages/(home).page.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<script lang="ts">
2+
let count = 0;
3+
4+
function increment() {
5+
count++;
6+
}
7+
</script>
8+
9+
<template class="flex min-h-screen flex-col text-zinc-900 bg-zinc-50 px-4 pt-8 pb-32">
10+
<main class="flex-1 mx-auto">
11+
<section class="space-y-6 pb-8 pt-6 md:pb-12 md:pt-10 lg:py-32">
12+
<div class="flex max-w-[64rem] flex-col items-center gap-4 text-center">
13+
<img
14+
class="h-12 w-12"
15+
src="https://analogjs.org/img/logos/analog-logo.svg"
16+
alt="AnalogJs logo. Two red triangles and a white analog wave in front"
17+
/>
18+
<a
19+
class="rounded-2xl bg-zinc-200 px-4 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
20+
target="_blank"
21+
href="https://twitter.com/analogjs"
22+
>
23+
Follow along on Twitter
24+
</a>
25+
<h1 class="font-heading font-medium text-3xl sm:text-5xl md:text-6xl lg:text-7xl">
26+
<span class="text-[#DD0031]">Analog.</span>
27+
The fullstack Angular meta-framework
28+
</h1>
29+
<p class="max-w-[42rem] leading-normal text-muted-foreground sm:text-xl sm:leading-8">
30+
Analog is for building applications and websites with Angular.
31+
<br />
32+
Powered by Vite.
33+
</p>
34+
<div class="space-x-4">
35+
<a
36+
class="inline-flex items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background bg-zinc-950 text-zinc-50 hover:bg-zinc-950/90 h-11 px-8 rounded-md"
37+
href="https://analogjs.org"
38+
>
39+
Read the docs
40+
</a>
41+
<a
42+
target="_blank"
43+
rel="noreferrer"
44+
class="inline-flex items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background border border-input hover:bg-zinc-100 hover:text-zinc-950 h-11 px-8 rounded-md"
45+
href="https://github.com/analogjs/analog"
46+
>
47+
Star on GitHub
48+
</a>
49+
</div>
50+
</div>
51+
</section>
52+
<section id="counter-demo" class="container py-8 md:py-12 lg:py-24">
53+
<div class="mx-auto flex max-w-[58rem] flex-col items-center justify-center gap-4 text-center">
54+
<h2 class="text-[#DD0031] font-medium text-3xl leading-[1.1]">Counter</h2>
55+
<p class="max-w-[85%] leading-normal text-muted-foreground sm:text-lg sm:leading-7">
56+
This is a simple interactive counter. Powered by Angular.
57+
</p>
58+
<button
59+
(click)="increment()"
60+
class="inline-flex items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background border border-input hover:bg-zinc-100 hover:text-zinc-950 h-11 px-8 rounded-md"
61+
>
62+
Count:
63+
<span class="ml-1 font-mono">{{ count }}</span>
64+
</button>
65+
</div>
66+
</section>
67+
</main>
68+
</template>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts">
2+
import { NgtCanvas } from 'angular-three' with { analog: 'imports' };
3+
import Scene from './scene.analog';
4+
5+
defineMetadata({
6+
exposes: [Scene],
7+
});
8+
</script>
9+
10+
<template>
11+
<ngt-canvas [sceneGraph]="Scene" />
12+
</template>

0 commit comments

Comments
 (0)