Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
raku-course/_includes/nav.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
176 lines (145 sloc)
6.27 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
#### prev | |
* prev_part: {{prev_part.title}} | |
* prev_section: {{prev_section.title}}, part={{prev_section_part.title}} | |
* prev_topic: {{prev_topic.title}}, part={{prev_topic_part.title}}, section={{prev_topic_section.title}} | |
#### curr | |
* curr_part: {{curr_part.title}} | |
* curr_section: {{curr_section.title}} | |
* curr_topic: {{curr_topic.title}} | |
#### next | |
* next_part: {{next_part.title}} | |
* next_section: {{next_section.title}}, part={{next_section_part.title}} | |
* next_topic: {{next_topic.title}}, part={{next_topic_part.title}}, section={{next_topic_section.title}} | |
{% endcomment %} | |
{% if curr_quiz == nil and L3 != 'exercises' %} | |
{% include topics.html %} | |
{% endif %} | |
{%- if next_quiz and next_quiz_topic and next_quiz_topic.url == curr_topic.url %} | |
%%practiceblock | |
## More practice | |
* [{{next_quiz.title}}](/{{curr_part.url}}/{{curr_section.url}}/{{curr_topic.url}}/{{next_quiz.url}}) | |
%%/practiceblock | |
{%- endif %} | |
{%- if next_quiz and next_quiz_section and next_quiz_section.url == curr_section.url and curr_quiz_topic == nil %} | |
%%practiceblock | |
## More practice | |
* [{{next_quiz.title}}](/{{curr_part.url}}/{{curr_section.url}}/{{next_quiz.url}}) | |
%%/practiceblock | |
{% endif %} | |
{%- if curr_topic and L3 != 'exercises' %} | |
{%- if curr_topic.quizzes and curr_quiz == nil %} | |
%%practiceblock | |
## Practice | |
Complete the {% if curr_topic.quizzes.size != 1%}quizzes that cover{% else %}quiz that covers{% endif %} the contents of this topic. | |
{%- for quiz in curr_topic.quizzes %} | |
* [{{quiz.title}}](/{{curr_part.url}}/{{curr_section.url}}/{{curr_topic.url}}/{{quiz.url}}) | |
{%- endfor %} | |
{% endif %} | |
%%/practiceblock | |
{% else %} | |
{% if curr_section.quizzes and curr_quiz == nil and L3 != 'exercises' %} | |
%%practiceblock | |
## Practice | |
Complete the {% if curr_section.quizzes.size != 1%}quizzes that cover{% else %}quiz that covers{% endif %} the contents of this topic. | |
{%- for quiz in curr_section.quizzes %} | |
* [{{quiz.title}}](/{{curr_part.url}}/{{curr_section.url}}/{{quiz.url}}) | |
{% endfor %} | |
%%/practiceblock | |
{% endif %} | |
{% endif %} | |
{% if curr_quiz == nil and curr_exercise == nil %} | |
{% if curr_section.exercises and curr_section.items.last.url != curr_topic.url and curr_topic == nil %} | |
%%exercisesblock | |
{% if curr_section.exercises.size != 1 %} | |
{% if L3 != 'exercises' %} | |
## Exercises | |
{% endif %} | |
This section contains {%if L3 != 'exercises' %}[{{curr_section.exercises.size}} exercises](/{{curr_part.url}}/{{curr_section.url}}/exercises){% else %}{{curr_section.exercises.size}} exercises{% endif %}. {% if L3 != 'exercises' %}Examine all the topics of this section before going to the coding practice.{% endif %} | |
{%- for exercise in curr_section.exercises %} | |
1. [{{exercise.title}}](/{{curr_part.url}}/{{curr_section.url}}/exercises/{{exercise.url}}) | |
{%- endfor %} | |
{% else %} | |
{% if L3 != 'exercises' %} | |
## Exercise | |
{% endif %} | |
{% if L3 != 'exercises' %}This section contains an exercise, which you are supposed to do after studying all the topics of this section.{% else %}There is one exercise in this section. Here it is:{% endif %} | |
πͺ [{{curr_section.exercises[0].title}}](/{{curr_part.url}}/{{curr_section.url}}/exercises/{{curr_section.exercises[0].url}}) | |
{% endif %} | |
%%/exercisesblock | |
{% endif %} | |
{% if L3 == 'exercises' %} | |
## Refresh your knowledge | |
Refer to the contents of this section to find the answers if needed. | |
* [{{curr_section.title}}](/{{curr_part.url}}/{{curr_section.url}}) | |
{%- if curr_section.items.size %} | |
{%- for topic in curr_section.items %} | |
- [{{topic.title}}](/{{curr_part.url}}/{{curr_section.url}}/{{topic.url}}) | |
{%- endfor %} | |
{% endif %} | |
{% endif %} | |
{% endif %} | |
{% if next_exercise %} | |
%%exercisesblock | |
## Next exercise | |
πͺ [{{next_exercise.title}}](/{{curr_part.url}}/{{curr_section.url}}/exercises/{{next_exercise.url}}) | |
%%/exercisesblock | |
{% endif %} | |
## Course navigation | |
β | |
{%- if prev_section == nil %} | |
[Start](/) | |
{%- endif %} | |
{%- if curr_topic %} | |
{%- if prev_topic_section.url == curr_section.url %} | |
[{{curr_section.title}}](/{{curr_part.url}}/{{curr_section.url}}) / [{{prev_topic.title}}](/{{curr_part.url}}/{{curr_section.url}}/{{prev_topic.url}}) | |
{%- else %} | |
[{{curr_section.title}}](/{{curr_part.url}}/{{curr_section.url}}) | |
{%- endif %} | |
{%- else %} | |
[{{prev_section.title}}](/{{prev_section_part.url}}/{{prev_section.url}}) | |
{%- if prev_section.items.size != nil %} | |
/ [{{prev_section.items.last.title}}](/{{prev_section_part.url}}/{{prev_section.url}}/{{prev_section.items.last.url}}) | |
{%- endif %} | |
{%- endif %} | |
| | |
{%- if L3 == 'exercises' %} | |
[{{next_section.title}}](/{%- if next_part == nil %}{{curr_part.url}}{%- else %}{{next_part.url}}{%- endif %}/{{next_section.url}}) | |
{%- elsif curr_section.exercises and curr_section.items.last.url == curr_topic.url %} | |
{%-if curr_section.exercises.size != 1 %} | |
πͺ [Exercises: {{curr_section.title}}](/{{curr_part.url}}/{{curr_section.url}}/exercises) | |
{%- else %} | |
πͺ [Exercise: {{curr_section.exercises[0].title}}](/{{curr_part.url}}/{{curr_section.url}}/exercises/{{curr_section.exercises[0].url}}) | |
{%- endif %} | |
{%- else %} | |
{%- if curr_topic %} | |
{%- if next_topic_section.url == curr_section.url %} | |
[{{curr_section.title}}](/{{curr_part.url}}/{{curr_section.url}}) / [{{next_topic.title}}](/{{curr_part.url}}/{{curr_section.url}}/{{next_topic.url}}) | |
{%- else %} | |
[{{next_section.title}}](/{{next_section_part.url}}/{{next_section.url}}) | |
{%- endif %} | |
{%- else %} | |
{%- if curr_section.items.size != nil %} | |
[{{curr_section.items[0].title}}](/{{curr_part.url}}/{{curr_section.url}}/{{curr_section.items[0].url}}) | |
{%- else %} | |
[{{next_section.title}}](/{{next_section_part.url}}/{{next_section.url}}) | |
{%- endif %} | |
{%- endif %} | |
{%- endif %} | |
β | |
{% if curr_section.exercises and curr_section.items.last.url != curr_topic.url and curr_topic != nil %} | |
{%if curr_section.exercises.size != 1 %} | |
<br /> | |
πͺ Or jump directly [to the exercises to this section](/{{curr_part.url}}/{{curr_section.url}}/exercises). | |
{% else %} | |
<br /> | |
πͺ Or jump directly [to the exercise to this section](/{{curr_part.url}}/{{curr_section.url}}/exercises/{{curr_section.exercises[0].url}}). | |
{% endif %} | |
{% endif %} | |
{% if curr_exercise %} | |
<!-- <style> | |
body { | |
background-color: #f6fdff; | |
} | |
</style> --> | |
{% endif %} |