aboutsummaryrefslogtreecommitdiff
path: root/content/notes/index.njk
blob: 3dabc96d2b43a3bcae7892fd216e6f93f31b2fac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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>