Skip to content

Commit

Permalink
Merge pull request #1054 from ethanwhite/ref-cards
Browse files Browse the repository at this point in the history
Add reference card links to schedule
  • Loading branch information
ethanwhite authored Aug 27, 2024
2 parents 470ff83 + f150d8e commit beaa5e2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions _includes/assignments.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<th width="50">Reading</th>
<th width="50">Lesson</th>
<th width="50">Lecture</th>
<th width="50">Ref</th>
<th width="50">Assignment</th>
</tr>

Expand All @@ -25,12 +26,14 @@
{% if language %}
{% if lecturepage.title == assignment and lecturepage.element == 'lecture' and lecturepage.language == language %}
{% capture lecture_link %}{{ lecturepage.url | prepend: site.baseurl }}{% endcapture %}
{% capture ref_card_url %}{{ lecturepage.url | remove: 'lectures' | remove: '/' | prepend: 'https://dcsem-solutions.weecology.org/reference-cards/' }}{% endcapture %}
{% break %}
{% endif %}
{% else %}
{% if lecturepage.title == assignment and lecturepage.element == 'lecture' %}
{% capture language %}{{ lecturepage.language }}{% endcapture %}
{% capture lecture_link %}{{ lecturepage.url | prepend: site.baseurl }}{% endcapture %}
{% capture ref_card_url %}{{ lecturepage.url | remove: 'lectures' | remove: '/' | prepend: 'https://dcsem-solutions.weecology.org/reference-cards/' }}{% endcapture %}
{% break %}
{% endif %}
{% endif %}
Expand Down Expand Up @@ -97,13 +100,22 @@
<i class="fa fa-comment fa-lg"></i></font></td>
{% endif %}

{% if ref_card_url %}
<td align="center"><a href="{{ ref_card_url }}" aria-label="Week {{ forloop.index }} Reference Card">
<i aria-hidden="true" class="fa fa-file fa-lg"></i></a></td>
{% else %}
<td align="center"><font color="f1f1f1">
<i class="fa fa-file fa-lg"></i></font></td>
{% endif %}

{% if assignment_link %}
<td align="center"><a href="{{ assignment_link }}" aria-label="Week {{ forloop.index }} Assignment">
<i aria-hidden="true" class="fa fa-keyboard-o fa-lg"></i></a></td>
{% else %}
<td align="center"><font color="f1f1f1">
<i class="fa fa-keyboard-o fa-lg"></i></font></td>
{% endif %}

</tr>

{% endfor %}
Expand Down

0 comments on commit beaa5e2

Please sign in to comment.