Skip to content

Latest commit

 

History

History
100 lines (99 loc) · 5.01 KB

courses.md

File metadata and controls

100 lines (99 loc) · 5.01 KB
layout title permalink description categories difficulty
page
courses.title
/courses/
courses.description
scratch
minecraft
introduction
easy
normal
hard

{% for category in page.categories %}

{% t category.{{category}}.title %}

    {% 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 %} {{ course.title }}

    {% if site.lang == 'kana' and course.title-kana %}{{course.title-kana}}{% else %}{{course.title}}{% endif %}

    {% t difficulty.{{ course.difficulty }} %}
    {{ course.title }}

    {% 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 %}

    {% t course.subcourse %}

      {% 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 }}

      {{sc.title}}

    • {% endif %} {% endfor %}
    {% endif %}
  • {% endif %} {% endfor %} {% endfor %}
{% endfor %} <style media="screen"> .scratch { background: #ffb801 } .minecraft { background: #8bca31 } .normal { border-color: #ffb801 } .normal::before { color: #ffb801 } .easy{ border-color: #8bca31 } .easy::before { color: #8bca31 } .hard { border-color: #ff81ae } .hard::before { color: #ff81ae } </style>