From 2643201e68f15678944f591d711705ccbde849c9 Mon Sep 17 00:00:00 2001 From: Anxhelo Lushka Date: Mon, 4 Jul 2022 23:40:47 +0200 Subject: [PATCH] Added an initial release version + changelog This uses the jekyll-github-metadata gem and pulls the data from the GitHub API (it would need a periodic automated rebuild of the site in order to get the latest data; I would suggest daily). The content is then cached and does no 3rd party calls. --- Gemfile | 1 + Gemfile.lock | 17 ++++++++++++++++- _config.yml | 3 +++ _includes/header.html | 10 +++++++++- _sass/_custom.scss | 44 ++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 70 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index bb5d954d5..836355ac4 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ gem "jekyll" gem "jekyll-watch" gem "jekyll-mentions" gem "jekyll-multiple-languages-plugin" +gem "jekyll-github-metadata" gem "kramdown" gem "webrick" diff --git a/Gemfile.lock b/Gemfile.lock index 76efd910a..0073f9063 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,6 +16,10 @@ GEM http_parser.rb (~> 0.6.0) eventmachine (1.2.7) eventmachine (1.2.7-x64-mingw32) + faraday (2.3.0) + faraday-net_http (~> 2.0) + ruby2_keywords (>= 0.0.4) + faraday-net_http (2.0.3) ffi (1.15.0) ffi (1.15.0-x64-mingw32) forwardable-extended (2.6.0) @@ -40,6 +44,9 @@ GEM rouge (~> 3.0) safe_yaml (~> 1.0) terminal-table (~> 2.0) + jekyll-github-metadata (2.15.0) + jekyll (>= 3.4, < 5.0) + octokit (~> 4.0, != 4.4.0) jekyll-mentions (1.6.0) html-pipeline (~> 2.3) jekyll (>= 3.7, < 5.0) @@ -65,6 +72,9 @@ GEM racc (~> 1.4) nokogiri (1.11.3-x64-mingw32) racc (~> 1.4) + octokit (4.25.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.6) @@ -74,11 +84,15 @@ GEM ffi (~> 1.0) rexml (3.2.5) rouge (3.26.0) + ruby2_keywords (0.0.5) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) sassc (2.4.0-x64-mingw32) ffi (~> 1.9) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) @@ -97,6 +111,7 @@ PLATFORMS DEPENDENCIES jekyll + jekyll-github-metadata jekyll-mentions jekyll-multiple-languages-plugin jekyll-watch @@ -107,4 +122,4 @@ DEPENDENCIES webrick BUNDLED WITH - 2.2.17 + 2.2.22 diff --git a/_config.yml b/_config.yml index 9b2bf9070..f96b29e1f 100644 --- a/_config.yml +++ b/_config.yml @@ -17,6 +17,9 @@ future: true plugins: - jekyll-multiple-languages-plugin - jekyll-mentions + - jekyll-github-metadata + +repository: AntennaPod/AntennaPod permalink: /:categories/:title diff --git a/_includes/header.html b/_includes/header.html index e747642a3..3fd74aa49 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -2,7 +2,15 @@
-

{% t homepage.header %}

+
+
+ Latest release:{{ site.github.latest_release.name | remove: '"' }} + +

Changelog

+

{{ site.github.latest_release.body }}

+
+
+

{% t homepage.header %}

{% t homepage.description %}

diff --git a/_sass/_custom.scss b/_sass/_custom.scss index 05240edbc..8d32fb07f 100644 --- a/_sass/_custom.scss +++ b/_sass/_custom.scss @@ -323,6 +323,28 @@ a { } } +.latest-release { + font-size: 0.85rem; + color: $white; + background-color: $brand-dark; + padding: 0.4rem 0.8rem 0.4rem 0.4rem; + border-radius: 1rem; + + &:hover { + color: $white; + background-color: $gray-800; + text-decoration: none; + } + + span { + color: $white; + background-color: $brand-primary; + padding: 0.2rem 0.5rem; + border-radius: 1rem; + margin-right: 0.5rem; + } +} + // Buttons button { @@ -617,7 +639,6 @@ blockquote { & #donate { color: $gray-800; } - } .post .cover { @@ -820,11 +841,11 @@ i.member-img { .project-card > h4.text-main, .post-content .project-card > p.text-main { - margin-bottom: 0; + margin-bottom: 0; } .post-content .project-card > h4.text-main { - margin-bottom: 0.5rem; + margin-bottom: 0.5rem; } .highlight-card { @@ -1086,6 +1107,23 @@ footer { margin-left: 0.1em; } +.changelog { + display: inline-block; + margin-block: 1rem; + p { + color: $gray-900; + margin-bottom: 0; + } +} + +details > summary { + list-style: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + // Pagination .pager {