forked from Adrijaned/Terasology.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapimodules.html
More file actions
79 lines (75 loc) · 2.28 KB
/
apimodules.html
File metadata and controls
79 lines (75 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
layout: page
title: "Officially recommended modules providing common functionality"
---
{% for module in site.api_modules %}
{% assign loopindex = forloop.index0 | modulo: 2 %}
{% if loopindex == 0 %}
<div class="row">
{% endif %}
<div class="col s12 m6">
<div class="card teal accent-2">
<div class="card-content">
<span class="card-title">{{module.name}}</span>
<p>{{module.description}}</p>
</div>
<div class="card-action">
<a class="modal-trigger orange-text text-darken-1" href="#modal{{module.name}}">See more details</a>
</div>
</div>
</div>
{% if loopindex == 1 or forloop.last %}
</div>
{% endif %}
{% endfor %}
{% for module in site.api_modules %}
<div class="modal" id="modal{{module.name}}">
<div class="modal-content">
<h1>{{module.name}}</h1>
<p>{{module.description}}</p>
{{module.content | markdownify}}
{% comment %} Check if module has any components at all {% endcomment %}
{% assign has_components = false %}
{% for component in site.components %}
{% if component.module == module.name %}
{% assign has_components = true %}
{% endif %}
{% endfor %}
{% if has_components %}
<hr/>
<h2>Components</h2>
{% for component in site.components %}
{% if component.module == module.name %}
<div class="card green lighten-5">
<div class="card-content">
<span class="card-title">{{component.name}}</span>
{{component.content | markdownify}}
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% comment %} Check if module has any events at all {% endcomment %}
{% assign has_events = false %}
{% for event in site.events %}
{% if event.module == module.name %}
{% assign has_events = true %}
{% endif %}
{% endfor %}
{% if has_events %}
<hr/>
<h2>Events</h2>
{% for event in site.events %}
{% if event.module == module.name %}
<div class="card amber lighten-5">
<div class="card-content">
<span class="card-title">{{event.name}}</span>
{{event.content | markdownify}}
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
{% endfor %}