@analogjs/platform 0.2.0-beta.9 → 0.2.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/migrations/migration.json +4 -0
- package/package.json +4 -4
- package/src/lib/clear-client-page-endpoint.d.ts +2 -0
- package/src/lib/clear-client-page-endpoint.js +37 -0
- package/src/lib/content-plugin.d.ts +0 -10
- package/src/lib/content-plugin.js +26 -43
- package/src/lib/nx-plugin/generators.json +16 -3
- package/src/lib/nx-plugin/package.json +5 -5
- package/src/lib/nx-plugin/src/generators/app/files/index-page/src/app/pages/(home).page.ts__template__ +14 -0
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.ts__template__ +2 -2
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/vite.config.ts__template__ +0 -2
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v16/src/{app.config.ts__template__ → app/app.config.ts__template__} +4 -2
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v16/src/main.server.ts__template__ +3 -2
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v16/src/main.ts__template__ +1 -1
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v16/vite.config.ts__template__ +1 -31
- package/src/lib/nx-plugin/src/generators/app/files/{tRPC → trpc}/src/server/trpc/routers/notes.ts__template__ +2 -2
- package/src/lib/nx-plugin/src/generators/app/files/{tRPC → trpc}/src/trpc-client.ts__template__ +3 -3
- package/src/lib/nx-plugin/src/generators/app/files/welcome-components/css/src/app/pages/analog-welcome.component.ts__template__ +264 -0
- package/src/lib/nx-plugin/src/generators/app/files/welcome-components/css-trpc/src/app/pages/analog-welcome.component.ts__template__ +439 -0
- package/src/lib/nx-plugin/src/generators/app/files/welcome-components/tailwind/src/app/pages/analog-welcome.component.ts__template__ +76 -0
- package/src/lib/nx-plugin/src/generators/app/files/welcome-components/tailwind-trpc/src/app/pages/analog-welcome.component.ts__template__ +162 -0
- package/src/lib/nx-plugin/src/generators/app/generator.js +16 -6
- package/src/lib/nx-plugin/src/generators/app/generator.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js +9 -27
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js +0 -10
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.d.ts +3 -0
- package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js +29 -0
- package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/lib/add-files.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-files.js +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-files.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.d.ts +3 -0
- package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js +16 -0
- package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js +5 -2
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-trpc.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/add-trpc.js +7 -15
- package/src/lib/nx-plugin/src/generators/app/lib/add-trpc.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js +58 -44
- package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/schema.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/schema.json +2 -2
- package/src/lib/nx-plugin/src/generators/app/versions/README.md +30 -0
- package/src/lib/nx-plugin/src/generators/app/versions/dependencies.d.ts +9 -0
- package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js +54 -0
- package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.d.ts +4 -0
- package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js +75 -0
- package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.d.ts +6 -0
- package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js +14 -0
- package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.d.ts +7 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js +54 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx_15_X/versions.d.ts +26 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx_15_X/versions.js +33 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx_15_X/versions.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx_16_X/versions.d.ts +24 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx_16_X/versions.js +31 -0
- package/src/lib/nx-plugin/src/generators/app/versions/nx_16_X/versions.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/versions/trpc-dependencies.d.ts +4 -0
- package/src/lib/nx-plugin/src/generators/app/versions/trpc-dependencies.js +44 -0
- package/src/lib/nx-plugin/src/generators/app/versions/trpc-dependencies.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/app/versions.d.ts +14 -12
- package/src/lib/nx-plugin/src/generators/app/versions.js +15 -13
- package/src/lib/nx-plugin/src/generators/app/versions.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/page/__snapshots__/generator.spec.ts.snap +88 -0
- package/src/lib/nx-plugin/src/generators/page/files/__fileName__.page.ts__template__ +22 -0
- package/src/lib/nx-plugin/src/generators/page/generator.d.ts +5 -0
- package/src/lib/nx-plugin/src/generators/page/generator.js +46 -0
- package/src/lib/nx-plugin/src/generators/page/generator.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/page/schema.d.ts +13 -0
- package/src/lib/nx-plugin/src/generators/page/schema.json +60 -0
- package/src/lib/nx-plugin/src/generators/preset/generator.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/preset/schema.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/preset/schema.json +3 -3
- package/src/lib/nx-plugin/src/utils/version-utils.d.ts +1 -1
- package/src/lib/nx-plugin/src/utils/version-utils.js +2 -2
- package/src/lib/nx-plugin/src/utils/version-utils.js.map +1 -1
- package/src/lib/options.d.ts +5 -1
- package/src/lib/platform-plugin.js +5 -3
- package/src/lib/router-plugin.js +19 -2
- package/src/lib/nx-plugin/src/generators/app/files/index-pages/css/src/app/pages/index.page.ts__template__ +0 -355
- package/src/lib/nx-plugin/src/generators/app/files/index-pages/css-trpc/src/app/pages/index.page.ts__template__ +0 -585
- package/src/lib/nx-plugin/src/generators/app/files/index-pages/tailwind/src/app/pages/index.page.ts__template__ +0 -158
- package/src/lib/nx-plugin/src/generators/app/files/index-pages/tailwind-trpc/src/app/pages/index.page.ts__template__ +0 -269
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v16/src/public/assets/vite.svg__template__ +0 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-index-pages.d.ts +0 -3
- package/src/lib/nx-plugin/src/generators/app/lib/add-index-pages.js +0 -15
- package/src/lib/nx-plugin/src/generators/app/lib/add-index-pages.js.map +0 -1
- /package/src/lib/nx-plugin/src/generators/app/files/template-angular-v16/src/{app.config.server.ts__template__ → app/app.config.server.ts__template__} +0 -0
- /package/src/lib/nx-plugin/src/generators/app/files/{tRPC → trpc}/src/note.ts__template__ +0 -0
- /package/src/lib/nx-plugin/src/generators/app/files/{tRPC → trpc}/src/server/routes/trpc/[trpc].ts__template__ +0 -0
- /package/src/lib/nx-plugin/src/generators/app/files/{tRPC → trpc}/src/server/trpc/context.ts__template__ +0 -0
- /package/src/lib/nx-plugin/src/generators/app/files/{tRPC → trpc}/src/server/trpc/routers/index.ts__template__ +0 -0
- /package/src/lib/nx-plugin/src/generators/app/files/{tRPC → trpc}/src/server/trpc/trpc.ts__template__ +0 -0
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { AsyncPipe, DatePipe, NgFor, NgIf } from '@angular/common';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: '<%= fileName %>-home',
|
|
6
|
-
standalone: true,
|
|
7
|
-
imports: [AsyncPipe, <% if (addTRPC) { %>FormsModule,<% } %> NgFor, DatePipe, NgIf],
|
|
8
|
-
host: {
|
|
9
|
-
class:
|
|
10
|
-
'flex min-h-screen flex-col text-zinc-900 bg-zinc-50 px-4 pt-8 pb-32',
|
|
11
|
-
},
|
|
12
|
-
template: `
|
|
13
|
-
<main class="flex-1 mx-auto">
|
|
14
|
-
<section class="space-y-6 pb-8 pt-6 md:pb-12 md:pt-10 lg:py-32">
|
|
15
|
-
<div
|
|
16
|
-
class="container flex max-w-[64rem] flex-col items-center gap-4 text-center"
|
|
17
|
-
>
|
|
18
|
-
<svg
|
|
19
|
-
class="mx-auto h-16 w-16 -mb-4"
|
|
20
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
22
|
-
width="362.26562"
|
|
23
|
-
zoomAndPan="magnify"
|
|
24
|
-
viewBox="0 0 271.62214 192.65233"
|
|
25
|
-
height="256.86978"
|
|
26
|
-
preserveAspectRatio="xMidYMid meet"
|
|
27
|
-
version="1.0"
|
|
28
|
-
id="svg27"
|
|
29
|
-
>
|
|
30
|
-
<defs id="defs11">
|
|
31
|
-
<clipPath id="id1">
|
|
32
|
-
<path
|
|
33
|
-
d="M 127.29688,75.375 H 347.57031 V 267.52734 H 127.29688 Z m 0,0"
|
|
34
|
-
clip-rule="nonzero"
|
|
35
|
-
id="path2"
|
|
36
|
-
/>
|
|
37
|
-
</clipPath>
|
|
38
|
-
<clipPath id="id2">
|
|
39
|
-
<path
|
|
40
|
-
d="M 75.871094,104 H 263.33594 V 268.03125 H 75.871094 Z m 0,0"
|
|
41
|
-
clip-rule="nonzero"
|
|
42
|
-
id="path5"
|
|
43
|
-
/>
|
|
44
|
-
</clipPath>
|
|
45
|
-
<clipPath id="id3">
|
|
46
|
-
<path
|
|
47
|
-
d="m 105,169.02344 h 210 v 87.875 H 105 Z m 0,0"
|
|
48
|
-
clip-rule="nonzero"
|
|
49
|
-
id="path8"
|
|
50
|
-
/>
|
|
51
|
-
</clipPath>
|
|
52
|
-
</defs>
|
|
53
|
-
<g
|
|
54
|
-
clip-path="url(#id1)"
|
|
55
|
-
id="g15"
|
|
56
|
-
transform="translate(-75.931091,-75.378906)"
|
|
57
|
-
>
|
|
58
|
-
<path
|
|
59
|
-
fill="#c30f2e"
|
|
60
|
-
d="M 237.43359,75.378906 347.57031,267.52734 H 127.29688 L 237.43359,75.378906"
|
|
61
|
-
fill-opacity="1"
|
|
62
|
-
fill-rule="nonzero"
|
|
63
|
-
id="path13"
|
|
64
|
-
/>
|
|
65
|
-
</g>
|
|
66
|
-
<g
|
|
67
|
-
clip-path="url(#id2)"
|
|
68
|
-
id="g19"
|
|
69
|
-
transform="translate(-75.931091,-75.378906)"
|
|
70
|
-
>
|
|
71
|
-
<path
|
|
72
|
-
fill="#dd0330"
|
|
73
|
-
d="m 169.60156,104 93.73047,164.03125 H 75.871094 L 169.60156,104"
|
|
74
|
-
fill-opacity="1"
|
|
75
|
-
fill-rule="nonzero"
|
|
76
|
-
id="path17"
|
|
77
|
-
/>
|
|
78
|
-
</g>
|
|
79
|
-
<path
|
|
80
|
-
fill="#ffffff"
|
|
81
|
-
d="M 252.96344,143.58984 H 19.221253 v -2.56641 H 252.96344 v 2.56641"
|
|
82
|
-
fill-opacity="1"
|
|
83
|
-
fill-rule="nonzero"
|
|
84
|
-
id="path21"
|
|
85
|
-
/>
|
|
86
|
-
<g
|
|
87
|
-
clip-path="url(#id3)"
|
|
88
|
-
id="g25"
|
|
89
|
-
transform="translate(-75.931091,-75.378906)"
|
|
90
|
-
>
|
|
91
|
-
<path
|
|
92
|
-
fill="#ffffff"
|
|
93
|
-
d="m 292.78516,256.51172 c -0.91407,0 -1.77344,-0.37891 -2.49219,-1.09766 -4.29297,-4.3125 -4.48047,-21.84765 -4.27344,-48.10937 0.11719,-14.35157 0.27344,-34.00782 -2.01562,-35.5586 -2.23438,0.92578 -2.45704,17.16407 -2.60157,27.91407 -0.17187,12.50781 -0.34765,25.44921 -2.3789,32.03906 -0.60547,1.95312 -1.38672,3.74219 -2.95703,3.59765 -2.21485,-0.19531 -2.92969,-3.6914 -4.58204,-17.48828 -0.6875,-5.73047 -1.39843,-11.65234 -2.23046,-13.94531 -0.10938,-0.28906 -0.20313,-0.51953 -0.28516,-0.69922 -0.88672,2.00391 -1.91016,7.51172 -2.62109,11.33594 -0.98438,5.28125 -1.91407,10.26953 -3.07813,12.44531 -0.89844,1.67188 -2.32422,3.85156 -4.31641,3.42969 -2.71484,-0.57031 -3.52734,-6.04297 -3.76953,-9.25391 0,-27.01562 -3.53515,-30.16015 -4.24218,-30.51562 l -0.11329,0.0859 -0.17187,-0.0391 c -2.52344,1.10157 -2.66016,9.86328 -2.78906,18.33594 -0.10157,6.21484 -0.21094,13.25781 -1.11719,19.84766 -1.17578,8.54297 -2.59766,10.1914 -4.36719,10.08984 -4.07422,-0.27734 -4.1914,-14.30859 -4.1914,-15.90625 0,-0.5 0.0117,-1.08984 0.0273,-1.74219 0.0781,-3.26562 0.21875,-9.33984 -1.78906,-11.2539 -0.26563,-0.25391 -0.64063,-0.54688 -0.9336,-0.46485 -1.42968,0.35938 -2.91406,5.00391 -3.40625,6.53125 -0.15625,0.48438 -0.28125,0.88282 -0.38672,1.15625 -0.082,0.22657 -0.1875,0.54688 -0.3125,0.9336 -1.08203,3.28515 -2.3125,6.5625 -4.41406,7.37109 -0.77734,0.30078 -1.58984,0.23438 -2.35156,-0.19531 -1.01172,-0.57422 -1.83594,-1.7461 -2.60547,-3.69531 -0.42187,-1.07813 -0.78125,-2.17188 -1.14844,-3.26954 -0.44531,-1.33984 -0.90234,-2.72656 -1.46875,-4.04296 -0.44531,-1.02344 -1.55468,-1.48438 -2.96875,-1.23438 -2.9375,0.52344 -3.42968,3.49219 -3.84375,7.96094 -0.0742,0.77734 -0.14453,1.53906 -0.24218,2.25781 -0.0117,0.21094 -0.53125,6.76953 -0.86329,8.85547 -0.91796,5.71875 -2.125,7.97266 -4.1289,7.80859 -4.94531,-0.42187 -7.21485,-22.11328 -7.09375,-31.27734 0.0937,-6.99609 -1.17188,-9.55078 -1.92969,-9.95703 -0.0781,-0.0352 -0.19922,-0.10156 -0.48828,0.10156 -0.89453,0.60547 -1.69141,2.49219 -1.44531,4.47266 2.72265,21.5664 0.71484,46.26562 -4.20313,51.82812 -1.55078,1.75 -3.66015,1.72656 -5.1289,0.25 -4.29688,-4.3125 -4.47657,-21.84765 -4.27344,-48.10937 0.11719,-14.35157 0.26953,-34.00782 -2.01563,-35.5586 -2.23437,0.92578 -2.45312,17.16407 -2.60156,27.91407 -0.17187,12.50781 -0.34766,25.44921 -2.38281,32.03906 -0.60547,1.95312 -1.38672,3.74219 -2.95313,3.59765 -2.21875,-0.19531 -2.92968,-3.6914 -4.58593,-17.48828 -0.6875,-5.73047 -1.39844,-11.65234 -2.23047,-13.94531 -0.10547,-0.28906 -0.19922,-0.51953 -0.28516,-0.69922 -0.88281,2.00391 -1.90625,7.51172 -2.61719,11.33594 -0.98437,5.28125 -1.91406,10.26953 -3.08203,12.44531 -0.89844,1.67188 -2.32422,3.85156 -4.3125,3.42969 -2.71484,-0.57031 -3.52734,-6.04297 -3.76953,-9.25391 -0.004,-27.01562 -3.53516,-30.16015 -4.24219,-30.51562 l -0.11328,0.0859 -0.17578,-0.0391 c -2.51953,1.10157 -2.65625,9.86328 -2.78906,18.33594 -0.0977,6.21484 -0.20703,13.25781 -1.11328,19.84766 -1.17578,8.54297 -2.58594,10.20703 -4.36328,10.08984 -4.08204,-0.27734 -4.19922,-14.30859 -4.19922,-15.90625 0,-0.5 0.0156,-1.08984 0.0312,-1.74219 0.0781,-3.26562 0.21875,-9.33984 -1.78907,-11.2539 -0.26562,-0.25391 -0.64062,-0.54688 -0.93359,-0.46485 -1.42969,0.35938 -2.91797,5.00391 -3.40234,6.53125 -0.15625,0.48047 -0.28907,0.88282 -0.38672,1.15625 -0.0859,0.22266 -0.19141,0.54297 -0.31641,0.92969 -1.08203,3.28516 -2.3125,6.56641 -4.41015,7.375 -0.78125,0.30078 -1.59766,0.23438 -2.35547,-0.19531 -1.01172,-0.57422 -1.83985,-1.7461 -2.60547,-3.69531 -0.42188,-1.07813 -0.78516,-2.17188 -1.14844,-3.26954 -0.44531,-1.33984 -0.90625,-2.72656 -1.47265,-4.04296 -0.44141,-1.02344 -1.55469,-1.48438 -2.96875,-1.23438 -3.38282,0.60156 -4.1836,4.79688 -4.82813,9.80469 l -0.11328,0.89062 -2.55859,-0.33984 0.12109,-0.875 c 0.55859,-4.39063 1.41016,-11.02734 6.92969,-12.00391 2.59765,-0.46093 4.86718,0.61719 5.78125,2.74219 0.61328,1.42188 1.09375,2.85938 1.55468,4.25391 0.34375,1.05078 0.69532,2.10156 1.10157,3.14062 0.71484,1.8125 1.26953,2.28125 1.47656,2.39453 1.29297,-0.40234 2.61328,-4.42187 3.05078,-5.74609 0.13672,-0.42578 0.25391,-0.77734 0.34766,-1.02734 0.0898,-0.2461 0.20703,-0.60547 0.34765,-1.03907 1.16407,-3.64062 2.625,-7.58203 5.21875,-8.23828 0.79297,-0.20312 2.01953,-0.17578 3.35156,1.09766 2.82813,2.69922 2.67969,9 2.58204,13.17187 -0.0156,0.625 -0.0312,1.19532 -0.0312,1.67969 0,6.65625 0.98828,11.30859 1.74218,12.90625 0.39063,-0.81641 1.0586,-2.79297 1.69532,-7.4375 0.88281,-6.4375 0.99609,-13.39844 1.08984,-19.53906 0.17187,-10.86719 0.29297,-18.7461 4.22656,-20.59766 0.58594,-0.35937 1.5586,-0.55469 2.58594,-0.0352 3.80469,1.91406 5.65234,12.61328 5.65234,32.70703 0.23828,3.10547 1.07422,6.375 1.76172,6.84375 0.004,-0.0703 0.5625,-0.41407 1.48047,-2.13282 0.98047,-1.82421 1.95703,-7.07421 2.81641,-11.70312 1.90234,-10.20313 2.76562,-13.78516 5.01562,-13.97266 1.71485,-0.16797 2.50781,2.01172 2.83985,2.92969 0.9375,2.57031 1.63281,8.37109 2.36718,14.51563 0.57422,4.76562 1.39063,11.57031 2.22266,14.32421 0.0898,-0.24218 0.19141,-0.53125 0.30078,-0.88671 1.92578,-6.23829 2.10156,-18.98438 2.26953,-31.31641 0.23438,-17.12891 0.53516,-27.74219 3.66016,-29.95703 0.69531,-0.49219 1.54297,-0.61328 2.37109,-0.33594 3.66016,1.21484 3.94141,11.94531 3.73438,37.99609 -0.14844,18.89063 -0.33203,42.40235 3.52734,46.27735 0.33594,0.33984 0.57422,0.33984 0.66016,0.33984 0.17968,0 0.4375,-0.17187 0.71093,-0.48047 3.90625,-4.41797 6.37891,-27.61718 3.57813,-49.80468 -0.34766,-2.76172 0.71875,-5.66407 2.53906,-6.91407 1.00391,-0.6914 2.16016,-0.78125 3.16016,-0.24609 2.27734,1.21094 3.38281,5.33203 3.29297,12.25391 -0.16016,12.08593 2.74218,26.23046 4.63672,28.48828 0.30078,-0.5 0.89453,-1.8711 1.46484,-5.46094 0.32031,-1.98438 0.84766,-8.65234 0.85547,-8.71875 0.0937,-0.75391 0.16406,-1.48438 0.23047,-2.22656 0.39062,-4.16407 0.87109,-9.34375 5.95703,-10.2461 2.59375,-0.46093 4.86328,0.61328 5.78125,2.74219 0.61328,1.42188 1.08984,2.85938 1.55078,4.25391 0.35156,1.05078 0.70312,2.10156 1.10937,3.14062 0.71094,1.8125 1.26954,2.28125 1.47266,2.39453 1.29297,-0.40234 2.61719,-4.42187 3.05078,-5.74218 0.14063,-0.42579 0.25781,-0.78125 0.34766,-1.03125 0.0937,-0.24219 0.20703,-0.60547 0.34375,-1.03907 1.16797,-3.64062 2.6289,-7.58203 5.22656,-8.23828 0.78516,-0.20312 2.01563,-0.17578 3.34766,1.09766 2.82812,2.69922 2.67968,9 2.58593,13.17187 -0.0195,0.625 -0.0352,1.19532 -0.0352,1.67969 0,6.65625 0.98828,11.30859 1.74219,12.90625 0.38671,-0.81641 1.05468,-2.79297 1.69921,-7.4375 0.88282,-6.4375 0.98829,-13.39844 1.08985,-19.53906 0.16797,-10.86719 0.28906,-18.7461 4.22265,-20.59766 0.58594,-0.35937 1.5586,-0.55469 2.58985,-0.0352 3.80078,1.91406 5.65234,12.61328 5.65234,32.70703 0.23828,3.10547 1.07422,6.375 1.75781,6.84375 0.008,-0.0703 0.5586,-0.41407 1.48438,-2.13282 0.98047,-1.82421 1.95312,-7.07421 2.81641,-11.70312 1.89453,-10.20313 2.76171,-13.78516 5.01171,-13.97266 1.71875,-0.16797 2.51172,2.01172 2.84375,2.92969 0.9336,2.57031 1.62891,8.37109 2.3711,14.51563 0.5664,4.76562 1.38281,11.57031 2.21875,14.32421 0.0859,-0.24218 0.1875,-0.53125 0.29687,-0.88671 1.92578,-6.23829 2.09766,-18.98438 2.26953,-31.31641 0.23047,-17.12891 0.53516,-27.74219 3.66016,-29.95703 0.69922,-0.49219 1.54297,-0.61328 2.37109,-0.33594 3.66407,1.21484 3.94532,11.94531 3.73438,37.99609 -0.14844,18.89063 -0.33203,42.40235 3.52344,46.27735 0.34375,0.33984 0.57812,0.33984 0.66797,0.33984 0.17578,0 0.43359,-0.17187 0.70312,-0.48047 3.91406,-4.41797 6.38281,-27.61718 3.58203,-49.80468 -0.36328,-2.89063 0.45703,-5.80469 1.95313,-6.92579 0.7539,-0.57031 1.67187,-0.6875 2.51562,-0.33203 2.17969,0.92969 3.65625,4.91407 4.51563,12.1875 0.35937,3.04688 0.67968,6.33985 0.98828,9.58985 0.67969,7.09375 1.60156,16.65234 2.84765,18.7539 0.38282,-0.48828 1.16407,-1.80859 2.32422,-5.34765 l 2.44922,0.80078 c -1.80078,5.47265 -3.21094,7.53515 -5.04687,7.32422 -2.85547,-0.31641 -3.67969,-6.08594 -5.13672,-21.28516 -0.3086,-3.23437 -0.625,-6.50781 -0.98438,-9.53906 -1.09375,-9.27735 -2.95312,-10.11719 -2.97265,-10.125 -0.36328,0.18359 -1.20703,2.11328 -0.89453,4.57422 2.71484,21.5664 0.71484,46.26953 -4.20704,51.82812 -0.79296,0.89453 -1.68359,1.34766 -2.63671,1.34766"
|
|
94
|
-
fill-opacity="1"
|
|
95
|
-
fill-rule="nonzero"
|
|
96
|
-
id="path23"
|
|
97
|
-
/>
|
|
98
|
-
</g>
|
|
99
|
-
</svg>
|
|
100
|
-
<a
|
|
101
|
-
class="rounded-2xl bg-zinc-200 px-4 py-1.5 text-sm font-medium"
|
|
102
|
-
target="_blank"
|
|
103
|
-
href="https://twitter.com/analogjs"
|
|
104
|
-
>Follow along on Twitter</a
|
|
105
|
-
>
|
|
106
|
-
<h1
|
|
107
|
-
class="font-heading font-medium text-3xl sm:text-5xl md:text-6xl lg:text-7xl"
|
|
108
|
-
>
|
|
109
|
-
<span class="text-[#DD0031]">Analog.</span> The fullstack Angular meta-framework
|
|
110
|
-
</h1>
|
|
111
|
-
<p
|
|
112
|
-
class="max-w-[42rem] leading-normal text-muted-foreground sm:text-xl sm:leading-8"
|
|
113
|
-
>
|
|
114
|
-
Analog is for building applications and websites with Angular.
|
|
115
|
-
<br />Powered by Vite.
|
|
116
|
-
</p>
|
|
117
|
-
<div class="space-x-4">
|
|
118
|
-
<a
|
|
119
|
-
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"
|
|
120
|
-
href="https://analogjs.org"
|
|
121
|
-
>Read the docs</a
|
|
122
|
-
><a
|
|
123
|
-
target="_blank"
|
|
124
|
-
rel="noreferrer"
|
|
125
|
-
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-50 hover:text-zinc-950 h-11 px-8 rounded-md"
|
|
126
|
-
href="https://github.com/analogjs/analog"
|
|
127
|
-
>GitHub</a
|
|
128
|
-
>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</section>
|
|
132
|
-
<section id="counter-demo" class="container py-8 md:py-12 lg:py-24">
|
|
133
|
-
<div
|
|
134
|
-
class="mx-auto flex max-w-[58rem] flex-col items-center justify-center gap-4 text-center"
|
|
135
|
-
>
|
|
136
|
-
<h2 class="text-[#DD0031] font-medium text-3xl leading-[1.1]">Counter</h2>
|
|
137
|
-
<p
|
|
138
|
-
class="max-w-[85%] leading-normal text-muted-foreground sm:text-lg sm:leading-7"
|
|
139
|
-
>
|
|
140
|
-
This is a simple interactive counter. Powered by Angular.
|
|
141
|
-
</p>
|
|
142
|
-
<button
|
|
143
|
-
(click)="increment()"
|
|
144
|
-
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-50 hover:text-zinc-950 h-11 px-8 rounded-md"
|
|
145
|
-
>
|
|
146
|
-
Count: <span class="ml-1 font-mono">{{ count }}</span>
|
|
147
|
-
</button>
|
|
148
|
-
</div>
|
|
149
|
-
</section>
|
|
150
|
-
</main>
|
|
151
|
-
`,
|
|
152
|
-
})
|
|
153
|
-
export default class HomeComponent {
|
|
154
|
-
public count = 0;
|
|
155
|
-
public increment() {
|
|
156
|
-
this.count++;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { AsyncPipe, DatePipe, NgFor, NgIf } from '@angular/common';
|
|
3
|
-
import { FormsModule, NgForm } from '@angular/forms';
|
|
4
|
-
import { waitFor } from '@analogjs/trpc';
|
|
5
|
-
import { injectTRPCClient } from '../../trpc-client';
|
|
6
|
-
import { Note } from '../../note';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: '<%= fileName %>-home',
|
|
10
|
-
standalone: true,
|
|
11
|
-
imports: [AsyncPipe, FormsModule, NgFor, DatePipe, NgIf],
|
|
12
|
-
host: {
|
|
13
|
-
class:
|
|
14
|
-
'flex min-h-screen flex-col text-zinc-900 bg-zinc-50 px-4 pt-8 pb-32',
|
|
15
|
-
},
|
|
16
|
-
template: `
|
|
17
|
-
<main class="flex-1 mx-auto">
|
|
18
|
-
<section class="space-y-6 pb-8 pt-6 md:pb-12 md:pt-10 lg:py-32">
|
|
19
|
-
<div
|
|
20
|
-
class="container flex max-w-[64rem] flex-col items-center gap-4 text-center"
|
|
21
|
-
>
|
|
22
|
-
<svg
|
|
23
|
-
class="mx-auto h-16 w-16 -mb-4"
|
|
24
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
26
|
-
width="362.26562"
|
|
27
|
-
zoomAndPan="magnify"
|
|
28
|
-
viewBox="0 0 271.62214 192.65233"
|
|
29
|
-
height="256.86978"
|
|
30
|
-
preserveAspectRatio="xMidYMid meet"
|
|
31
|
-
version="1.0"
|
|
32
|
-
id="svg27"
|
|
33
|
-
>
|
|
34
|
-
<defs id="defs11">
|
|
35
|
-
<clipPath id="id1">
|
|
36
|
-
<path
|
|
37
|
-
d="M 127.29688,75.375 H 347.57031 V 267.52734 H 127.29688 Z m 0,0"
|
|
38
|
-
clip-rule="nonzero"
|
|
39
|
-
id="path2"
|
|
40
|
-
/>
|
|
41
|
-
</clipPath>
|
|
42
|
-
<clipPath id="id2">
|
|
43
|
-
<path
|
|
44
|
-
d="M 75.871094,104 H 263.33594 V 268.03125 H 75.871094 Z m 0,0"
|
|
45
|
-
clip-rule="nonzero"
|
|
46
|
-
id="path5"
|
|
47
|
-
/>
|
|
48
|
-
</clipPath>
|
|
49
|
-
<clipPath id="id3">
|
|
50
|
-
<path
|
|
51
|
-
d="m 105,169.02344 h 210 v 87.875 H 105 Z m 0,0"
|
|
52
|
-
clip-rule="nonzero"
|
|
53
|
-
id="path8"
|
|
54
|
-
/>
|
|
55
|
-
</clipPath>
|
|
56
|
-
</defs>
|
|
57
|
-
<g
|
|
58
|
-
clip-path="url(#id1)"
|
|
59
|
-
id="g15"
|
|
60
|
-
transform="translate(-75.931091,-75.378906)"
|
|
61
|
-
>
|
|
62
|
-
<path
|
|
63
|
-
fill="#c30f2e"
|
|
64
|
-
d="M 237.43359,75.378906 347.57031,267.52734 H 127.29688 L 237.43359,75.378906"
|
|
65
|
-
fill-opacity="1"
|
|
66
|
-
fill-rule="nonzero"
|
|
67
|
-
id="path13"
|
|
68
|
-
/>
|
|
69
|
-
</g>
|
|
70
|
-
<g
|
|
71
|
-
clip-path="url(#id2)"
|
|
72
|
-
id="g19"
|
|
73
|
-
transform="translate(-75.931091,-75.378906)"
|
|
74
|
-
>
|
|
75
|
-
<path
|
|
76
|
-
fill="#dd0330"
|
|
77
|
-
d="m 169.60156,104 93.73047,164.03125 H 75.871094 L 169.60156,104"
|
|
78
|
-
fill-opacity="1"
|
|
79
|
-
fill-rule="nonzero"
|
|
80
|
-
id="path17"
|
|
81
|
-
/>
|
|
82
|
-
</g>
|
|
83
|
-
<path
|
|
84
|
-
fill="#ffffff"
|
|
85
|
-
d="M 252.96344,143.58984 H 19.221253 v -2.56641 H 252.96344 v 2.56641"
|
|
86
|
-
fill-opacity="1"
|
|
87
|
-
fill-rule="nonzero"
|
|
88
|
-
id="path21"
|
|
89
|
-
/>
|
|
90
|
-
<g
|
|
91
|
-
clip-path="url(#id3)"
|
|
92
|
-
id="g25"
|
|
93
|
-
transform="translate(-75.931091,-75.378906)"
|
|
94
|
-
>
|
|
95
|
-
<path
|
|
96
|
-
fill="#ffffff"
|
|
97
|
-
d="m 292.78516,256.51172 c -0.91407,0 -1.77344,-0.37891 -2.49219,-1.09766 -4.29297,-4.3125 -4.48047,-21.84765 -4.27344,-48.10937 0.11719,-14.35157 0.27344,-34.00782 -2.01562,-35.5586 -2.23438,0.92578 -2.45704,17.16407 -2.60157,27.91407 -0.17187,12.50781 -0.34765,25.44921 -2.3789,32.03906 -0.60547,1.95312 -1.38672,3.74219 -2.95703,3.59765 -2.21485,-0.19531 -2.92969,-3.6914 -4.58204,-17.48828 -0.6875,-5.73047 -1.39843,-11.65234 -2.23046,-13.94531 -0.10938,-0.28906 -0.20313,-0.51953 -0.28516,-0.69922 -0.88672,2.00391 -1.91016,7.51172 -2.62109,11.33594 -0.98438,5.28125 -1.91407,10.26953 -3.07813,12.44531 -0.89844,1.67188 -2.32422,3.85156 -4.31641,3.42969 -2.71484,-0.57031 -3.52734,-6.04297 -3.76953,-9.25391 0,-27.01562 -3.53515,-30.16015 -4.24218,-30.51562 l -0.11329,0.0859 -0.17187,-0.0391 c -2.52344,1.10157 -2.66016,9.86328 -2.78906,18.33594 -0.10157,6.21484 -0.21094,13.25781 -1.11719,19.84766 -1.17578,8.54297 -2.59766,10.1914 -4.36719,10.08984 -4.07422,-0.27734 -4.1914,-14.30859 -4.1914,-15.90625 0,-0.5 0.0117,-1.08984 0.0273,-1.74219 0.0781,-3.26562 0.21875,-9.33984 -1.78906,-11.2539 -0.26563,-0.25391 -0.64063,-0.54688 -0.9336,-0.46485 -1.42968,0.35938 -2.91406,5.00391 -3.40625,6.53125 -0.15625,0.48438 -0.28125,0.88282 -0.38672,1.15625 -0.082,0.22657 -0.1875,0.54688 -0.3125,0.9336 -1.08203,3.28515 -2.3125,6.5625 -4.41406,7.37109 -0.77734,0.30078 -1.58984,0.23438 -2.35156,-0.19531 -1.01172,-0.57422 -1.83594,-1.7461 -2.60547,-3.69531 -0.42187,-1.07813 -0.78125,-2.17188 -1.14844,-3.26954 -0.44531,-1.33984 -0.90234,-2.72656 -1.46875,-4.04296 -0.44531,-1.02344 -1.55468,-1.48438 -2.96875,-1.23438 -2.9375,0.52344 -3.42968,3.49219 -3.84375,7.96094 -0.0742,0.77734 -0.14453,1.53906 -0.24218,2.25781 -0.0117,0.21094 -0.53125,6.76953 -0.86329,8.85547 -0.91796,5.71875 -2.125,7.97266 -4.1289,7.80859 -4.94531,-0.42187 -7.21485,-22.11328 -7.09375,-31.27734 0.0937,-6.99609 -1.17188,-9.55078 -1.92969,-9.95703 -0.0781,-0.0352 -0.19922,-0.10156 -0.48828,0.10156 -0.89453,0.60547 -1.69141,2.49219 -1.44531,4.47266 2.72265,21.5664 0.71484,46.26562 -4.20313,51.82812 -1.55078,1.75 -3.66015,1.72656 -5.1289,0.25 -4.29688,-4.3125 -4.47657,-21.84765 -4.27344,-48.10937 0.11719,-14.35157 0.26953,-34.00782 -2.01563,-35.5586 -2.23437,0.92578 -2.45312,17.16407 -2.60156,27.91407 -0.17187,12.50781 -0.34766,25.44921 -2.38281,32.03906 -0.60547,1.95312 -1.38672,3.74219 -2.95313,3.59765 -2.21875,-0.19531 -2.92968,-3.6914 -4.58593,-17.48828 -0.6875,-5.73047 -1.39844,-11.65234 -2.23047,-13.94531 -0.10547,-0.28906 -0.19922,-0.51953 -0.28516,-0.69922 -0.88281,2.00391 -1.90625,7.51172 -2.61719,11.33594 -0.98437,5.28125 -1.91406,10.26953 -3.08203,12.44531 -0.89844,1.67188 -2.32422,3.85156 -4.3125,3.42969 -2.71484,-0.57031 -3.52734,-6.04297 -3.76953,-9.25391 -0.004,-27.01562 -3.53516,-30.16015 -4.24219,-30.51562 l -0.11328,0.0859 -0.17578,-0.0391 c -2.51953,1.10157 -2.65625,9.86328 -2.78906,18.33594 -0.0977,6.21484 -0.20703,13.25781 -1.11328,19.84766 -1.17578,8.54297 -2.58594,10.20703 -4.36328,10.08984 -4.08204,-0.27734 -4.19922,-14.30859 -4.19922,-15.90625 0,-0.5 0.0156,-1.08984 0.0312,-1.74219 0.0781,-3.26562 0.21875,-9.33984 -1.78907,-11.2539 -0.26562,-0.25391 -0.64062,-0.54688 -0.93359,-0.46485 -1.42969,0.35938 -2.91797,5.00391 -3.40234,6.53125 -0.15625,0.48047 -0.28907,0.88282 -0.38672,1.15625 -0.0859,0.22266 -0.19141,0.54297 -0.31641,0.92969 -1.08203,3.28516 -2.3125,6.56641 -4.41015,7.375 -0.78125,0.30078 -1.59766,0.23438 -2.35547,-0.19531 -1.01172,-0.57422 -1.83985,-1.7461 -2.60547,-3.69531 -0.42188,-1.07813 -0.78516,-2.17188 -1.14844,-3.26954 -0.44531,-1.33984 -0.90625,-2.72656 -1.47265,-4.04296 -0.44141,-1.02344 -1.55469,-1.48438 -2.96875,-1.23438 -3.38282,0.60156 -4.1836,4.79688 -4.82813,9.80469 l -0.11328,0.89062 -2.55859,-0.33984 0.12109,-0.875 c 0.55859,-4.39063 1.41016,-11.02734 6.92969,-12.00391 2.59765,-0.46093 4.86718,0.61719 5.78125,2.74219 0.61328,1.42188 1.09375,2.85938 1.55468,4.25391 0.34375,1.05078 0.69532,2.10156 1.10157,3.14062 0.71484,1.8125 1.26953,2.28125 1.47656,2.39453 1.29297,-0.40234 2.61328,-4.42187 3.05078,-5.74609 0.13672,-0.42578 0.25391,-0.77734 0.34766,-1.02734 0.0898,-0.2461 0.20703,-0.60547 0.34765,-1.03907 1.16407,-3.64062 2.625,-7.58203 5.21875,-8.23828 0.79297,-0.20312 2.01953,-0.17578 3.35156,1.09766 2.82813,2.69922 2.67969,9 2.58204,13.17187 -0.0156,0.625 -0.0312,1.19532 -0.0312,1.67969 0,6.65625 0.98828,11.30859 1.74218,12.90625 0.39063,-0.81641 1.0586,-2.79297 1.69532,-7.4375 0.88281,-6.4375 0.99609,-13.39844 1.08984,-19.53906 0.17187,-10.86719 0.29297,-18.7461 4.22656,-20.59766 0.58594,-0.35937 1.5586,-0.55469 2.58594,-0.0352 3.80469,1.91406 5.65234,12.61328 5.65234,32.70703 0.23828,3.10547 1.07422,6.375 1.76172,6.84375 0.004,-0.0703 0.5625,-0.41407 1.48047,-2.13282 0.98047,-1.82421 1.95703,-7.07421 2.81641,-11.70312 1.90234,-10.20313 2.76562,-13.78516 5.01562,-13.97266 1.71485,-0.16797 2.50781,2.01172 2.83985,2.92969 0.9375,2.57031 1.63281,8.37109 2.36718,14.51563 0.57422,4.76562 1.39063,11.57031 2.22266,14.32421 0.0898,-0.24218 0.19141,-0.53125 0.30078,-0.88671 1.92578,-6.23829 2.10156,-18.98438 2.26953,-31.31641 0.23438,-17.12891 0.53516,-27.74219 3.66016,-29.95703 0.69531,-0.49219 1.54297,-0.61328 2.37109,-0.33594 3.66016,1.21484 3.94141,11.94531 3.73438,37.99609 -0.14844,18.89063 -0.33203,42.40235 3.52734,46.27735 0.33594,0.33984 0.57422,0.33984 0.66016,0.33984 0.17968,0 0.4375,-0.17187 0.71093,-0.48047 3.90625,-4.41797 6.37891,-27.61718 3.57813,-49.80468 -0.34766,-2.76172 0.71875,-5.66407 2.53906,-6.91407 1.00391,-0.6914 2.16016,-0.78125 3.16016,-0.24609 2.27734,1.21094 3.38281,5.33203 3.29297,12.25391 -0.16016,12.08593 2.74218,26.23046 4.63672,28.48828 0.30078,-0.5 0.89453,-1.8711 1.46484,-5.46094 0.32031,-1.98438 0.84766,-8.65234 0.85547,-8.71875 0.0937,-0.75391 0.16406,-1.48438 0.23047,-2.22656 0.39062,-4.16407 0.87109,-9.34375 5.95703,-10.2461 2.59375,-0.46093 4.86328,0.61328 5.78125,2.74219 0.61328,1.42188 1.08984,2.85938 1.55078,4.25391 0.35156,1.05078 0.70312,2.10156 1.10937,3.14062 0.71094,1.8125 1.26954,2.28125 1.47266,2.39453 1.29297,-0.40234 2.61719,-4.42187 3.05078,-5.74218 0.14063,-0.42579 0.25781,-0.78125 0.34766,-1.03125 0.0937,-0.24219 0.20703,-0.60547 0.34375,-1.03907 1.16797,-3.64062 2.6289,-7.58203 5.22656,-8.23828 0.78516,-0.20312 2.01563,-0.17578 3.34766,1.09766 2.82812,2.69922 2.67968,9 2.58593,13.17187 -0.0195,0.625 -0.0352,1.19532 -0.0352,1.67969 0,6.65625 0.98828,11.30859 1.74219,12.90625 0.38671,-0.81641 1.05468,-2.79297 1.69921,-7.4375 0.88282,-6.4375 0.98829,-13.39844 1.08985,-19.53906 0.16797,-10.86719 0.28906,-18.7461 4.22265,-20.59766 0.58594,-0.35937 1.5586,-0.55469 2.58985,-0.0352 3.80078,1.91406 5.65234,12.61328 5.65234,32.70703 0.23828,3.10547 1.07422,6.375 1.75781,6.84375 0.008,-0.0703 0.5586,-0.41407 1.48438,-2.13282 0.98047,-1.82421 1.95312,-7.07421 2.81641,-11.70312 1.89453,-10.20313 2.76171,-13.78516 5.01171,-13.97266 1.71875,-0.16797 2.51172,2.01172 2.84375,2.92969 0.9336,2.57031 1.62891,8.37109 2.3711,14.51563 0.5664,4.76562 1.38281,11.57031 2.21875,14.32421 0.0859,-0.24218 0.1875,-0.53125 0.29687,-0.88671 1.92578,-6.23829 2.09766,-18.98438 2.26953,-31.31641 0.23047,-17.12891 0.53516,-27.74219 3.66016,-29.95703 0.69922,-0.49219 1.54297,-0.61328 2.37109,-0.33594 3.66407,1.21484 3.94532,11.94531 3.73438,37.99609 -0.14844,18.89063 -0.33203,42.40235 3.52344,46.27735 0.34375,0.33984 0.57812,0.33984 0.66797,0.33984 0.17578,0 0.43359,-0.17187 0.70312,-0.48047 3.91406,-4.41797 6.38281,-27.61718 3.58203,-49.80468 -0.36328,-2.89063 0.45703,-5.80469 1.95313,-6.92579 0.7539,-0.57031 1.67187,-0.6875 2.51562,-0.33203 2.17969,0.92969 3.65625,4.91407 4.51563,12.1875 0.35937,3.04688 0.67968,6.33985 0.98828,9.58985 0.67969,7.09375 1.60156,16.65234 2.84765,18.7539 0.38282,-0.48828 1.16407,-1.80859 2.32422,-5.34765 l 2.44922,0.80078 c -1.80078,5.47265 -3.21094,7.53515 -5.04687,7.32422 -2.85547,-0.31641 -3.67969,-6.08594 -5.13672,-21.28516 -0.3086,-3.23437 -0.625,-6.50781 -0.98438,-9.53906 -1.09375,-9.27735 -2.95312,-10.11719 -2.97265,-10.125 -0.36328,0.18359 -1.20703,2.11328 -0.89453,4.57422 2.71484,21.5664 0.71484,46.26953 -4.20704,51.82812 -0.79296,0.89453 -1.68359,1.34766 -2.63671,1.34766"
|
|
98
|
-
fill-opacity="1"
|
|
99
|
-
fill-rule="nonzero"
|
|
100
|
-
id="path23"
|
|
101
|
-
/>
|
|
102
|
-
</g>
|
|
103
|
-
</svg>
|
|
104
|
-
<a
|
|
105
|
-
class="rounded-2xl bg-zinc-200 px-4 py-1.5 text-sm font-medium"
|
|
106
|
-
target="_blank"
|
|
107
|
-
href="https://twitter.com/analogjs"
|
|
108
|
-
>Follow along on Twitter</a
|
|
109
|
-
>
|
|
110
|
-
<h1
|
|
111
|
-
class="font-heading font-medium text-3xl sm:text-5xl md:text-6xl lg:text-7xl"
|
|
112
|
-
>
|
|
113
|
-
<span class="text-[#DD0031]">Analog.</span> The fullstack Angular meta-framework
|
|
114
|
-
</h1>
|
|
115
|
-
<p
|
|
116
|
-
class="max-w-[42rem] leading-normal text-muted-foreground sm:text-xl sm:leading-8"
|
|
117
|
-
>
|
|
118
|
-
Analog is for building applications and websites with Angular.
|
|
119
|
-
<br />Powered by Vite.
|
|
120
|
-
</p>
|
|
121
|
-
<div class="space-x-4">
|
|
122
|
-
<a
|
|
123
|
-
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"
|
|
124
|
-
href="https://analogjs.org"
|
|
125
|
-
>Read the docs</a
|
|
126
|
-
><a
|
|
127
|
-
target="_blank"
|
|
128
|
-
rel="noreferrer"
|
|
129
|
-
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-50 hover:text-zinc-950 h-11 px-8 rounded-md"
|
|
130
|
-
href="https://github.com/analogjs/analog"
|
|
131
|
-
>GitHub</a
|
|
132
|
-
>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</section>
|
|
136
|
-
<section id="trpc-demo" class="container py-8 md:py-12 lg:py-24">
|
|
137
|
-
<div
|
|
138
|
-
class="mx-auto flex max-w-[58rem] flex-col items-center justify-center gap-4 text-center"
|
|
139
|
-
>
|
|
140
|
-
<h2 class="text-[#DD0031] font-medium text-3xl leading-[1.1]">Leave a note</h2>
|
|
141
|
-
<p
|
|
142
|
-
class="max-w-[85%] leading-normal text-muted-foreground sm:text-lg sm:leading-7"
|
|
143
|
-
>
|
|
144
|
-
This is an example of how to you can use tRPC to superpower you
|
|
145
|
-
client server interaction.
|
|
146
|
-
</p>
|
|
147
|
-
</div>
|
|
148
|
-
<form
|
|
149
|
-
class="mt-8 pb-2 flex items-center"
|
|
150
|
-
#f="ngForm"
|
|
151
|
-
(ngSubmit)="addPost(f)"
|
|
152
|
-
>
|
|
153
|
-
<label class="sr-only" for="newNote"> Note </label>
|
|
154
|
-
<input
|
|
155
|
-
required
|
|
156
|
-
autocomplete="off"
|
|
157
|
-
data-testid="newNoteInput"
|
|
158
|
-
name="newNote"
|
|
159
|
-
[(ngModel)]="newNote"
|
|
160
|
-
class="flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
161
|
-
/>
|
|
162
|
-
<button
|
|
163
|
-
data-testid="addNoteBtn"
|
|
164
|
-
class="ml-2 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-50 hover:text-zinc-950 px-8 h-10 rounded-md"
|
|
165
|
-
>
|
|
166
|
-
+
|
|
167
|
-
</button>
|
|
168
|
-
</form>
|
|
169
|
-
<div class="mt-4 flex flex-col gap-4">
|
|
170
|
-
<div
|
|
171
|
-
*ngFor="
|
|
172
|
-
let note of notes ?? [];
|
|
173
|
-
trackBy: noteTrackBy;
|
|
174
|
-
let i = index
|
|
175
|
-
"
|
|
176
|
-
class="note relative overflow-hidden rounded-lg border bg-background p-2"
|
|
177
|
-
>
|
|
178
|
-
<button
|
|
179
|
-
[attr.data-testid]="'removeNoteAtIndexBtn' + i"
|
|
180
|
-
class="absolute top-4 right-4 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-transparent hover:bg-zinc-100 hover:text-zinc-950 h-6 px-2 rounded-md"
|
|
181
|
-
(click)="removePost(note.id)"
|
|
182
|
-
>
|
|
183
|
-
<svg
|
|
184
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
185
|
-
fill="none"
|
|
186
|
-
viewBox="0 0 24 24"
|
|
187
|
-
stroke-width="1.5"
|
|
188
|
-
stroke="currentColor"
|
|
189
|
-
class="w-4 h-4"
|
|
190
|
-
>
|
|
191
|
-
<path
|
|
192
|
-
stroke-linecap="round"
|
|
193
|
-
stroke-linejoin="round"
|
|
194
|
-
d="M6 18L18 6M6 6l12 12"
|
|
195
|
-
/>
|
|
196
|
-
</svg>
|
|
197
|
-
</button>
|
|
198
|
-
<div class="flex h-[180px] flex-col justify-between rounded-md p-6">
|
|
199
|
-
<div class="space-y-2">
|
|
200
|
-
<h3 class="font-bold">{{ note.note }}</h3>
|
|
201
|
-
<p class="text-sm text-muted-foreground">
|
|
202
|
-
{{ note.createdAt | date }}
|
|
203
|
-
</p>
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
|
|
209
|
-
<div
|
|
210
|
-
*ngIf="notes.length === 0"
|
|
211
|
-
class="relative overflow-hidden rounded-lg border bg-background p-2"
|
|
212
|
-
>
|
|
213
|
-
<div class="flex h-[180px] flex-col justify-between rounded-md p-6">
|
|
214
|
-
<div class="space-y-2">
|
|
215
|
-
<h3 class="font-bold">
|
|
216
|
-
{{ loadingPosts ? 'Loading...' : 'No notes yet...' }}
|
|
217
|
-
</h3>
|
|
218
|
-
<p class="text-sm text-muted-foreground">
|
|
219
|
-
{{
|
|
220
|
-
loadingPosts
|
|
221
|
-
? ''
|
|
222
|
-
: 'Add a new one and see them appear here...'
|
|
223
|
-
}}
|
|
224
|
-
</p>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
</section>
|
|
229
|
-
</main>
|
|
230
|
-
`,
|
|
231
|
-
})
|
|
232
|
-
export default class HomeComponent {
|
|
233
|
-
private _trpc = injectTRPCClient();
|
|
234
|
-
public loadingPosts = false;
|
|
235
|
-
public notes: Note[] = [];
|
|
236
|
-
public newNote = '';
|
|
237
|
-
|
|
238
|
-
constructor() {
|
|
239
|
-
waitFor(this._trpc.note.list.query().then((notes) => (this.notes = notes)));
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
public noteTrackBy = (index: number, note: Note) => {
|
|
243
|
-
return note.id;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
public addPost(form: NgForm) {
|
|
247
|
-
if (!form.valid) {
|
|
248
|
-
form.form.markAllAsTouched();
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
this._trpc.note.create
|
|
252
|
-
.mutate({ title: this.newNote })
|
|
253
|
-
.then(() => this.fetchPosts());
|
|
254
|
-
this.newNote = '';
|
|
255
|
-
form.form.reset();
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
public removePost(id: number) {
|
|
259
|
-
this._trpc.note.remove.mutate({ id }).then(() => this.fetchPosts());
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
private fetchPosts() {
|
|
263
|
-
this.loadingPosts = true;
|
|
264
|
-
this._trpc.note.list.query().then((notes) => {
|
|
265
|
-
this.loadingPosts = false;
|
|
266
|
-
this.notes = notes;
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addIndexPages = void 0;
|
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
function addIndexPages(tree, options) {
|
|
7
|
-
const templateOptions = Object.assign(Object.assign({}, options), { template: '' });
|
|
8
|
-
let pageDirectory = options.addTailwind ? 'tailwind' : 'css';
|
|
9
|
-
if (options.addTRPC) {
|
|
10
|
-
pageDirectory += '-trpc';
|
|
11
|
-
}
|
|
12
|
-
(0, devkit_1.generateFiles)(tree, path.join(__dirname, '..', 'files', 'index-pages', pageDirectory), options.projectRoot, templateOptions);
|
|
13
|
-
}
|
|
14
|
-
exports.addIndexPages = addIndexPages;
|
|
15
|
-
//# sourceMappingURL=add-index-pages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-index-pages.js","sourceRoot":"","sources":["../../../../../../../../../../packages/nx-plugin/src/generators/app/lib/add-index-pages.ts"],"names":[],"mappings":";;;AAAA,yCAAmD;AACnD,6BAA6B;AAG7B,SAAgB,aAAa,CAAC,IAAU,EAAE,OAA0B;IAClE,MAAM,eAAe,mCAChB,OAAO,KACV,QAAQ,EAAE,EAAE,GACb,CAAC;IACF,IAAI,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7D,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,aAAa,IAAI,OAAO,CAAC;KAC1B;IAED,IAAA,sBAAa,EACX,IAAI,EACJ,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,EACjE,OAAO,CAAC,WAAW,EACnB,eAAe,CAChB,CAAC;AACJ,CAAC;AAhBD,sCAgBC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|