Skip to content

Commit eaf9d6c

Browse files
authored
feat(docs): center images (#206)
1 parent 9f81c6d commit eaf9d6c

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

docs/docs/getting-started/04-examples/01-timer-example.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
sidebar_position: 1
33
---
44

5+
import autoLifecycleEventsTimer from './assets/auto-lifecycle-events-timer.png'
6+
import timerExample from './assets/timer-example.gif'
7+
58
# A basic application example
69

710
This example will show how components and predicate events can be used to create dynamic behavior in an AICA
@@ -129,7 +132,9 @@ Similarly, the next event activates the timer when it is configured:
129132
When a lifecycle component configures or activates itself automatically, this is known as "auto-configure" and
130133
"auto-activate", respectively. The graph shows these events with the green icons next to the component name.
131134

132-
![auto lifecycle timer](./assets/auto-lifecycle-events-timer.png)
135+
<div class="text--center">
136+
<img src={autoLifecycleEventsTimer} alt="Auto lifecycle events timer example" />
137+
</div>
133138

134139
Thereafter, the timer component has a special predicate `is_timed_out`, which is internally associated with the `timeout`
135140
parameter.
@@ -182,7 +187,9 @@ predicate goes from false to true. As a result, the `transition` event causes `t
182187
loaded instead. The second timer then goes through the same steps of configuring and activating before transitioning
183188
back to the first timer.
184189

185-
![timer example (animated)](./assets/timer-example.gif)
190+
<div class="text--center">
191+
<img src={timerExample} alt="Timer example" />
192+
</div>
186193

187194
In the AICA System, events are the key drivers of application logic. While the application is running, events can be
188195
triggered automatically from transitions or predicates, as seen in this example, but also by other event sources such

docs/docs/getting-started/04-examples/02-editor-example.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
sidebar_position: 2
33
---
44

5+
import eventEdge from './assets/event-edge.png'
6+
import eventSourceHandle from './assets/event-source-handle.png'
57
import Tabs from '@theme/Tabs';
68
import TabItem from '@theme/TabItem';
9+
import timerSettings from './assets/timer-settings.png'
10+
import triggerButtons from './assets/trigger-buttons.gif'
711

812
# The application graph editor
913

@@ -23,7 +27,9 @@ can also be used to navigate around the graph.
2327
Component parameters and settings can be edited directly from the graph view. Click on the gear icon of the first Timer
2428
component to open its settings panel. The settings panel can be closed with the X or by clicking anywhere in the graph.
2529

26-
![timer settings](./assets/timer-settings.png)
30+
<div class="text--center">
31+
<img src={timerSettings} alt="Timer settings" />
32+
</div>
2733

2834
### Auto-lifecycle events
2935

@@ -83,9 +89,6 @@ also be deleted by selecting them with a click and pressing the Delete key on yo
8389
</TabItem>
8490
</Tabs>
8591
86-
To delete an element from the graph, press the small menu icon in its top right corner, then click Remove. Elements can
87-
also be deleted by selecting them with a click and pressing the Delete keyboard shortcut.
88-
8992
For this example, let's add a "Trigger Events Button" to the timer application by clicking on it in the sidebar. A new
9093
button should appear on the graph and in the code. This is an interactive elements that can be used to trigger events
9194
through mouse clicks and interact with the flow of the application.
@@ -103,7 +106,9 @@ changes again and the draft edge snaps in place, at which point you can let go o
103106
valid, it will create a new event edge with the default event (Load). Event source handles are found under transitions
104107
and predicates of a component and look like that:
105108
106-
![event handle](./assets/event-source-handle.png)
109+
<div class="text--center">
110+
<img src={eventSourceHandle} alt="Event source handle" />
111+
</div>
107112
108113
:::note
109114
@@ -124,15 +129,19 @@ desired event. This will close the selection menu and update the YAML code accor
124129
125130
For this example, choose the Deactivate event in order to pause the timer on click of the button.
126131
127-
![event edge](./assets/event-edge.png)
132+
<div class="text--center">
133+
<img src={eventEdge} alt="Event edge" />
134+
</div>
128135
129136
Clicking on an edge also selects it, which is indicated by the increased line thickness. Clicking away from the edge
130137
will deselect it. While the edge is selected, press the Delete key to delete the edge. This will also remove the
131138
event from the YAML representation.
132139
133140
Now add a second trigger button, create a new event edge to Timer 2 and choose the Activate event type.
134141
135-
![trigger buttons](./assets/trigger-buttons.gif)
142+
<div class="text--center">
143+
<img src={triggerButtons} alt="Trigger buttons example" />
144+
</div>
136145
137146
## Renaming elements in the graph
138147

0 commit comments

Comments
 (0)