Skip to content

Commit bc5e49e

Browse files
committed
jekyll: release-notes utility
Signed-off-by: CrazyMax <[email protected]>
1 parent 9856e25 commit bc5e49e

File tree

4 files changed

+84
-1
lines changed

4 files changed

+84
-1
lines changed

_includes/release-notes.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{% assign data = site.data.release-notes[page.datafile] %}
2+
3+
{%- for release in data.releases %}
4+
## {{ release.version | remove: "v" }}
5+
6+
<em class="release-date">{{ release.date }}</em>
7+
8+
<table class="release-notes"><tbody>
9+
{%- for entry in release.entries %}
10+
<tr>
11+
<td><span class="release-tag release-tag-{{ entry.type }}">{{ entry.type | upcase }}</span></td>
12+
<td>
13+
{{ entry.content | markdownify }}
14+
<ul class="fa-ul">
15+
{%- for issue in entry.issues %}{% assign issue_sp = issue | split: "#" %}
16+
<li>
17+
<span class="fa-li"><i class="fa-brands fa-github"></i></span><a href="https://github.com/{{ issue_sp.first }}/issues/{{ issue_sp.last }}" target="_blank" rel="noopener" class="_">{{ issue_sp.first }}#{{ issue_sp.last }}</a>
18+
</li>
19+
{%- endfor %}
20+
</ul>
21+
</td>
22+
</tr>
23+
{%- endfor %}
24+
</tbody></table>
25+
26+
> See [full release notes](https://github.com/{{ data.repo }}/releases/tag/{{ release.version }}){:target="_blank" rel="noopener" class="_"} for more details.
27+
{% endfor -%}

_scss/_night-mode.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ body.night {
1717
}
1818

1919
.rating-nero-value,
20-
.reading-time {
20+
.reading-time,
21+
.release-date {
2122
color: $body-text-night !important;
2223
}
2324

_scss/_release-notes.scss

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.release-date {
2+
font-size: 12px;
3+
color: rgba(13, 86, 125, 0.55);
4+
}
5+
6+
table.release-notes {
7+
margin-top: 0;
8+
margin-bottom: 0.5em;
9+
tr {
10+
td:first-child {
11+
vertical-align: top;
12+
text-align: right;
13+
width: 6em;
14+
}
15+
td {
16+
padding: 0.5em;
17+
p {
18+
margin: 0;
19+
}
20+
}
21+
}
22+
ul {
23+
margin-top: 0.5em;
24+
}
25+
}
26+
27+
span {
28+
&.release-tag {
29+
border-radius: .25rem;
30+
margin-right: .15em;
31+
color: #fff;
32+
display: inline-block;
33+
background-color: $light-palette-grey-400;
34+
font-size: 75%;
35+
font-weight: bold;
36+
line-height: 1;
37+
padding: .25em .4em;
38+
text-align: center;
39+
vertical-align: baseline;
40+
white-space: nowrap;
41+
42+
&.release-tag-new {
43+
background-color: $light-palette-green-400;
44+
}
45+
46+
&.release-tag-improved {
47+
background-color: $light-palette-blue-400;
48+
}
49+
50+
&.release-tag-fixed {
51+
background-color: $light-palette-amber-400;
52+
}
53+
}
54+
}

assets/css/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
@import "mobile";
2121
@import "notes";
2222
@import "upgrade-cta";
23+
@import "release-notes";

0 commit comments

Comments
 (0)