aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/index/components.html
diff options
context:
space:
mode:
authorMantas Vilčinskas <hi@mnts.lt>2023-09-02 14:02:02 +0300
committerGitHub <noreply@github.com>2023-09-02 14:02:02 +0300
commit3dae9e39633ab4dbdc210dd787b0aea0f179c15b (patch)
tree977808fbbe9572b3a0af3c9d3b7d91e07509a083 /layouts/partials/index/components.html
parentbcbd97258287cc8f192838e69dcec358450f024e (diff)
parent043feb04d769b92bac5510b2696e015a15bb2edd (diff)
Spelling #281
Spelling
Diffstat (limited to 'layouts/partials/index/components.html')
-rw-r--r--layouts/partials/index/components.html26
1 files changed, 13 insertions, 13 deletions
diff --git a/layouts/partials/index/components.html b/layouts/partials/index/components.html
index f9937f2..1a338c4 100644
--- a/layouts/partials/index/components.html
+++ b/layouts/partials/index/components.html
@@ -110,35 +110,35 @@
//
// By default, all is good but we change this value
// for progressively worse statuses
- var highlestLevelStatus = '';
+ var highestLevelStatus = '';
function checkStatus(element) {
var status = element.getAttribute('data-status');
if (status === 'down') {
- highlestLevelStatus = 'down'
- } else if (status === 'disrupted' && highlestLevelStatus !== 'down') {
- highlestLevelStatus = 'disrupted'
- } else if (status === 'notice' && highlestLevelStatus !== 'down' && highlestLevelStatus !== 'disrupted') {
- highlestLevelStatus = 'notice'
+ highestLevelStatus = 'down'
+ } else if (status === 'disrupted' && highestLevelStatus !== 'down') {
+ highestLevelStatus = 'disrupted'
+ } else if (status === 'notice' && highestLevelStatus !== 'down' && highestLevelStatus !== 'disrupted') {
+ highestLevelStatus = 'notice'
}
}
componentsOfThisCategory.forEach(element => checkStatus(element));
// Human readable (i18n) status name variable
- var highlestLevelStatusReadable = highlestLevelStatus;
+ var highestLevelStatusReadable = highestLevelStatus;
- if (highlestLevelStatus === 'ok') { highlestLevelStatusReadable = '{{ T "thisIsOk" }}' }
- if (highlestLevelStatus === 'notice') { highlestLevelStatusReadable = '{{ T "thisIsNotice" }}' }
- if (highlestLevelStatus === 'disrupted') { highlestLevelStatusReadable = '{{ T "thisIsDisrupted" }}' }
- if (highlestLevelStatus === 'down') { highlestLevelStatusReadable = '{{ T "thisIsDown" }}' }
+ if (highestLevelStatus === 'ok') { highestLevelStatusReadable = '{{ T "thisIsOk" }}' }
+ if (highestLevelStatus === 'notice') { highestLevelStatusReadable = '{{ T "thisIsNotice" }}' }
+ if (highestLevelStatus === 'disrupted') { highestLevelStatusReadable = '{{ T "thisIsDisrupted" }}' }
+ if (highestLevelStatus === 'down') { highestLevelStatusReadable = '{{ T "thisIsDown" }}' }
// Finally we can show the status
// (but only for categories with a name)
if (thisCategory.classList.contains('category--titled')) {
- thisCategory.querySelector('.category__head').setAttribute('data-status', highlestLevelStatus);
- thisCategory.querySelector('.category-status').innerHTML = highlestLevelStatusReadable;
+ thisCategory.querySelector('.category__head').setAttribute('data-status', highestLevelStatus);
+ thisCategory.querySelector('.category-status').innerHTML = highestLevelStatusReadable;
}
</script>
</div>