diff options
Diffstat (limited to 'content/notes/index.njk')
-rw-r--r-- | content/notes/index.njk | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/content/notes/index.njk b/content/notes/index.njk new file mode 100644 index 0000000..3dabc96 --- /dev/null +++ b/content/notes/index.njk @@ -0,0 +1,40 @@ +--- +layout: /layouts/layout.njk +title: All notes +description: A list of all notes +--- +{% set coursesArr = [] %} + +{% for item in collections.coursesList %} + {% if coursesArr.indexOf(item.data.course) == -1 %} + {% set coursesArr = (coursesArr.push( item.data.course ), coursesArr) %} + {% endif %} +{% endfor %} + +<div class="container"> + +<ul class="list-disc pl-3"> +{% for theCourse in coursesArr %} + <li class="mb-3"> + <input type="checkbox" class="hidden peer" id="checkbox-{{ loop.index }}"> + <label for="checkbox-{{ loop.index }}"> + <h2 class="mb-2 cursor-pointer font-heading text-xl text-teal-900 mb-2 capitalize">{{ theCourse }} <span>⏵</span></h2> + </label> + {% for item in collections.coursesList %} + {% if item.data.course == theCourse %} + <ul class="hidden peer-checked:block"> + <li> + <h3 class="font-body font-light"> + <a href="{{ item.url }}" class="text-[18px] mr-2 visited:text-red-600 no-underline"> + {{ item.data.title }} + </a> + </h3> + </li> + </ul> + {% endif %} + {% endfor %} + </li> +{% endfor %} +</ul> + +</div> |