X-Git-Url: https://git.arvados.org/rnaseq-cwl-training.git/blobdiff_plain/a366bcc32fd4be263e917e6a2d4b1bdce0515010..2c6b97e57dce86830bdbde8d9f8a871c0b46a035:/_includes/episode_overview.html diff --git a/_includes/episode_overview.html b/_includes/episode_overview.html index cb87e0f..8c273ac 100644 --- a/_includes/episode_overview.html +++ b/_includes/episode_overview.html @@ -1,19 +1,59 @@ {% comment %} - Display an episode's timings and learning objectives. +Muestre los tiempos y los objetivos de aprendizaje de un episodio. + + Regarding the `if page.*** == nil` below: + all-in-one page combines all episodes into one. + It, therefore, does not define its own objectives, exercises, + and questions, which 'normal' episodes define in the front matter. + + To display episodes' teaching and exercise times, as well as episode + questions and objectives, we pass them as parameters to the Liquid's + `include` statement when we generate the page: + + include episode_overview.html teaching_time=e.teaching ... + + Here we obtain the information we need either from the episode itself or + from the parameters passed in. {% endcomment %} + +{% if page.teaching == nil %} +{% assign teaching_time = include.teaching_time %} +{% else %} +{% assign teaching_time = page.teaching %} +{% endif %} + +{% if page.exercises == nil %} +{% assign exercise_time = include.exercise_time %} +{% else %} +{% assign exercise_time = page.exercises %} +{% endif %} + +{% if page.questions == nil %} +{% assign episode_questions = include.episode_questions %} +{% else %} +{% assign episode_questions = page.questions %} +{% endif %} + +{% if page.objectives == nil %} +{% assign episode_objectives = include.episode_objectives %} +{% else %} +{% assign episode_objectives = page.objectives %} +{% endif %} + +
-

Overview

+

Hoja de ruta

- Teaching: {{ page.teaching }} min + Leccion: {{ teaching_time }} min
- Exercises: {{ page.exercises }} min + Prácticas: {{ exercise_time }} min
- Questions + Preguntas
    - {% for question in page.questions %} + {% for question in episode_questions %}
  • {{ question|markdownify }}
  • {% endfor %}
@@ -24,9 +64,9 @@
- Objectives + Objetivos
    - {% for objective in page.objectives %} + {% for objective in episode_objectives %}
  • {{ objective|markdownify }}
  • {% endfor %}