forked from modulexcite/academy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
105 lines (102 loc) · 4.4 KB
/
index.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
layout: default
---
{% include hero.html %}
<div class="wrapper">
<!-- Tutorials with parts -->
<h3 class="tutorial__category" id="frontend">Frontend</h3>
{% for collection in site.collections %}
{% if collection.category == "Frontend" %}
<section class="tutorial">
<h4 id="{{ collection.label }}" class="tutorial__title">{{ collection.title }}</h4>
<section class="tutorial__parts">
{% for docs in collection.docs %}
{% assign loopindex = forloop.index0 | modulo: 2 %}
{% capture thecycle %}{% cycle 'odd', 'even' %}{% endcapture %}
{% if loopindex == 0 %}
<div class="tutorial__row">
{% endif %}
{% assign className = "" %}
{% if forloop.last and thecycle == 'odd' %}
{% capture className %}{{ className }}{{ "tutorial-part--wide" }}{% endcapture %}
{% endif %}
{% if docs.finished == false %}
{% capture className %}{{ className }} {{ "tutorial-part--unfinished" }}{% endcapture %}
{% endif %}
<!-- site-internal tutorials -->
{% if collection.output == true %}
{% if docs.finished == false %}
<a class="tutorial-part {{ className }}">
{% else %}
<a class="tutorial-part {{ className }}" href="{{ docs.url }}">
{% endif %}
{% if docs.finished == false %}
<p class="tutorial-part__title-part">Coming soon</p>
{% elsif collection.docs.size != 1 %}
<p class="tutorial-part__title-part">Chapter {{ forloop.index }}</p>
{% endif %}
<h5 class="tutorial-part__title">{{ docs.title }}</h5>
<!-- <p class="tutorial-part__desc">{{ docs.description }}</p> -->
</a>
<!-- external tutorials -->
{% else %}
<a class="tutorial-part {{ className }}" href="{{ docs.links_to }}">
{% if collection.docs.size != 1 %}
<p class="tutorial-part__title-part">Part {{ forloop.index }}</p>
{% endif %}
<h3 class="tutorial-part__title">{{ docs.title }}</h3>
<!-- <p class="tutorial-part__desc">{{ docs.description }}</p> -->
</a>
{% endif %}
{% if loopindex == 1 %}
</div>
{% endif %}
{% endfor %}
</section>
</section>
{% endif %}
{% endfor %}
<h3 class="tutorial__category" id="datascience">Data Science</h3>
{% for collection in site.collections %}
{% if collection.category == "Data Science" %}
<section class="tutorial">
<h4 id="{{ collection.label }}" class="tutorial__title">{{ collection.title }}</h4>
<section class="tutorial__parts">
{% for docs in collection.docs %}
{% assign loopindex = forloop.index0 | modulo: 2 %}
{% if loopindex == 0 %}
<div class="tutorial__row">
{% endif %}
{% if collection.docs.size == 1 %}
{% assign className = "tutorial-part--wide" %}
{% else %}
{% assign className = "" %}
{% endif %}
<!-- site-internal tutorials -->
{% if collection.output == true %}
<a class="tutorial-part {{ className }}" href="{{ docs.url }}">
{% if collection.docs.size != 1 %}
<p class="tutorial-part__title-part">Part {{ forloop.index }}</p>
{% endif %}
<h5 class="tutorial-part__title">{{ docs.title }}</h5>
<!-- <p class="tutorial-part__desc">{{ docs.description }}</p> -->
</a>
<!-- external tutorials -->
{% else %}
<a class="tutorial-part {{ className }}" href="{{ docs.links_to }}">
{% if collection.docs.size != 1 %}
<p class="tutorial-part__title-part">Part {{ forloop.index }}</p>
{% endif %}
<h3 class="tutorial-part__title">{{ docs.title }}</h3>
<!-- <p class="tutorial-part__desc">{{ docs.description }}</p> -->
</a>
{% endif %}
{% if loopindex == 1 %}
</div>
{% endif %}
{% endfor %}
</section>
</section>
{% endif %}
{% endfor %}
</div>