Skip to content

Commit

Permalink
fix recordings list
Browse files Browse the repository at this point in the history
  • Loading branch information
shiltemann committed Jun 12, 2024
1 parent aa8b9c5 commit 0f7a6b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions _includes/resource-recordings.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
{% endfor %}

{% for rec in tuto_recordings %}
{% unless include.material.slides_recordings contains rec %}
{% assign type = rec.type | default: 'Tutorial' %}
{% if page.layout == 'tutorial_slides' or page.layout == 'base_slides' %} {% assign type = 'Lecture' %}{% endif %}
<li><a class="dropdown-item" href="{{site.baseurl}}/topics/{{include.material.topic_name | default: page.topic_name}}/tutorials/{{include.material.tutorial_name | default: page.tutorial_name}}/recordings/index.html#{{type | downcase}}-recording-{{rec.date | date: "%-d %B %Y" | slugify}}" title="View the recording for this tutorial">
{% icon video %} {{type}} ({{rec.date | date: "%B %Y" }}) - {{rec.length | downcase }}</a>
</li>
{% endunless %}
{% endfor %}
<li><a class="dropdown-item" href="{{site.baseurl}}/topics/{{include.material.topic_name | default: page.topic_name}}/tutorials/{{include.material.tutorial_name | default: page.tutorial_name}}/recordings/" title="View all recordings for this tutorial">
{% icon video %} View All</a>
Expand Down
5 changes: 3 additions & 2 deletions _layouts/recordings.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

{% assign material = site | fetch_tutorial_material:page.topic_name,page.tutorial_name%}


<section class="tutorial">
<h1 data-toc-skip>Recordings - {{ material.title }} </h1>

Expand All @@ -28,11 +29,11 @@ <h1 data-toc-skip>Recordings - {{ material.title }} </h1>
{% assign recordings = recordings | concat: material.slides_recordings %}
{% endif %}
{% else if material.slides_recordings %}
{% assign recordings = material.recordings %}
{% assign recordings = material.slides_recordings %}
{% endif %}

{% if recordings %}
{% assign recordings = recordings | sort: 'date' | reverse %}
{% assign recordings = recordings | uniq | sort: 'date' | reverse %}

<!-- an index for when list of recordings becomes very long?
Available Recordings:
Expand Down

0 comments on commit 0f7a6b1

Please sign in to comment.