Skip to content

Commit

Permalink
Generalize alerts; abstract release numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidwong committed Sep 27, 2021
1 parent 3c87427 commit 6178ef7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
9 changes: 3 additions & 6 deletions _data/includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@
prompt: 'Caution:'
text: This page is intended for advanced users.

- section: doc-reviewed
text: This page has been updated and reviewed for Qubes OS

- section: doc-not-reviewed
text: This page has not yet been reviewed for this Qubes OS release. Some content may be out-of-date.

- section: doc-reviewed-4.0
text: This page has been updated and reviewed for Qubes OS 4.0.

- section: doc-reviewed-4.1
text: This page has been updated and reviewed for Qubes OS 4.1.

- section: doc-content
text: Page contents

Expand Down
13 changes: 4 additions & 9 deletions _includes/doc-alert-review-status.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
<!-- Variables -->
{% include variables.html %}
{% assign 4.0 = includes | where_exp: "item", "item.section == 'doc-reviewed-4.0'" | first %}
{% assign 4.1 = includes | where_exp: "item", "item.section == 'doc-reviewed-4.1'" | first %}
{% assign reviewed = includes | where_exp: "item", "item.section == 'doc-reviewed'" | first %}
{% assign not-reviewed = includes | where_exp: "item", "item.section == 'doc-not-reviewed'" | first %}
<!-- Alerts -->
{% if page.passed_review == 4.0 %}
{% if page.reviewed %}
<div class="alert alert-success" role="alert">
<i class="fa fa-check-circle"></i>
{{ 4.0.text }}
</div>
{% elsif page.passed_review == 4.1 %}
<div class="alert alert-success" role="alert">
<i class="fa fa-check-circle"></i>
{{ 4.1.text }}
{{ reviewed.text }} {{ page.release }}.
</div>
{% else %}
<div class="alert alert-sticky alert-warning" role="alert">
<i class="fa fa-history"></i>
{{ not-reviewed.text }}
</div>
{% endif %}
2 changes: 1 addition & 1 deletion _includes/variables.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
{% endif %}
{% endif %}
<!-- Doc link -->
{% assign doc_link = lang | append: "/doc/" %}
{% assign doc_link = lang | append: "/doc/" | append: page.release | append: "/" %}
<!-- Team link -->
{% assign team_link = lang | append: "/team/" %}
<!-- News by category link -->
Expand Down

0 comments on commit 6178ef7

Please sign in to comment.