-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathindex.html
98 lines (95 loc) · 4.12 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
---
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[1].category == "Frontend" %}
<section class="tutorial">
<!-- Note: collection[1] is necessary because of a Jekyll bug that isn't resolved in the current version -->
<h4 id="{{ collection[1].label }}" class="tutorial__title">{{ collection[1].title }}</h4>
<section class="tutorial__parts">
{% for docs in collection[1].docs %}
{% assign loopindex = forloop.index0 | modulo: 2 %}
{% if loopindex == 0 %}
<div class="tutorial__row">
{% endif %}
{% if collection[1].docs.size == 1 %}
{% assign className = "tutorial-part--wide" %}
{% else %}
{% assign className = "" %}
{% endif %}
<!-- site-internal tutorials -->
{% if collection[1].output == true %}
<a class="tutorial-part {{ className }}" href="{{ docs.url }}">
{% if collection[1].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[1].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[1].category == "Data Science" %}
<section class="tutorial">
<!-- Note: collection[1] is necessary because of a Jekyll bug that isn't resolved in the current version -->
<h4 id="{{ collection[1].label }}" class="tutorial__title">{{ collection[1].title }}</h4>
<section class="tutorial__parts">
{% for docs in collection[1].docs %}
{% assign loopindex = forloop.index0 | modulo: 2 %}
{% if loopindex == 0 %}
<div class="tutorial__row">
{% endif %}
{% if collection[1].docs.size == 1 %}
{% assign className = "tutorial-part--wide" %}
{% else %}
{% assign className = "" %}
{% endif %}
<!-- site-internal tutorials -->
{% if collection[1].output == true %}
<a class="tutorial-part {{ className }}" href="{{ docs.url }}">
{% if collection[1].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[1].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>