Implements the course schedule feature requested in issue #[2258](https://github.com/alshedivat/al-folio/issues/2258). This PR adds a new course schedule feature to the al-folio theme, allowing academics to easily create and display structured course information. **Changes:** - Added a `courses` collection to organize and display academic courses - Created course layout and display templates with responsive design - Implemented organization by year and term with automatic sorting - Added support for weekly schedule with topics and course materials - Simplified documentation with a README for course creation This feature makes it easier for academics to showcase their teaching materials with a consistent, organized display of course schedules, helping users create professional teaching pages without custom implementation. --------- Signed-off-by: George Araújo <george.gcac@gmail.com> Co-authored-by: George Araújo <george.gcac@gmail.com>
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
{% assign course = site.teachings | where: 'course_id', include.course_id | first %}
|
|
|
|
{% if course %}
|
|
<div class="course-schedule">
|
|
<h2>{{ course.title }}</h2>
|
|
|
|
{% if course.description %}
|
|
<div class="course-description">
|
|
{{ course.description | markdownify }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if course.instructor %}
|
|
<p><strong>Instructor:</strong> {{ course.instructor }}</p>
|
|
{% endif %}
|
|
|
|
{% if course.term %}
|
|
<p><strong>Term:</strong> {{ course.term }}</p>
|
|
{% endif %}
|
|
|
|
{% if course.schedule %}
|
|
<table class="table table-sm table-responsive">
|
|
<thead>
|
|
<tr>
|
|
<th>Week</th>
|
|
<th>Date</th>
|
|
<th>Topic</th>
|
|
<th>Materials</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for entry in course.schedule %}
|
|
<tr>
|
|
<td>{{ entry.week }}</td>
|
|
<td>{{ entry.date }}</td>
|
|
<td>
|
|
{% if entry.topic %}
|
|
<strong>{{ entry.topic }}</strong>
|
|
{% endif %}
|
|
{% if entry.description %}
|
|
<div class="schedule-description">{{ entry.description | markdownify }}</div>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if entry.materials %}
|
|
<ul class="schedule-materials">
|
|
{% for material in entry.materials %}
|
|
<li>
|
|
{% if material.url %}
|
|
{% if material.url contains '://' %}
|
|
<a href="{{ material.url }}" target="_blank">{{ material.name }}</a>
|
|
{% else %}
|
|
<a href="{{ material.url | relative_url }}" target="_blank">{{ material.name }}</a>
|
|
{% endif %}
|
|
{% else %}
|
|
{{ material.name }}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>No schedule available for this course.</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|