Remove software carpentries logo
[rnaseq-cwl-training.git] / _includes / episode_overview.html
1 {% comment %}
2     Display episode's timings and learning objectives.
3
4     Regarding the `if page.*** == nil` below:
5     all-in-one page combines all episodes into one.
6     It, therefore, does not define its own objectives, exercises,
7     and questions, which 'normal' episodes define in the front matter.
8
9     To display episodes' teaching and exercise times, as well as episode
10     questions and objectives, we pass them as parameters to the Liquid's
11     `include` statement when we generate the page:
12
13          include episode_overview.html teaching_time=e.teaching ...
14
15     Here we obtain the information we need either from the episode itself or
16     from the parameters passed in.
17 {% endcomment %}
18
19 {% if page.teaching == nil %}
20 {% assign teaching_time = include.teaching_time %}
21 {% else %}
22 {% assign teaching_time = page.teaching %}
23 {% endif %}
24
25 {% if page.exercises == nil %}
26 {% assign exercise_time = include.exercise_time %}
27 {% else %}
28 {% assign exercise_time = page.exercises %}
29 {% endif %}
30
31 {% if page.questions == nil %}
32 {% assign episode_questions = include.episode_questions %}
33 {% else %}
34 {% assign episode_questions = page.questions %}
35 {% endif %}
36
37 {% if page.objectives == nil %}
38 {% assign episode_objectives = include.episode_objectives %}
39 {% else %}
40 {% assign episode_objectives = page.objectives %}
41 {% endif %}
42
43
44 <blockquote class="objectives">
45   <h2>Overview</h2>
46
47   <div class="row">
48     <div class="col-md-3">
49       <strong>Teaching:</strong> {{ teaching_time }} min
50       <br/>
51       <strong>Exercises:</strong> {{ exercise_time }} min
52     </div>
53     <div class="col-md-9">
54       <strong>Questions</strong>
55       <ul>
56         {% for question in episode_questions %}
57         <li>{{ question|markdownify }}</li>
58         {% endfor %}
59       </ul>
60     </div>
61   </div>
62
63   <div class="row">
64     <div class="col-md-3">
65     </div>
66     <div class="col-md-9">
67       <strong>Objectives</strong>
68       <ul>
69         {% for objective in episode_objectives %}
70         <li>{{ objective|markdownify }}</li>
71         {% endfor %}
72       </ul>
73     </div>
74   </div>
75
76 </blockquote>