[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [status-site/main] Bug 9: Improve layout and strings for experiments
commit c7753dce69fd8b6e0b4126f94be63ce1c2a1e59a
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date: Mon Jun 21 11:18:11 2021 +0000
Bug 9: Improve layout and strings for experiments
Closes: #9.
---
config.yml | 1 +
i18n/en.yaml | 4 ++--
layouts/partials/custom/meta.html | 3 +++
layouts/partials/index/components.html | 2 +-
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/config.yml b/config.yml
index 0bd1c24..5b199d4 100644
--- a/config.yml
+++ b/config.yml
@@ -296,6 +296,7 @@ params:
disrupted: "#B35E0F"
down: "#CA3D46"
notice: "#157BB2"
+ enableCustomHTML: true
# If the status page shows that
# there are disruptions or outages
diff --git a/i18n/en.yaml b/i18n/en.yaml
index cfc9501..e4e7f5a 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -1,7 +1,7 @@
# English language file for cState - custom Tor Project strings
- id: thisIsOngoing
- translation: Ongoing
+ translation: Active
- id: thisIsNone
translation: None
- id: experimentOngoing
- translation: This experiment is still ongoing
+ translation: This experiment is still running
diff --git a/layouts/partials/custom/meta.html b/layouts/partials/custom/meta.html
new file mode 100644
index 0000000..6417a38
--- /dev/null
+++ b/layouts/partials/custom/meta.html
@@ -0,0 +1,3 @@
+<style>
+ .component[data-status="ongoing"] .component-status { color: {{ .Site.Params.notice }}; }
+</style>
diff --git a/layouts/partials/index/components.html b/layouts/partials/index/components.html
index c1526ec..7085976 100644
--- a/layouts/partials/index/components.html
+++ b/layouts/partials/index/components.html
@@ -61,7 +61,7 @@
{{ $thisIsOngoing := where $activeComponentIssues "Params.severity" "=" "ongoing" }}
{{ $thisIsNone := where $activeComponentIssues "Params.severity" "=" nil }}
- <div class="component" data-status="{{ if $thisIsDown }}down{{ else }}{{ if $thisIsDisrupted }}disrupted{{ else }}{{ if $thisIsNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }}">
+ <div class="component" data-status="{{ if $thisIsDown }}down{{ else }}{{ if $thisIsDisrupted }}disrupted{{ else }}{{ if $thisIsNotice }}notice{{ else }}{{ if $thisIsOngoing }}ongoing{{ else }}ok{{ end }}{{ end }}{{ end }}{{ end }}">
<a href="{{ printf "/affected/%s/" (.name | urlize) | relURL }}" class="no-underline">
{{ default .name .displayName }}
</a>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits