-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathcategories.html
129 lines (121 loc) · 6.14 KB
/
categories.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
---
layout: default
title: Categories
description: Browse WI+RE's resource by category.
permalink: /categories/
background:
---
<!-- Page Header -->
{% if page.background %}
<header class="masthead" style="background-image: url('{{ page.background | prepend: site.baseurl | replace: '//', '/' }}')">
{% else %}
<header class="masthead">
{% endif %}
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-10 col-md-11 col-xl-12 mx-auto">
<div class="page-heading">
<div class="masthead-text-box heading-text-box">
<h1>{{ page.title }}</h1>
{% if page.description %}
<span class="subheading">{{ page.description }}</span>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-xl-12 mx-auto">
<h2>WI+RE Categories</h2>
{% assign prepgroups1 = site.documents | where_exp:"item","item.layout != 'team-member'" %}
{% assign prepgroups2 = prepgroups1 | where_exp:"item","item.layout != 'handout'" %}
{% assign prepgroups3 = prepgroups2 | where_exp:"item","item.layout != 'post'"%}
{% assign prepgroups4 = prepgroups3 | where_exp:"item","item.layout != 'embed'"%}
{% assign prepgroups5 = prepgroups4 | where_exp:"item","item.layout != 'embed-simple'"%}
{% assign groups = prepgroups5 | group_by: "category" | sort: "sort-weight" %}
{% for group in groups %}
{% if group.name != '' %}
{% assign anchorname = group.name | slugify %}
<a href="#{{ anchorname }}">
<button type="button" class="btn btn-primary mb-1">
{{ group.name }}
</button>
</a>
{% endif %}
{% endfor %}
{% for group in groups %}
<div class="card mt-5">
<div class="card-header pt-4">
<h2 id="{{ group.name | slugify }}">{{ group.name }}</h2>
</div>
<div class="card-body">
{% assign sorted-items = group.items | sort: "sort-weight" %}
{% for tutorial in sorted-items %}
{% assign mod = forloop.index | modulo: 2 %}
<!-- if in left column-->
{% if mod == 1 %}
<div class="row {% if forloop.rindex > 2 %} border-lg-bottom {% endif %}">
{% endif %}
<div class="col-lg border-sm-bottom {% if mod == 1 %} border-lg-right {% endif %}">
<div class="row">
<div class="col-md-3 align-self-center mt-3">
<a href="{{ tutorial.url | relative_url | replace: '//', '/' }}" class="d-none d-md-block" style="max-width: 100%;">
{% if tutorial.thumbnail %}
<img src="{{ tutorial.thumbnail | relative_url }}" class=" img-fluid d-none d-md-block" style="max-width: 100%;" alt="Tutorial icon">
{% else %}
<img src="{{ '/assets/images/icons/tutorial-tn.png' | relative_url }}" class="img-fluid" style="max-width: 100%;" alt="Tutorial icon">
{% endif %}
</a>
</div>
<div class="col-md-9 align-self-center mt-3">
<h3 class="mt-0"><a href="{{ tutorial.url | relative_url | replace: '//', '/' }}">{{ tutorial.title }}</a></h3>
</div>
</div>
<p class="post-subtitle text-justify">
{% if tutorial.description %}
{{ tutorial.description }}
{% else %}
{{ tutorial.excerpt | strip_html | truncatewords: 30 }}
{% endif %}
</p>
<!--learning outcome tool tip-->
<!--
{% if tutorial.learning-outcomes %}
{% assign outcomeoutput = "" %}
{% for outcome in tutorial.learning-outcomes %}
{% assign outcomeoutput = outcomeoutput | append: "•" | append: outcome | append: " " %}
{% endfor %}
<div class="btn-group btn-group-sm float-left mb-3" role="group" aria-label="Learning Outcomes">
<a href="" data-html="true" class="btn btn-secondary" data-toggle="tooltip" text-align="left" data-placement="top" title="{{ outcomeoutput }}">Learning Outcomes</a>
</div>
{% endif %}
-->
<div class="btn-group btn-group-sm float-right mb-3" role="group" aria-label="Actions">
<a href="{{ tutorial.url | relative_url | replace: '//', '/' }}" class="btn btn-primary">{{ tutorial.layout }}</a>
{% if tutorial.handout %}
<a href="{{ tutorial.handout | relative_url }}" class="btn btn-primary">Handout</a>
{% endif %}
</div>
</div>
<!-- if in right column-->
{% if mod == 0 %}
</div>
{% endif %}
<!-- if in left column and last post in category-->
{% if mod == 1 and forloop.last == true %}
<div class="col-lg">
</div>
</div>
{% endif %}
{%endfor%}
</div>
</div>
{%endfor%}
{% include pager.html %}
</div>
</div>
</div>