Skip to content

Commit fe7e4e7

Browse files
committed
Move updates table to an include
This reduces duplication
1 parent c375d9a commit fe7e4e7

File tree

3 files changed

+30
-50
lines changed

3 files changed

+30
-50
lines changed

_includes/updates-table.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<table id="updates-table">
2+
<tr>
3+
<th></th>
4+
<th>Release Date</th>
5+
<th>Download</th>
6+
<th>Licences</th>
7+
</tr>
8+
{% for kit_version in site.data.kit_versions %}
9+
{% assign version = kit_version.version %}
10+
<tr id="{{ version | slugify }}">
11+
<td>
12+
{% if forloop.first %}
13+
<code><strong>{{ version }}</strong></code>
14+
{% else %}
15+
<code>{{ version }}</code>
16+
{% endif %}
17+
</td>
18+
<td>{{ kit_version.released | date_to_string }}</td>
19+
<td>
20+
<a class="kit-download-link" data-version="{{ version }}" href="https://kit-downloads.studentrobotics.org/kit-software/{{ version }}/srobo-robot-{{ version }}.img.xz">
21+
Download {{ version }}
22+
</a>
23+
</td>
24+
<td><a href="https://kit-downloads.studentrobotics.org/kit-software/{{ version }}/srobo-robot-{{ version }}-licences">Licences</a></td>
25+
</tr>
26+
{% endfor %}
27+
</table>

_layouts/updates.html

Lines changed: 0 additions & 49 deletions
This file was deleted.

updates/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: updates
2+
layout: page
33
title: Updates
44
extra_js: updates
55
---
@@ -13,3 +13,5 @@ Once you have downloaded the file you need, refer to the documentation on [updat
1313
Each update file is a complete upgrade. Each file contains the changes of those before it. If you need to jump up multiple versions, you can do so by using the latest file.
1414

1515
The following table outlines the updates which have been published.
16+
17+
{% include updates-table.html %}

0 commit comments

Comments
 (0)