From a650e9718e7d3e259324dd4a91a0c47061ef945f Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sat, 27 Nov 2021 12:06:22 +0100 Subject: html: link release notes --- build.py | 8 +++++++- script.js | 4 ++++ style.css | 10 ++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index de4f264..da5e5b0 100755 --- a/build.py +++ b/build.py @@ -118,7 +118,8 @@ with open('target/index.html', 'w') as f: after_beta = False for version, data in versions.items(): - f.write('

{0}'.format(version)) + f.write('
'.format(version)) + f.write('

{}'.format(version)) channel = data.get('channel') if after_beta: channel = 'stable' @@ -130,6 +131,11 @@ with open('target/index.html', 'w') as f: after_beta = True f.write(' [{}]'.format(channel)) f.write('

') + + if 'blog_post_path' in data: + f.write('{}'.format(data['blog_post_path'], 'release notes')) + f.write('
') + if 'features' in data: write_features(f, version, data['features']) diff --git a/script.js b/script.js index c6bd874..365fb2e 100644 --- a/script.js +++ b/script.js @@ -23,6 +23,10 @@ return false; } ); + + // so that release notes don't get in the way when ing through results + document.body.classList.toggle('hide-release-notes', results.length == 0); + const ul = document.createElement('ul'); for (const feat of results) { const li = document.createElement('li'); diff --git a/style.css b/style.css index ea43be2..5518279 100644 --- a/style.css +++ b/style.css @@ -28,3 +28,13 @@ h1 { margin-top: 0; margin-bottom: 0; } + +.release:not([hidden]) { + display: flex; + align-items: center; + gap: 1em; +} + +.hide-release-notes .release-notes { + display: none; +} -- cgit v1.2.3