Skip to content

Commit d9099d5

Browse files
Kelwanzaucy
authored andcommitted
formatting, add ids and links. Fixed showcase and enums
1 parent 2aca13e commit d9099d5

File tree

10 files changed

+46
-66
lines changed

10 files changed

+46
-66
lines changed

src/app/docs/overview/overview.component.html

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ <h1 id="title">Documentation Overview</h1>
4646
<p>(TODO animate character dying)</p>
4747
</div>
4848
</ecsact-example-diagram>
49+
4950
<section class="my-8 mx-auto px-2">
50-
<div class="grid grid-cols-2 gap-x-10 gap-y-8">
51+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-x-10 gap-y-8">
5152
<ecsact-showcase
5253
[title]="'The Basics'"
5354
[description]="'Learn more about what drives Ecsact'"
@@ -68,14 +69,6 @@ <h1 id="title">Documentation Overview</h1>
6869
Language
6970
</span>
7071
</a>
71-
<a
72-
class="btn text-secondary/50 bg-primary-bright"
73-
routerLink="/docs/setup">
74-
<span class="text-black">
75-
<span class="i48">memory</span>
76-
Setup
77-
</span>
78-
</a>
7972
</ecsact-showcase>
8073
<ecsact-showcase
8174
[title]="'Systems'"
@@ -85,26 +78,18 @@ <h1 id="title">Documentation Overview</h1>
8578
class="btn text-secondary/50 bg-primary-bright"
8679
routerLink="/docs/system-impl">
8780
<span class="text-black">
88-
<span class="i48">school</span>
81+
<span class="i48">Settings</span>
8982
System Implementations
9083
</span>
9184
</a>
9285
<a
9386
class="btn text-secondary/50 bg-primary-bright"
9487
routerLink="/docs/system-execution">
9588
<span class="text-black">
96-
<span class="i48">psychology</span>
89+
<span class="i48">Engineering</span>
9790
System Execution
9891
</span>
9992
</a>
100-
<a
101-
class="btn text-secondary/50 bg-primary-bright"
102-
routerLink="/docs/system-impl-wasm">
103-
<span class="text-black">
104-
<span class="i48">memory</span>
105-
Wasm Systems Overview
106-
</span>
107-
</a>
10893
</ecsact-showcase>
10994
<ecsact-showcase
11095
[title]="'Unity Integration'"
@@ -114,26 +99,18 @@ <h1 id="title">Documentation Overview</h1>
11499
class="btn text-secondary/50 bg-primary-bright"
115100
routerLink="/docs/defaults">
116101
<span class="text-black">
117-
<span class="i48">school</span>
102+
<span class="i48">library_books</span>
118103
Defaults Class
119104
</span>
120105
</a>
121106
<a
122107
class="btn text-secondary/50 bg-primary-bright"
123108
routerLink="/docs/entities">
124109
<span class="text-black">
125-
<span class="i48">psychology</span>
110+
<span class="i48">add_circle</span>
126111
Creating Entities
127112
</span>
128113
</a>
129-
<a
130-
class="btn text-secondary/50 bg-primary-bright"
131-
routerLink="/docs/unity-sync">
132-
<span class="text-black">
133-
<span class="i48">memory</span>
134-
Unity Sync
135-
</span>
136-
</a>
137114
</ecsact-showcase>
138115
<ecsact-showcase
139116
[title]="'Runtime'"
@@ -147,20 +124,12 @@ <h1 id="title">Documentation Overview</h1>
147124
Runtime
148125
</span>
149126
</a>
150-
<a
151-
class="btn text-secondary/50 bg-primary-bright"
152-
routerLink="/docs/runtime-builder">
153-
<span class="text-black">
154-
<span class="i48">memory</span>
155-
Runtime Builder
156-
</span>
157-
</a>
158127
<a
159128
class="btn text-secondary/50 bg-primary-bright"
160129
routerLink="/docs/runtime-implementations">
161130
<span class="text-black">
162131
<span class="i48">memory</span>
163-
Implementations
132+
Runtime Implementations
164133
</span>
165134
</a>
166135
</ecsact-showcase>

src/app/docs/unity/entities/entities.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h1>Creating Entities in Unity</h1>
33
<p>There are multiple ways to create entities in Unity with Ecsact</p>
44
<section>
5-
<h2>Using the Registry</h2>
5+
<h2 id="registry">Using the Registry</h2>
66
<p>
77
The <code>Registry</code> can be used to create entities. It returns the
88
ID of the entity created
@@ -28,7 +28,7 @@ <h2 id="dynamic_entity">Dynamic Entity</h2>
2828
when Unity Sync is enabled.
2929
</p>
3030
<section>
31-
<h2>Generating Entities</h2>
31+
<h2 id="generating-entities">Generating Entities</h2>
3232
<p>
3333
Entities can be generated within Ecsact by declaring it and calling it
3434
through the context with <code>.Generate</code>

src/app/docs/unity/unity-sync/unity-sync.component.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<article>
22
<h1>Using Unity Sync</h1>
33
<section>
4-
<h2>Introduction</h2>
4+
<h2 id="introduction">Introduction</h2>
55
<p>
66
Unity Sync is an optional part of Ecsact for Unity. Monobehaviour scripts
77
can be added to entities automatically if the entity fulfills the
88
requirements of the script. There a few ways this can happen
99
</p>
1010
</section>
1111
<section>
12-
<h2>IRequired</h2>
12+
<h2 id="required">IRequired</h2>
1313
<p>
1414
<code>Ecsact.UnitySync.IRequired<{{ 'package.componentType' }}></code>
1515
</p>
@@ -19,7 +19,7 @@ <h2>IRequired</h2>
1919
</p>
2020
</section>
2121
<section>
22-
<h2>IOnInitComponent</h2>
22+
<h2 id="on-init">IOnInitComponent</h2>
2323
<p>
2424
<code>Ecsact.Unity.IOnInitComponent<{{ 'package.ComponentType' }}></code>
2525
</p>
@@ -30,7 +30,7 @@ <h2>IOnInitComponent</h2>
3030
</p>
3131
</section>
3232
<section>
33-
<h2>IOnUpdateComponent</h2>
33+
<h2 id="on-update">IOnUpdateComponent</h2>
3434
<p>
3535
<code
3636
>Ecsact.Unity.IOnUpdateComponent<{{ 'package.ComponentType' }}></code
@@ -43,7 +43,7 @@ <h2>IOnUpdateComponent</h2>
4343
</p>
4444
</section>
4545
<section>
46-
<h2>IOnRemoveComponent</h2>
46+
<h2 id="on-remove">IOnRemoveComponent</h2>
4747
<p>
4848
<code
4949
>Ecsact.Unity.IOnRemoveComponent<{{ 'package.ComponentType' }}></code

src/app/tutorials/unity/basic-example/basic-example.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ <h2 id="system-implement">Implementing a System</h2>
202202
</p>
203203
</section>
204204
<section>
205-
<h2>Next Steps</h2>
205+
<h2 id="next-steps">Next Steps</h2>
206206
<p>
207207
This taught you the basics of using Ecsact with Unity. If you want to
208208
learn more about Unity Sync and Nested Systems, check out

src/app/tutorials/unity/moving-block/moving-block.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,10 @@ <h2 id="collision">Basic Collision</h2>
505505
</code-block-variation>
506506
<p>
507507
There's only 1 system implementation. If there's nothing for a
508-
<code>system</code> to consider then the system is considered trivial.
509-
(TODO: Link to Trivial System docs)
508+
<code>system</code> to consider then the system is considered
509+
<a routerLink="/docs/system-impl" fragment="#trivial-implementations"
510+
>trivial</a
511+
>.
510512
</p>
511513
<p>
512514
To add Colliders to our static objects in a scene, we'll create a script

src/components/doxygen-enum-def/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ ng_ts_project(
1919
":styles",
2020
],
2121
deps = [
22-
"//src/components/doxygen-member-components/doxygen-access",
2322
"//src/components/doxygen-member-components/doxygen-description",
2423
"//src/components/doxygen-member-components/doxygen-location",
24+
"//src/components/doxygen-member-components/doxygen-name",
2525
"//src/components/doxygen-member-components/doxygen-parameters",
2626
"//src/search:doxygen-def-types",
2727
"@npm//@angular/common",
Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
<doxygen-access [access]="def.access" [static]="def.static"></doxygen-access>
2-
<doxygen-description
3-
[description]="def.detailedDescription"></doxygen-description>
1+
<doxygen-name [access]="def.access" [static]="def.static"
2+
><h1>{{ def.name }}</h1></doxygen-name
3+
>
44
<h3>Parameters</h3>
5-
<div *ngFor="let parameter of def.parameters">
6-
<doxygen-parameters
7-
[name]="parameter.name"
8-
[description]="parameter.detailedDescription"
9-
[access]="parameter.access"
10-
[initializer]="parameter.initializer"></doxygen-parameters>
5+
<div
6+
*ngFor="let parameter of def.parameters"
7+
class="odd:bg-black/5 dark:odd:bg-white/5">
8+
<div class="flex flex-row">
9+
<div class="pl-2 py-4" id="{{ parameter.name }}">
10+
<code>{{ parameter.name }}</code>
11+
</div>
12+
<div class="pl-2 py-4">
13+
<code>{{ parameter.initializer }}</code>
14+
</div>
15+
</div>
16+
<div class="pb-2 pl-2">
17+
<doxygen-description
18+
[description]="def.detailedDescription"></doxygen-description>
19+
</div>
1120
</div>
1221
<doxygen-location [location]="def.location"></doxygen-location>

src/components/doxygen-enum-def/doxygen-enum-def.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {NgModule} from '@angular/core';
22
import {CommonModule} from '@angular/common';
3-
import {DoxygenAccessModule} from '../doxygen-member-components/doxygen-access/doxygen-access.module';
3+
import {DoxygenNameModule} from '../doxygen-member-components/doxygen-name/doxygen-name.module';
44
import {DoxygenParametersModule} from '../doxygen-member-components/doxygen-parameters/doxygen-parameters.module';
55
import {DoxygenLocationModule} from '../doxygen-member-components/doxygen-location/doxygen-location.module';
66
import {DoxygenDescriptionModule} from '../doxygen-member-components/doxygen-description/doxygen-description.module';
@@ -12,7 +12,7 @@ import {DoxygenEnumDefComponent} from './doxygen-enum-def.component';
1212
declarations: [DoxygenEnumDefComponent],
1313
imports: [
1414
CommonModule,
15-
DoxygenAccessModule,
15+
DoxygenNameModule,
1616
DoxygenParametersModule,
1717
DoxygenLocationModule,
1818
DoxygenDescriptionModule,
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<div class="flex flex-col bg-white rounded-xl">
1+
<div class="flex flex-col bg-secondary/20 rounded-xl">
22
<div>
3-
<img class="h-80 max-h-80 w-full" src="{{ img }}" />
3+
<img class="h-64 max-h-64 sm:h-80 sm:max-h-80 w-full" src="{{ img }}" />
44
</div>
55
<div>
6-
<h2 class="px-4 text-black mb-2">{{ title }}</h2>
7-
<p class="text-black px-4 font-semibold text-lg">
6+
<h2 class="px-4 light:text-black dark:text-white mb-2">{{ title }}</h2>
7+
<p class="light: text-black dark:text-white px-4 font-semibold text-lg">
88
{{ description }}
99
</p>
1010
</div>
1111

1212
<div
13-
class="grid grid-flow-row grid-cols-3 overflow-auto max-w-max gap-4 pb-4 px-4 grow justify-evenly items-stretch">
13+
class="grid grid-flow-col sm:grid-flow-row grid-rows-2 sm:grid-rows-1 grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-4 pb-2 px-2 grow justify-evenly auto-cols-max w-full">
1414
<ng-content></ng-content>
1515
</div>
1616
</div>

src/search/doxygen-parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const doxygenMemberDefParseFns = {
127127
let param: DoxygenEnumParameter = {
128128
name: paramEl.querySelector('name').textContent.trim(),
129129
initializer: paramEl.querySelector('initializer').textContent.trim(),
130-
access: paramEl.querySelector('prot') as any,
130+
access: paramEl.getAttribute('prot') as any,
131131
brief: paramEl.querySelector('briefdescription').textContent.trim(),
132132
detailedDescription: detailedDescription,
133133
};

0 commit comments

Comments
 (0)