Skip to content

Commit ee790f1

Browse files
authored
feat: made runtime module page look nicer (#135)
1 parent 4925cf1 commit ee790f1

File tree

4 files changed

+78
-77
lines changed

4 files changed

+78
-77
lines changed

src/app/docs/runtime/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ng_project(
1414
"runtime.component.css",
1515
"runtime.component.html",
1616
"runtime.component.ts",
17+
"runtime-module-block.component.html",
1718
"runtime-routing.module.ts",
1819
],
1920
deps = [
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<div class="px-4 py-2 rounded-2xl shadow-xl h-full border border-opacity-30">
2+
<div class="flex flex-row gap-3 items-center">
3+
<h3 [attr.id]="moduleName + '-module'">{{ moduleName }}</h3>
4+
<p>
5+
<a
6+
[routerLink]="'/reference/ecsact_runtime/' + moduleName + '_8h'"
7+
fragment="functions"
8+
><span class="i24">article</span> ecsact/runtime/{{ moduleName }}.h</a
9+
>
10+
</p>
11+
</div>
12+
<div>
13+
<ng-content />
14+
</div>
15+
</div>

src/app/docs/runtime/runtime.component.html

Lines changed: 47 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -11,85 +11,58 @@ <h1>Ecsact Runtime Library</h1>
1111
>.
1212
</p>
1313
<h2 id="modules">Modules</h2>
14+
<div class="grid lg:grid-cols-2 gap-4 pb-8">
15+
<div moduleBlock="core">
16+
<p>
17+
The core module deals with storage and system execution on that storage.
18+
Entities and their components' data are stored inside a
19+
<em>registry</em>. Systems and actions are executed on a registry's
20+
stored entities and their components based on the system or actions
21+
capabilities.
22+
</p>
23+
</div>
1424

15-
<h3 id="core-module">Core</h3>
16-
<p>
17-
The core module deals with storage and system execution on that storage.
18-
Entities and their components' data are stored inside a <em>registry</em>.
19-
Systems and actions are executed on a registry's stored entities and their
20-
components based on the system or actions capabilities.
21-
</p>
22-
<p>
23-
Module methods are available in
24-
<a routerLink="/reference/ecsact_runtime/core_8h" fragment="functions"
25-
><span class="i24">article</span> ecsact/runtime/core.h</a
26-
>
27-
</p>
25+
<div moduleBlock="async">
26+
<p>
27+
The async module handles everything involving using an external async
28+
execution. This includes flushing events, enqueuing execution options,
29+
and receiving async specific errors.
30+
</p>
31+
</div>
2832

29-
<h3 id="async-module">Async</h3>
30-
<p>
31-
The async module handles everything involving using an external async
32-
execution. This includes flushing events, enqueuing execution options, and
33-
receiving async specific errors.
34-
</p>
35-
<p>
36-
Async methods are available in
37-
<a routerLink="/reference/ecsact_runtime/async_8h"
38-
><span class="i24">article</span> ecsact/runtime/async.h</a
39-
>
40-
</p>
33+
<div moduleBlock="dynamic">
34+
<p>
35+
The dynamic module is responsible for creating new <em>types</em> and
36+
even packages at runtime. A type includes enums, components, systems and
37+
actions. Everything you can create when writing an Ecsact file you can
38+
do programmatically with the dynamic module.
39+
</p>
40+
</div>
4141

42-
<h3 id="dynamic-module">Dynamic</h3>
43-
<p>
44-
The dynamic module is responsible for creating new <em>types</em> and even
45-
packages at runtime. A type includes enums, components, systems and actions.
46-
Everything you can create when writing an Ecsact file you can do
47-
programmatically with the dynamic module.
48-
</p>
49-
<p>
50-
Module methods are available in
51-
<a routerLink="/reference/ecsact_runtime/dynamic_8h" fragment="functions"
52-
><span class="i24">article</span> ecsact/runtime/dynamic.h</a
53-
>
54-
</p>
42+
<div moduleBlock="meta">
43+
<p>
44+
The meta module reveals extra information about the runtime. This
45+
includes debug information, type names, composite fields, system
46+
capabilities and much more. This module isn't needed for simulation and
47+
is mostly used for debugging and tooling.
48+
</p>
49+
</div>
5550

56-
<h3 id="meta-module">Meta</h3>
57-
<p>
58-
The meta module reveals extra information about the runtime. This includes
59-
debug information, type names, composite fields, system capabilities and
60-
much more. This module isn't needed for simulation and is mostly used for
61-
debugging and tooling.
62-
</p>
63-
<p>
64-
Module methods are available in
65-
<a routerLink="/reference/ecsact_runtime/meta_8h" fragment="functions"
66-
><span class="i24">article</span> ecsact/runtime/meta.h</a
67-
>
68-
</p>
69-
70-
<h3 id="serialize-module">Serialize</h3>
71-
<p>
72-
The serialize module gives a simple API for serializing composites. Useful
73-
for saving simulation state or sending information over a network.
74-
</p>
75-
<p>
76-
Module methods are available in
77-
<a routerLink="/reference/ecsact_runtime/serialize_8h" fragment="functions"
78-
><span class="i24">article</span> ecsact/runtime/serialize.h</a
79-
>
80-
</p>
51+
<div moduleBlock="serialize">
52+
<p>
53+
The serialize module gives a simple API for serializing composites.
54+
Useful for saving simulation state or sending information over a
55+
network.
56+
</p>
57+
</div>
8158

82-
<h3 id="static-module">Static</h3>
83-
<p>
84-
The static module reveals a set of components, systems, and actions that
85-
were available at compile-time when the runtime was built.
86-
</p>
87-
<p>
88-
Module methods are available in
89-
<a routerLink="/reference/ecsact_runtime/static_8h" fragment="functions"
90-
><span class="i24">article</span> ecsact/runtime/static.h</a
91-
>
92-
</p>
59+
<div moduleBlock="static">
60+
<p>
61+
The static module reveals a set of components, systems, and actions that
62+
were available at compile-time when the runtime was built.
63+
</p>
64+
</div>
65+
</div>
9366

9467
<h2 id="runtime-configurations">Runtime Configurations</h2>
9568
<p>
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
import {ChangeDetectionStrategy, Component} from '@angular/core';
2-
import {RouterLink} from '@angular/router';
1+
import {CommonModule, NgTemplateOutlet} from '@angular/common';
2+
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
3+
import {RouterLink, RouterModule} from '@angular/router';
4+
5+
@Component({
6+
selector: '[moduleBlock]',
7+
templateUrl: 'runtime-module-block.component.html',
8+
standalone: true,
9+
imports: [RouterModule, CommonModule],
10+
})
11+
export class RuntimeModuleBlock {
12+
@Input('moduleBlock')
13+
moduleName: string = '';
14+
}
315

416
@Component({
517
templateUrl: 'runtime.component.html',
618
styleUrls: ['runtime.component.scss'],
719
changeDetection: ChangeDetectionStrategy.OnPush,
820
standalone: true,
9-
imports: [RouterLink],
21+
imports: [RouterLink, NgTemplateOutlet, RuntimeModuleBlock],
1022
})
1123
export class RuntimeComponent {}

0 commit comments

Comments
 (0)