-
Notifications
You must be signed in to change notification settings - Fork 8
/
releases.html
108 lines (104 loc) · 3.32 KB
/
releases.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
layout: page
title: Releases
---
<h1 id="contribute">Contribute to RES</h1>
<div class="panel panel-default">
<div class="panel-body">
<a href="/contribute" class="button" style="float: right">Contribute now!</a>
<p>RES is entirely free - as in beer, as in open source, as in everything. If you like our work, a contribution would be greatly appreciated.</p>
<p>When you contribute, you make it possible for the team to cover hosting costs and other expenses so that we can focus on doing what we do best: making your Reddit experience even better.</p>
</div>
</div>
<h1 id="releases">Releases</h1>
<div class="panel panel-default accordion-rows">
<div class="panel-body">
<!-- state -->
{% assign started_displaying_body = false %}
{% assign finished_displaying_body = false %}
<!-- loop through posts -->
{% for post in site.posts %}
<!-- is current post stable -->
{% assign current_is_stable = true %}
{% for tag in post.tags %}
{% if tag == "Pre-release" %}
{% assign current_is_stable = false %}
{% endif %}
{% endfor %}
<!-- update state -->
{% if started_displaying_body == false %}
{% if current_is_stable %}
{% assign started_displaying_body = true %}
{% endif %}
{% else %}
{% if current_is_stable == false %}
{% assign finished_displaying_body = true %}
{% endif %}
{% endif %}
<!-- skip non-stable releases -->
{% if current_is_stable == false %}
{% continue %}
{% endif %}
<!-- header: displayed for all stable releases -->
<div id="{{ post.title }}" class="row accordion-header">
<div class="col-sm-5 col-md-5 col-lg-5">
<h5><strong><a href="{{ post.url }}">{{ post.title }}</a></strong></h5>
</div>
<div class="col-sm-3 col-md-3 col-lg-3">
{% for tag in post.tags %}
<span class="label
{% case tag %}
{% when 'Release' %} label-success
{% when 'Pre-release' %} label-info
{% when 'Known Issues' %} label-warning
{% endcase %}
">
{{ tag }}
</span>
{% endfor %}
</div>
<div class="col-sm-4 col-md-4 col-lg-4">
<h5 style="text-align: right">
{{ post.date | date: "%B %e, %Y" }}
</h5>
</div>
</div>
<!-- body: displayed for all stable releases in the last <major>.<even>.x series -->
{% if finished_displaying_body == false %}
<div class="row accordion-body">
<div class="blogpost">
{{ post.content }}
<hr>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<script type="text/javascript">
function createCookie(name, value, days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
}
else var expires = "";
document.cookie = name + "=" + value + expires + "; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
var RECENT_COOKIE = 'recent_visitor';
var INFO_PANEL = '#fix-storage';
if (readCookie(RECENT_COOKIE)) {
document.querySelector(INFO_PANEL).style.display = 'block';
}
createCookie(RECENT_COOKIE, 1, 0.5);
</script>