layout | title | permalink | description | categories | difficulty | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
page |
courses.title |
/courses/ |
courses.description |
|
|
{% for category in page.categories %}
-
{% assign courses = site.courses | where_exp:"c", "c.parent == nil and c.category == category" %}
{% for diff in page.difficulty %}
{% assign diffcourses = courses | where_exp:"c", "c.difficulty == diff" %}
{% for course in diffcourses %}
{% assign course_lang = course.path | slice: 9, 2 %}
{% if (course_lang == site.lang or (course_lang == 'ja' and site.lang == 'kana')) %}
-
{% capture thumbnail %}{% if course.thumbnail %}{{ course.thumbnail }}{% else %}{{ course.slides[0] }}{% endif %}{% endcapture %}
{% if site.lang == 'kana' and course.title-kana %}{{course.title-kana}}{% else %}{{course.title}}{% endif %}
{% t difficulty.{{ course.difficulty }} %}{% if site.lang == 'kana' and course.title-kana %}{{course.title-kana}}{% else %}{{course.title}}{% endif %}
{% t category.{{ course.category }}.title %} {% t difficulty.{{ course.difficulty }} %}{% assign subcourses = site.courses | where_exp:"c", "c.parent == course.course-name" %} {% if subcourses.size > 0 %} -
{% for sc in subcourses %}
{% assign course_lang = sc.path | slice: 9, 2 %}
{% capture thumbnail %}{{ site.url }}/assets/course/{{ sc.category }}/{{ sc.parent }}/{{ sc.course-name }}{{ sc.thumbnail }}{% endcapture %}
{% capture pdf %}{{ site.baseurl }}/assets/course/scratch/{{course.course-name}}/{{ sc.course-name }}/slide.pdf{% endcapture %}
{% if course_lang == "ja" %}
-
{{sc.title}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
-