-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.html
69 lines (65 loc) · 2.54 KB
/
index.html
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: Latest Releases
description: The latest release from each repository and its status
layout: default
---
{% assign org_href = "https://github.com/elementary" %}
<table class="releases">
<thead>
<tr>
<th class="release">Release</th>
<th class="status">Commits Since</th>
</tr>
</thead>
<tbody>
{% for repo in site.data.repos %}
{% unless site.data.blacklist contains repo.name %}
{% assign repo_href = org_href | append: "/" | append: repo.name %}
{% assign commits_href = repo_href | append: "/compare/" | append: repo.releases.first.version | append: "..." | append: repo.default_branch %}
<tr id="{{ repo.name }}" >
<td class="release">
<a href="{{ repo_href }}" class="name">{{ repo.name }}</a>
{% assign now_secs = site.time | date: '%s' %}
{% for release in repo.releases %}
{% assign repo_secs = release.release_date | date: '%s' %}
{% assign repo_age_secs = now_secs | minus: repo_secs %}
{% comment %} Always show the first, plus any releases in the past 45 days {% endcomment %}
{% if forloop.first or repo_age_secs < 3888000 %}
<details>
<summary class="version">
<a href="{{ release.href }}">{{ release.version }}</a>
on
<time datetime="{{ release.release_date }}" title="{{ release.release_date }}">{{ release.release_date | date: "%b %e, %Y" }}</time>
</summary>
<h4>{{ release.title }}</h4>
<p>{{ release.body }}</p>
</details>
{% endif %}
{% endfor %}
</td>
<td class="status">
{% if repo.new_commits == 0 %}
<span class="badge good">Up to date</span>
{% elsif repo.new_commits == 1 %}
<span class="badge">
<a href="{{ commits_href }}">{{ repo.new_commits }} commit</a>
</span>
{% elsif repo.new_commits > 1 and repo.new_commits < 15 %}
<span class="badge">
<a href="{{ commits_href }}">{{ repo.new_commits }} commits</a>
</span>
{% elsif repo.new_commits >= 15 and repo.new_commits < 50 %}
<span class="badge warn">
<a href="{{ commits_href }}">{{ repo.new_commits }} commits</a>
</span>
{% elsif repo.new_commits >= 50 %}
<span class="badge critical">
<a href="{{ commits_href }}">{{ repo.new_commits }} commits</a>
</span>
{% endif %}
</td>
</tr>
{% endunless %}
{% endfor %}
</tbody>
</table>