From e8e50381292a6532cdc3c2802f37262b279fe30b Mon Sep 17 00:00:00 2001 From: Kevin Hamer Date: Sun, 11 Oct 2020 15:31:58 -0400 Subject: fix automatic reload logic --- layouts/partials/js.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/js.html b/layouts/partials/js.html index b398fbe..fbe102c 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -88,8 +88,8 @@ lastUpdated.innerHTML = '{{ T "lastChecked" }} ' + timeSince(lastUpdate) + ' {{ T "someTimeAgo" }}'; // Refresh almost every 5m - if (lastUpdate > 290000) { - location.reload; + if (Math.floor(new Date() - lastUpdate) > 290000) { + location.reload(); } } }, 5000) -- cgit v1.2.3-70-g09d2 From 78b3b15525d756c5b522b07e98049dcb9c024a6a Mon Sep 17 00:00:00 2001 From: Kevin Hamer Date: Sun, 11 Oct 2020 17:12:45 -0400 Subject: Add .relative-time class and JS logic --- layouts/issues/small.html | 18 +++---- layouts/partials/index/summary.html | 4 +- layouts/partials/js.html | 93 +++++++++++++++++++------------------ 3 files changed, 59 insertions(+), 56 deletions(-) diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 6ed2cce..6112e46 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -7,8 +7,8 @@ {{ if .Params.informational }} - - + + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -21,9 +21,9 @@ {{ .Summary | truncate 200 }} - + {{ else if .Params.Resolved }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -67,7 +67,7 @@ {{ end }} {{ else }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -82,17 +82,17 @@ {{ if eq .Params.severity "notice" }} - ◆ + ◆ {{ T "downtimeOngoing" }} {{ else }} {{ if eq .Params.severity "down" }} - ■ + ■ {{ else if eq .Params.severity "disrupted" }} - ▲ + ▲ {{ else }} - ◆ + ◆ {{ end }} {{ T "downtimeOngoing" }} diff --git a/layouts/partials/index/summary.html b/layouts/partials/index/summary.html index de6bceb..dcf753c 100644 --- a/layouts/partials/index/summary.html +++ b/layouts/partials/index/summary.html @@ -20,5 +20,5 @@ {{ end }}{{ end }}{{ end }} -
- \ No newline at end of file +
+ diff --git a/layouts/partials/js.html b/layouts/partials/js.html index fbe102c..7971bc5 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -41,58 +41,61 @@ } /** - * Timer + * Returns a relative date string for the given date. */ + function timeSince(date) { + var seconds = Math.floor((new Date() - date) / 1000); - function hasClass(element, className) { - return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1; - } - - if (hasClass(document.querySelector('body'), 'status-homepage')) { - var lastUpdated = document.querySelector('.summary__date'); - lastUpdated.innerHTML = '{{ T "lastChecked" }} {{ T "justNow" }}'; - - var lastUpdate = new Date(); - - function timeSince(date) { - var seconds = Math.floor((new Date() - date) / 1000); + var interval = Math.floor(seconds / 31536000); - var interval = Math.floor(seconds / 31536000); - - if (interval > 1) { - return interval + ' {{ T "yearsAgo" }}'; - } - interval = Math.floor(seconds / 2592000); - if (interval > 1) { - return interval + ' {{ T "monthsAgo" }}'; - } - interval = Math.floor(seconds / 86400); - if (interval > 1) { - return interval + '{{ T "daysAgo" }}'; - } - interval = Math.floor(seconds / 3600); - if (interval > 1) { - return interval + '{{ T "hoursAgo" }}'; - } - interval = Math.floor(seconds / 60); - if (interval > 1) { - return interval + ' {{ T "minsAgo" }}'; - } - return Math.floor(seconds) + '{{ T "secondsAgo" }}'; + if (interval > 1) { + return interval + ' {{ T "yearsAgo" }}'; + } + interval = Math.floor(seconds / 2592000); + if (interval > 1) { + return interval + ' {{ T "monthsAgo" }}'; + } + interval = Math.floor(seconds / 86400); + if (interval > 1) { + return interval + '{{ T "daysAgo" }}'; } - var aDay = 24*60*60*1000; + interval = Math.floor(seconds / 3600); + if (interval > 1) { + return interval + '{{ T "hoursAgo" }}'; + } + interval = Math.floor(seconds / 60); + if (interval > 1) { + return interval + ' {{ T "minsAgo" }}'; + } + return Math.floor(seconds) + '{{ T "secondsAgo" }}'; } - window.setInterval(function() { - if (hasClass(document.querySelector('body'), 'status-homepage')) { - lastUpdated.innerHTML = '{{ T "lastChecked" }} ' + timeSince(lastUpdate) + ' {{ T "someTimeAgo" }}'; + /** + * Changes elements with the class 'relative-time' into relative times and + * moves the timestamp to a title attribute tooltip. + */ + function updateRelativeTimes() { + document.querySelectorAll('.relative-time') + .forEach(function(element) { + var time = Date.parse(element.getAttribute('title')); + var html = element.getAttribute('data-prefix') || ''; + if (!time) { + time = element.innerText; + element.setAttribute('title', time || new Date); + html += '{{ T "justNow" }}'; + } else { + html += timeSince(time) + ' {{ T "someTimeAgo" }}'; + } + element.innerHTML = html.trim(); + }) + } + updateRelativeTimes(); + setInterval(updateRelativeTimes, 5000); - // Refresh almost every 5m - if (Math.floor(new Date() - lastUpdate) > 290000) { - location.reload(); - } - } - }, 5000) + // Reload homepage eevery 290 seconds + if (document.querySelector('body.status-homepage')) { + setInterval(location.reload, 290000) + } -- cgit v1.2.3-70-g09d2 From 656f716ecb87ac563e1566592472a65db7019409 Mon Sep 17 00:00:00 2001 From: Kevin Hamer Date: Sun, 11 Oct 2020 17:18:40 -0400 Subject: fix IE bug; rename 'data-prefix' to 'data-time-prefix' and add unused 'data-time-suffix' --- layouts/partials/index/summary.html | 2 +- layouts/partials/js.html | 34 +++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/layouts/partials/index/summary.html b/layouts/partials/index/summary.html index dcf753c..41f285b 100644 --- a/layouts/partials/index/summary.html +++ b/layouts/partials/index/summary.html @@ -20,5 +20,5 @@ {{ end }}{{ end }}{{ end }} -
+
diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 7971bc5..c4c5a85 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -75,26 +75,30 @@ * moves the timestamp to a title attribute tooltip. */ function updateRelativeTimes() { - document.querySelectorAll('.relative-time') - .forEach(function(element) { - var time = Date.parse(element.getAttribute('title')); - var html = element.getAttribute('data-prefix') || ''; - if (!time) { - time = element.innerText; - element.setAttribute('title', time || new Date); - html += '{{ T "justNow" }}'; - } else { - html += timeSince(time) + ' {{ T "someTimeAgo" }}'; - } - element.innerHTML = html.trim(); - }) + var elements = document.querySelectorAll('.relative-time'); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var time = Date.parse(element.getAttribute('title')); + var html = element.getAttribute('data-time-prefix') || ''; + if (!time) { + time = element.innerText; + element.setAttribute('title', time || new Date); + html += '{{ T "justNow" }}'; + } else { + html += timeSince(time) + ' {{ T "someTimeAgo" }}'; + } + html += element.getAttribute('data-time-suffix') || ''; + element.innerHTML = html.trim(); + } } updateRelativeTimes(); setInterval(updateRelativeTimes, 5000); - // Reload homepage eevery 290 seconds + /** + * Reload homepage after 290 seconds. + */ if (document.querySelector('body.status-homepage')) { - setInterval(location.reload, 290000) + setTimeout(location.reload, 290000) } -- cgit v1.2.3-70-g09d2 From f5e7f886e79241f002cf28a1c8018d81fbd2ee57 Mon Sep 17 00:00:00 2001 From: Kevin Hamer Date: Sun, 11 Oct 2020 17:28:37 -0400 Subject: add .Site.Params.useRelativeTime --- exampleSite/config.yml | 9 +++++++-- layouts/issues/small.html | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 85665f6..967505f 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -124,7 +124,7 @@ params: - name: North Coast description: The main servers are located here. closed: true - - name: East Coast + - name: East Coast - name: Uncategorized untitled: true @@ -157,6 +157,11 @@ params: dateFormat: January 2, 2006 at 3:04 PM shortDateFormat: 15:04 — Jan 2 + # If enabled, will display relative times for incident history and summaries instead of using dateFormat. + # + # Default: true + useRelativeTime: true + # What header design should we use? # # Default: true @@ -277,7 +282,7 @@ params: # Default: `true` # BOOLEAN; `true`, `false` alwaysKeepBrandColor: true - + # Introduced in v4.0.1 for consistent # site title text color. # diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 6112e46..79db524 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -8,7 +8,7 @@
{{ if .Params.informational }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -23,7 +23,7 @@ {{ else if .Params.Resolved }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -67,7 +67,7 @@ {{ end }} {{ else }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} -- cgit v1.2.3-70-g09d2 From 49c081a97d8442a8267247a98d196fe05d7b3092 Mon Sep 17 00:00:00 2001 From: Kevin Hamer Date: Sun, 11 Oct 2020 17:35:30 -0400 Subject: add .Site.Params.skipSeconds --- exampleSite/config.yml | 5 +++++ layouts/partials/js.html | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 967505f..9060163 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -162,6 +162,11 @@ params: # Default: true useRelativeTime: true + # If enabled, doesn't show seconds on relative times. + # + # Default: false + skipSeconds: false + # What header design should we use? # # Default: true diff --git a/layouts/partials/js.html b/layouts/partials/js.html index c4c5a85..8465483 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -67,7 +67,11 @@ if (interval > 1) { return interval + ' {{ T "minsAgo" }}'; } - return Math.floor(seconds) + '{{ T "secondsAgo" }}'; + {{ if .Site.Params.skipSeconds }} + return '<1 {{ T "minsAgo" }}' + {{ else }} + return Math.floor(seconds) + '{{ T "secondsAgo" }}'; + {{ end }} } /** -- cgit v1.2.3-70-g09d2 From dfbbdfc9cf4f1fd4aecb6fad00dee686acd8b8e6 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Tue, 27 Oct 2020 21:36:19 +0200 Subject: uniform comment style --- exampleSite/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 9060163..3fe6e77 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -159,17 +159,17 @@ params: # If enabled, will display relative times for incident history and summaries instead of using dateFormat. # - # Default: true + # Default: `true` useRelativeTime: true # If enabled, doesn't show seconds on relative times. # - # Default: false + # Default: `false` skipSeconds: false # What header design should we use? # - # Default: true + # Default: `true` # BOOLEAN; `true`, `false` useLargeHeaderDesign: false @@ -212,7 +212,7 @@ params: # Should we show the logo or the title # of the status page? # - # Default: false + # Default: `false` # BOOLEAN; `true`, `false` useLogo: true @@ -249,7 +249,7 @@ params: # for average downtime on # systems ("/affected/") pages # - # Default: false + # Default: `false` # BOOLEAN; `true`, `false` disableComplexCalculations: false -- cgit v1.2.3-70-g09d2 From 9ba5e70df5014215340dc01e054f66a021ed1bd1 Mon Sep 17 00:00:00 2001 From: HyRo Date: Tue, 3 Nov 2020 07:28:59 +0100 Subject: Added "Hyrousek" status page --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 795ced5..40c9ae6 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ You can also support the creator of this project by **starring, sharing, and usi * [Content Ignite](https://status.contentignite.com/) * [FSCI](https://status.fsci.in/) * [Storehouse](https://status.sthse.co) +* [Hyrousek](https://status.hyrousek.tk) *Want your status page here? [Create a PR](https://github.com/cstate/cstate/edit/dev/README.md)!* -- cgit v1.2.3-70-g09d2 From 761533cce11b9e76f775a3fa3b1efbd5ed224fe5 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 12 Dec 2020 12:27:03 +0200 Subject: Add Tagalog by @TheWhackFactory from #153 --- i18n/tl.yml | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 i18n/tl.yml diff --git a/i18n/tl.yml b/i18n/tl.yml new file mode 100644 index 0000000..1600abc --- /dev/null +++ b/i18n/tl.yml @@ -0,0 +1,159 @@ +# Tagalog language file for cState +# Version 4.4 + +- id: languageCode + translation: tl +- id: languageName + translation: Tagalog +- id: languageNameShort + translation: TGL + +## +## INDEX.HTML +## + +# Summary status message +- id: isDown + translation: Nakakaranas ng malaking isyu +- id: isDisrupted + translation: Nakakaranas ng pagkagambala +- id: isNotice + translation: Pakiusap paki-basa ang anunsyo +- id: isOk + translation: Lahat ng sistema ay gumagana + +# No JS warning +- id: noScriptingIntro + translation: Ay! Mukhang naka-diseybol ang Javascript mo. Pakiusap +- id: noScriptingLink + translation: i-eneybol ang skripting +- id: noScriptingOutro + translation: para mas maganda ang iyong eksperyensha sa websayt na ito. +- id: thisIsDown + translation: Hindi gumagana +- id: thisIsDisrupted + translation: May pagkagambala +- id: thisIsNotice + translation: Pagpapanatili +- id: thisIsOk + translation: Gumagana + +# "Last checked" + "just now" +- id: lastChecked + translation: Huling na-chek +- id: justNow + translation: ngayon lamang +- id: someTimeAgo + translation: nakaraan + +# Example usage: `5` + `years` +# Final result: 'Last checked 5 years ago' +# Number goes before string +# Use short variants until months +- id: yearsAgo + translation: mga taon +- id: monthsAgo + translation: mga buwan +- id: daysAgo + translation: a +- id: hoursAgo + translation: o +- id: minsAgo + translation: min +- id: secondsAgo + translation: s + +- id: autoRefreshNotice + translation: Susubukan naming mag-refresh bawat 5 min + +# Incidents +- id: incidents + translation: Mga insidente +- id: incidentHistory + translation: Kasaysayan ng mga insidente + +- id: resolved + translation: Na-resolba # if it's less than a min +- id: inUnderAMinute + translation: sa ilalim ng isang minuto # continuing the last string +- id: resolvedAfter + translation: Na-resolba pagkatapos ng # + 19 min +- id: ofDowntime + translation: ng dawntaym + +- id: downtimeOngoing + translation: Ang isyung ito ay hindi pa na-reresolba + + +- id: calmBeforeTheStorm + translation: Ito ba ang katahimikan bago ang bagyo? +- id: noIncidentsDesc + translation: Ang status peyg na ito ay walang na-itala na insidente. This status page has no logged incidents. This may be because the status page owner (or owners) have recently set up their status page, have had no downtime, or have not logged any downtime. + + +- id: continueReading + translation: Ipagpatuloy ang pagbabasa +- id: prev + translation: Dati +- id: next + translation: Susunod + +## +## OTHER +## + +- id: goBack + translation: Bumalik sa +- id: backToTop + translation: Bumalik sa ibabaw +- id: poweredBy + translation: Pinapatakbo ng + +- id: notFound + translation: Walang dito. +- id: notFoundText + translation: Ito'y maaaring problema sa amin. Maaring may nilipat kami na resors at ngayon ay nawala na ito. Posible din na ang resors na nais mong makita ay walang laman. Pero, ayos lang ba sa iyo ang dobol-check sa link? + +- id: rss + translation: Mag-subskrayb sa pamamagitan ng RSS +- id: toAllUpdates + translation: sa lahat ng mga updeyt +- id: or + translation: o +- id: onlyThisFeed + translation: sa feed lamang na ito + +## +## v3 +## +- id: entries + translation: mga entri +- id: newestToOldest + translation: mula sa pinaka-bago hanggang sa pinaka-luma + +## +## v4 +## +- id: notFoundAffected + translation: Mukang ang sistemang ito ay hindi na nag-eesist o di kailan mang nagkaroon ng na-rekord na dawntaym. + +## +## v4.1 +## + +- id: averageSystemsDowntime + translation: Kamakailan, base sa iyong average na data, mukang ang sistemang ito ay nag-dawn ng mga +- id: averageSystemsDowntimeSecondPart + translation: minuto nang paisa-isa. + + +## +## v4.4 +## + +- id: in + translation: sa +- id: weeksAgo + translation: " l" +- id: yearAgo + translation: " taon" -- cgit v1.2.3-70-g09d2 From 9f95ce0d1b04790a2ef3addd60de3da22869acdb Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 12 Dec 2020 12:29:32 +0200 Subject: Add Tagalog by @TheWhackFactory from #153 --- static/admin/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/static/admin/config.yml b/static/admin/config.yml index 9ce91d9..afd0e17 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -130,6 +130,7 @@ collections: - { label: "🇫🇷 French", value: "fr" } - { label: "🇧🇷 Portuguese", value: "pt"} - { label: "🇲🇰 Македонски", value: "mk" } + - { label: "🏳️ Tagalog", value: "tl" } - label: 'Site language in code for html[lang]' hint: 'Use the ISO 639-1 defined abbreviations. Examples: en, lt, de. Fully explained here: https://github.com/cstate/cstate/wiki/Customization#changing-site-language' name: 'languageCode' -- cgit v1.2.3-70-g09d2 From f191b32b505516036ed01fcafacaee8a980308a8 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 28 Nov 2020 15:55:19 +0200 Subject: Netlify mention --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 40c9ae6..5f3a1df 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ You can also support the creator of this project by **starring, sharing, and usi * [**Example site — cstate.mnts.lt**](https://cstate.mnts.lt) * [Source code of the example cState site](https://github.com/cstate/example) +*Thank you to [Netlify](https://www.netlify.com) for hosting our demo websites!* + ### More examples from the internet * [Chocolatey](https://status.chocolatey.org/) -- cgit v1.2.3-70-g09d2 From 9556f030fb2bd6aa7e91a4870c6da5a993db3b1b Mon Sep 17 00:00:00 2001 From: Cameron Fleming Date: Fri, 11 Dec 2020 22:40:35 +0000 Subject: Docker: line endings & verbose messages These changes replace the CRLF line endings on entrypoint.sh (#160) and adds more debugging messages for diagnosing issues with the docker side of cState in the future. --- Dockerfile | 6 ++---- docker/entrypoint.sh | 14 ++++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f64956..f36d060 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,14 +6,12 @@ WORKDIR /cstate # Install hugo & git RUN apk add --no-cache hugo git -# -- First Run -- - # Download the example site -RUN git clone https://github.com/cstate/example /cstate +RUN git clone -b master --depth=1 https://github.com/cstate/example /cstate # Copy files from this repo into themes/cstate RUN mkdir -p /cstate/themes/cstate COPY . /cstate/themes/cstate -# Prepare the entrypoint files +# Copy entrypoint script into the container image, this runs everytime the container cold-starts. COPY ./docker/entrypoint.sh /docker-entrypoint.d/10-build-hugo.sh diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f8068c1..a90e37d 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,21 +1,23 @@ WORK_DIR="/app" SRC_DIR="/cstate" +echo "[CSTATE-DOCKER] Initalising container..." + # Check if the working dir is empty, if it is we'll need to copy # the files in from src directory (usually /cstate) if ! [ "$(ls -A $WORK_DIR)" ]; then # First run, copy cstate's files in. - echo "First time run! Hello, World :)" + echo "[CSTATE-DOCKER] Copying cState into staging area. First Start." cp -R $SRC_DIR/* $WORK_DIR fi -# Continue with building - -# CD into working dir -cd /app +cd $WORK_DIR # Build the hugo site +echo "[CSTATE-DOCKER] Running hugo build service..." hugo # Copy built files into NGINX directory -cp -r /app/public/* /usr/share/nginx/html \ No newline at end of file +cp -r /$WORK_DIR/public/* /usr/share/nginx/html + +echo "[CSTATE-DOCKER] Initalisation complete." \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 01d74a9f66e0cb3facae439063f01b932059b272 Mon Sep 17 00:00:00 2001 From: Enrico204 Date: Fri, 22 Jan 2021 03:07:46 +0100 Subject: Add Italian translation --- i18n/it.yaml | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 i18n/it.yaml diff --git a/i18n/it.yaml b/i18n/it.yaml new file mode 100644 index 0000000..9654508 --- /dev/null +++ b/i18n/it.yaml @@ -0,0 +1,160 @@ +# Italian language file for cState +# Version 4.4 + +- id: languageCode + translation: it +- id: languageName + translation: Italian +- id: languageNameShort + translation: ITA + +## +## INDEX.HTML +## + +# Summary status message +- id: isDown + translation: Si riscontrano problemi gravi +- id: isDisrupted + translation: Si riscontrano alcune interruzioni +- id: isNotice + translation: Per favore leggi l'annuncio +- id: isOk + translation: Tutti i sistemi sono operativi + +# No JS warning +- id: noScriptingIntro + translation: Uh Oh! Sembra che tu abbia disabilitato JavaScript. Per favore +- id: noScriptingLink + translation: abilita gli script +- id: noScriptingOutro + translation: per migliorare la tua esperienza su questo sito web. + +- id: thisIsDown + translation: Giù +- id: thisIsDisrupted + translation: Irregolare +- id: thisIsNotice + translation: Manutenzione +- id: thisIsOk + translation: Operativo + +# "Last checked" + "just now" +- id: lastChecked + translation: Ultimo controllo +- id: justNow + translation: in questo momento +- id: someTimeAgo + translation: fa + +# Example usage: `5` + `years` +# Final result: 'Last checked 5 years ago' +# Number goes before string +# Use short variants until months +- id: yearsAgo + translation: anni +- id: monthsAgo + translation: mesi +- id: daysAgo + translation: g +- id: hoursAgo + translation: o +- id: minsAgo + translation: min +- id: secondsAgo + translation: s + +- id: autoRefreshNotice + translation: Proveremo ad aggiornare ogni 5 secondi + +# Incidents +- id: incidents + translation: Incidenti +- id: incidentHistory + translation: Storia degli incidenti + +- id: resolved + translation: Risolto # if it's less than a min +- id: inUnderAMinute + translation: in meno di un minuto # continuing the last string +- id: resolvedAfter + translation: Risolto dopo # + 19 min +- id: ofDowntime + translation: di disservizio + +- id: downtimeOngoing + translation: Questo problema non è ancora risolto + + +- id: calmBeforeTheStorm + translation: E' la quiete prima della tempesta? +- id: noIncidentsDesc + translation: Questa pagina di stato non ha registrato incidenti. Questo potrebbe accedere perché il proprietario (o i proprietari) hanno creato questa pagina di recente, non hanno mai avuto disservizi o non hanno mai registrato un disservizio. + + +- id: continueReading + translation: Continua a leggere +- id: prev + translation: Precedente +- id: next + translation: Successivo + +## +## OTHER +## + +- id: goBack + translation: Torna a +- id: backToTop + translation: Torna all'inizio +- id: poweredBy + translation: Fatto da + +- id: notFound + translation: Non c'è nulla qui. +- id: notFoundText + translation: Questo potrebbe essere un problema da parte nostra. Forse abbiamo spostato una risorsa e ora non c'è più. È anche possibile che la risorsa che stai cercando di visualizzare sia vuota. Ti dispiace ricontrollare l'indirizzo? + +- id: rss + translation: Sottoscriviti tramite RSS +- id: toAllUpdates + translation: per tutti gli aggiornamenti +- id: or + translation: o +- id: onlyThisFeed + translation: solo per questo feed + +## +## v3 +## +- id: entries + translation: voci +- id: newestToOldest + translation: dalle nuove alle vecchie + +## +## v4 +## +- id: notFoundAffected + translation: Sembra che questo sistema non esista o non abbia mai registrato disservizi. + +## +## v4.1 +## + +- id: averageSystemsDowntime + translation: Di recente, in base ai dati medi, sembra che questo sistema sia andato giù per circa +- id: averageSystemsDowntimeSecondPart + translation: minuti per volta + + +## +## v4.4 +## + +- id: in + translation: in +- id: weeksAgo + translation: " sett" +- id: yearAgo + translation: " anni" -- cgit v1.2.3-70-g09d2 From 74e388ac9e56c73ebeceee5968a5fc7349aa499d Mon Sep 17 00:00:00 2001 From: Enrico204 Date: Fri, 22 Jan 2021 03:47:34 +0100 Subject: Down is better indicated in Italian with "disservizio" --- i18n/it.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/it.yaml b/i18n/it.yaml index 9654508..66da467 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -31,7 +31,7 @@ translation: per migliorare la tua esperienza su questo sito web. - id: thisIsDown - translation: Giù + translation: Disservizio - id: thisIsDisrupted translation: Irregolare - id: thisIsNotice @@ -143,7 +143,7 @@ ## - id: averageSystemsDowntime - translation: Di recente, in base ai dati medi, sembra che questo sistema sia andato giù per circa + translation: Di recente, in base ai dati medi, sembra che questo sistema abbia avuto disservizi per circa - id: averageSystemsDowntimeSecondPart translation: minuti per volta -- cgit v1.2.3-70-g09d2 From 1b0c7250efb89f8a021196cc8654e23ce2952441 Mon Sep 17 00:00:00 2001 From: Enrico204 Date: Fri, 22 Jan 2021 11:40:48 +0100 Subject: Add Italian into the Netlify CMS config file --- static/admin/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/static/admin/config.yml b/static/admin/config.yml index afd0e17..c3d0832 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -128,6 +128,7 @@ collections: - { label: "🇩🇪 Deutsch", value: "de" } - { label: "🇳🇱 Dutch", value: "nl" } - { label: "🇫🇷 French", value: "fr" } + - { label: "🇮🇹 Italiano", value: "it" } - { label: "🇧🇷 Portuguese", value: "pt"} - { label: "🇲🇰 Македонски", value: "mk" } - { label: "🏳️ Tagalog", value: "tl" } -- cgit v1.2.3-70-g09d2 From 68ac06cdd0a22422dbf502f92eace4ef12d86de3 Mon Sep 17 00:00:00 2001 From: anarcat Date: Thu, 21 Jan 2021 10:09:44 -0500 Subject: clarify what doesn't work as a baseURL I was confused when reading the sample config file, as explained in issue #164. "don't support /" could have meant a trailing slash, or subdirectories, or at least wasn't exactly clear to me. By adding an explicit example of a broken behavior, we make it clear what we're talking about here, and what to avoid. Closes: #164 --- exampleSite/config.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 3fe6e77..49faaee 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -89,7 +89,14 @@ defaultContentLanguage: en # version 3. If you are just testing, # localhost should automatically work. # -# Example: https://status.example.com/ +# Example: +# baseUrl: https://status.example.com/ +# +# For testing: +# baseUrl: http://localhost +# +# Broken example: +# baseUrl: / baseURL: https://cstate.mnts.lt ############################################################ -- cgit v1.2.3-70-g09d2 From d9837b19e357f0a85580e2a7cd7e28666d994b11 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 20 Feb 2021 23:30:29 +0200 Subject: explain BaseURL on NCMS --- static/admin/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/admin/config.yml b/static/admin/config.yml index c3d0832..4fb01ae 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -140,7 +140,7 @@ collections: - label: 'Base URL / Hostname' name: 'baseURL' widget: 'string' - hint: 'Where is the site hosted? What is the hostname or path to the root? Slash forces relative links but may not work in all setups.' + hint: 'Where is the site hosted? Hostname (and path) to the root. Prior to version 3, a slash was used which now works in local testing, but breaks certain features of cState like RSS feeds, so a correct example for production is: https://cstate.mnts.lt' default: '/' # PARAMS - label: "Params" -- cgit v1.2.3-70-g09d2 From 9320bf6ea46be7c3a3e3a54ce179e4809cb83771 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sun, 21 Feb 2021 18:53:07 +0200 Subject: forestry/vercel --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f3a1df..8021cb7 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ You can [make Netlify CMS work on GitLab](https://www.netlifycms.org/docs/gitlab #### 🖤 Other platforms -At this time, as of the author's knowledge, there are no other platforms that support 'easy' deployment (if you know any — [let us know](#contribute-)). +Check out [Forestry.io](//forestry.io) and [Vercel](//vercel.com). Keep reading to see how to deploy manually. -- cgit v1.2.3-70-g09d2 From 867f6a5dc8118d0d6f903eea75484c59e296d37e Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sun, 21 Feb 2021 18:54:56 +0200 Subject: Remove twitter --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8021cb7..6901d04 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

cState example illustration

-
+

GitHub release GitHub last commit GitHub repo size in bytes Discord Chat Awesome status page

> Über fast, backwards compatible (IE8+), tiny, and simple status page built with Hugo. Completely _free_ with Netlify. Comes with Netlify CMS, read-only API, and other useful features. -- cgit v1.2.3-70-g09d2 From 925027e85b74a77e06448be5baa6053f1222fb78 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Wed, 24 Feb 2021 13:48:14 +0200 Subject: Doc updates, bugfixes, add rel time to NCMS --- exampleSite/config.yml | 35 ++++- .../issues/2019-10-08-testing-new-pipeline.md | 2 +- .../issues/2020-06-13-maintenance-window.md | 13 -- .../issues/2021-02-13-maintenance-window.md | 14 ++ i18n/tl.yaml | 159 +++++++++++++++++++++ i18n/tl.yml | 159 --------------------- layouts/index.json | 4 +- layouts/issues/small.html | 9 +- layouts/partials/js.html | 18 ++- layouts/partials/meta.html | 2 +- static/admin/config.yml | 22 ++- static/admin/index.html | 2 +- 12 files changed, 239 insertions(+), 200 deletions(-) delete mode 100644 exampleSite/content/issues/2020-06-13-maintenance-window.md create mode 100644 exampleSite/content/issues/2021-02-13-maintenance-window.md create mode 100644 i18n/tl.yaml delete mode 100644 i18n/tl.yml diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 49faaee..7dc5972 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -161,17 +161,44 @@ params: # # dateFormat Default: "January 2, 2006 at 3:04 PM" # shortDateFormat Default: "15:04 — Jan 2" - dateFormat: January 2, 2006 at 3:04 PM - shortDateFormat: 15:04 — Jan 2 + dateFormat: January 2, 2006 at 3:04 PM UTC + shortDateFormat: 15:04 UTC — Jan 2 - # If enabled, will display relative times for incident history and summaries instead of using dateFormat. + # Should relative time (x min ago) be used? + # + # IMPORTANT: In the frontmatter, the dates MUST be in + # the UTC time zone for this to work preperly. If you + # use Netlify CMS, all good — the CMS picks UTC time + # by default. Otherwise, there may be very inaccurate + # times if multiple time zones are in your issue files. + # + # FOR YOUR CONSIDERATION: This feature was introduced in + # v5. It may be a breaking change in the case when you + # wish to use relative time but old issues do not have + # UTC time (and therefore are out of sync by ±24 hours) + # + # Read the wiki for more: + # https://github.com/cstate/cstate/wiki/Customization#time + # + # If enabled, will display relative times in places like + # the incident history and summaries instead of using + # dateFormat and shortDateFormat (except for if you use + # the old shortcode). # # Default: `true` + # BOOLEAN; `true`, `false` useRelativeTime: true - + # If enabled, doesn't show seconds on relative times. # + # With option ON (true): + # "Last checked <1 min ago" + # + # With option OFF (false; default): + # "Last checked 20s ago" + # # Default: `false` + # BOOLEAN; `true`, `false` skipSeconds: false # What header design should we use? diff --git a/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md b/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md index 4f139de..4e9da4f 100644 --- a/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md +++ b/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md @@ -1,7 +1,7 @@ --- title: New Pipeline Rollout date: 2019-10-05 16:24:00 -resolved: false +resolved: true resolvedWhen: 2019-10-05 16:58:00 # Possible severity levels: down, disrupted, notice severity: disrupted diff --git a/exampleSite/content/issues/2020-06-13-maintenance-window.md b/exampleSite/content/issues/2020-06-13-maintenance-window.md deleted file mode 100644 index 404ccc4..0000000 --- a/exampleSite/content/issues/2020-06-13-maintenance-window.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Maintenance Window -date: 2020-06-13 15:54:00 -resolved: true -resolvedWhen: 2020-06-13 16:54:00 -# Possible severity levels: down, disrupted, notice -severity: disrupted -affected: - - API -section: issue ---- - -*Just began* - We're currently shutting down the network. {{< track "2018-06-13 15:54:00" >}} diff --git a/exampleSite/content/issues/2021-02-13-maintenance-window.md b/exampleSite/content/issues/2021-02-13-maintenance-window.md new file mode 100644 index 0000000..00b4765 --- /dev/null +++ b/exampleSite/content/issues/2021-02-13-maintenance-window.md @@ -0,0 +1,14 @@ +--- +title: Maintenance Window +#date: 24 Feb 21 12:35 +0200 +date: 2021-02-24 10:35:00 +resolved: false +resolvedWhen: 2021-02-24 12:10:00 +# Possible severity levels: down, disrupted, notice +severity: disrupted +affected: + - API +section: issue +--- + +*Just began* - We're currently shutting down the network. {{< track "2018-06-13 12:54:00" >}} diff --git a/i18n/tl.yaml b/i18n/tl.yaml new file mode 100644 index 0000000..1600abc --- /dev/null +++ b/i18n/tl.yaml @@ -0,0 +1,159 @@ +# Tagalog language file for cState +# Version 4.4 + +- id: languageCode + translation: tl +- id: languageName + translation: Tagalog +- id: languageNameShort + translation: TGL + +## +## INDEX.HTML +## + +# Summary status message +- id: isDown + translation: Nakakaranas ng malaking isyu +- id: isDisrupted + translation: Nakakaranas ng pagkagambala +- id: isNotice + translation: Pakiusap paki-basa ang anunsyo +- id: isOk + translation: Lahat ng sistema ay gumagana + +# No JS warning +- id: noScriptingIntro + translation: Ay! Mukhang naka-diseybol ang Javascript mo. Pakiusap +- id: noScriptingLink + translation: i-eneybol ang skripting +- id: noScriptingOutro + translation: para mas maganda ang iyong eksperyensha sa websayt na ito. +- id: thisIsDown + translation: Hindi gumagana +- id: thisIsDisrupted + translation: May pagkagambala +- id: thisIsNotice + translation: Pagpapanatili +- id: thisIsOk + translation: Gumagana + +# "Last checked" + "just now" +- id: lastChecked + translation: Huling na-chek +- id: justNow + translation: ngayon lamang +- id: someTimeAgo + translation: nakaraan + +# Example usage: `5` + `years` +# Final result: 'Last checked 5 years ago' +# Number goes before string +# Use short variants until months +- id: yearsAgo + translation: mga taon +- id: monthsAgo + translation: mga buwan +- id: daysAgo + translation: a +- id: hoursAgo + translation: o +- id: minsAgo + translation: min +- id: secondsAgo + translation: s + +- id: autoRefreshNotice + translation: Susubukan naming mag-refresh bawat 5 min + +# Incidents +- id: incidents + translation: Mga insidente +- id: incidentHistory + translation: Kasaysayan ng mga insidente + +- id: resolved + translation: Na-resolba # if it's less than a min +- id: inUnderAMinute + translation: sa ilalim ng isang minuto # continuing the last string +- id: resolvedAfter + translation: Na-resolba pagkatapos ng # + 19 min +- id: ofDowntime + translation: ng dawntaym + +- id: downtimeOngoing + translation: Ang isyung ito ay hindi pa na-reresolba + + +- id: calmBeforeTheStorm + translation: Ito ba ang katahimikan bago ang bagyo? +- id: noIncidentsDesc + translation: Ang status peyg na ito ay walang na-itala na insidente. This status page has no logged incidents. This may be because the status page owner (or owners) have recently set up their status page, have had no downtime, or have not logged any downtime. + + +- id: continueReading + translation: Ipagpatuloy ang pagbabasa +- id: prev + translation: Dati +- id: next + translation: Susunod + +## +## OTHER +## + +- id: goBack + translation: Bumalik sa +- id: backToTop + translation: Bumalik sa ibabaw +- id: poweredBy + translation: Pinapatakbo ng + +- id: notFound + translation: Walang dito. +- id: notFoundText + translation: Ito'y maaaring problema sa amin. Maaring may nilipat kami na resors at ngayon ay nawala na ito. Posible din na ang resors na nais mong makita ay walang laman. Pero, ayos lang ba sa iyo ang dobol-check sa link? + +- id: rss + translation: Mag-subskrayb sa pamamagitan ng RSS +- id: toAllUpdates + translation: sa lahat ng mga updeyt +- id: or + translation: o +- id: onlyThisFeed + translation: sa feed lamang na ito + +## +## v3 +## +- id: entries + translation: mga entri +- id: newestToOldest + translation: mula sa pinaka-bago hanggang sa pinaka-luma + +## +## v4 +## +- id: notFoundAffected + translation: Mukang ang sistemang ito ay hindi na nag-eesist o di kailan mang nagkaroon ng na-rekord na dawntaym. + +## +## v4.1 +## + +- id: averageSystemsDowntime + translation: Kamakailan, base sa iyong average na data, mukang ang sistemang ito ay nag-dawn ng mga +- id: averageSystemsDowntimeSecondPart + translation: minuto nang paisa-isa. + + +## +## v4.4 +## + +- id: in + translation: sa +- id: weeksAgo + translation: " l" +- id: yearAgo + translation: " taon" diff --git a/i18n/tl.yml b/i18n/tl.yml deleted file mode 100644 index 1600abc..0000000 --- a/i18n/tl.yml +++ /dev/null @@ -1,159 +0,0 @@ -# Tagalog language file for cState -# Version 4.4 - -- id: languageCode - translation: tl -- id: languageName - translation: Tagalog -- id: languageNameShort - translation: TGL - -## -## INDEX.HTML -## - -# Summary status message -- id: isDown - translation: Nakakaranas ng malaking isyu -- id: isDisrupted - translation: Nakakaranas ng pagkagambala -- id: isNotice - translation: Pakiusap paki-basa ang anunsyo -- id: isOk - translation: Lahat ng sistema ay gumagana - -# No JS warning -- id: noScriptingIntro - translation: Ay! Mukhang naka-diseybol ang Javascript mo. Pakiusap -- id: noScriptingLink - translation: i-eneybol ang skripting -- id: noScriptingOutro - translation: para mas maganda ang iyong eksperyensha sa websayt na ito. -- id: thisIsDown - translation: Hindi gumagana -- id: thisIsDisrupted - translation: May pagkagambala -- id: thisIsNotice - translation: Pagpapanatili -- id: thisIsOk - translation: Gumagana - -# "Last checked" + "just now" -- id: lastChecked - translation: Huling na-chek -- id: justNow - translation: ngayon lamang -- id: someTimeAgo - translation: nakaraan - -# Example usage: `5` + `years` -# Final result: 'Last checked 5 years ago' -# Number goes before string -# Use short variants until months -- id: yearsAgo - translation: mga taon -- id: monthsAgo - translation: mga buwan -- id: daysAgo - translation: a -- id: hoursAgo - translation: o -- id: minsAgo - translation: min -- id: secondsAgo - translation: s - -- id: autoRefreshNotice - translation: Susubukan naming mag-refresh bawat 5 min - -# Incidents -- id: incidents - translation: Mga insidente -- id: incidentHistory - translation: Kasaysayan ng mga insidente - -- id: resolved - translation: Na-resolba # if it's less than a min -- id: inUnderAMinute - translation: sa ilalim ng isang minuto # continuing the last string -- id: resolvedAfter - translation: Na-resolba pagkatapos ng # + 19 min -- id: ofDowntime - translation: ng dawntaym - -- id: downtimeOngoing - translation: Ang isyung ito ay hindi pa na-reresolba - - -- id: calmBeforeTheStorm - translation: Ito ba ang katahimikan bago ang bagyo? -- id: noIncidentsDesc - translation: Ang status peyg na ito ay walang na-itala na insidente. This status page has no logged incidents. This may be because the status page owner (or owners) have recently set up their status page, have had no downtime, or have not logged any downtime. - - -- id: continueReading - translation: Ipagpatuloy ang pagbabasa -- id: prev - translation: Dati -- id: next - translation: Susunod - -## -## OTHER -## - -- id: goBack - translation: Bumalik sa -- id: backToTop - translation: Bumalik sa ibabaw -- id: poweredBy - translation: Pinapatakbo ng - -- id: notFound - translation: Walang dito. -- id: notFoundText - translation: Ito'y maaaring problema sa amin. Maaring may nilipat kami na resors at ngayon ay nawala na ito. Posible din na ang resors na nais mong makita ay walang laman. Pero, ayos lang ba sa iyo ang dobol-check sa link? - -- id: rss - translation: Mag-subskrayb sa pamamagitan ng RSS -- id: toAllUpdates - translation: sa lahat ng mga updeyt -- id: or - translation: o -- id: onlyThisFeed - translation: sa feed lamang na ito - -## -## v3 -## -- id: entries - translation: mga entri -- id: newestToOldest - translation: mula sa pinaka-bago hanggang sa pinaka-luma - -## -## v4 -## -- id: notFoundAffected - translation: Mukang ang sistemang ito ay hindi na nag-eesist o di kailan mang nagkaroon ng na-rekord na dawntaym. - -## -## v4.1 -## - -- id: averageSystemsDowntime - translation: Kamakailan, base sa iyong average na data, mukang ang sistemang ito ay nag-dawn ng mga -- id: averageSystemsDowntimeSecondPart - translation: minuto nang paisa-isa. - - -## -## v4.4 -## - -- id: in - translation: sa -- id: weeksAgo - translation: " l" -- id: yearAgo - translation: " taon" diff --git a/layouts/index.json b/layouts/index.json index 5c47558..b37af7a 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -5,8 +5,8 @@ {{ $isDown := where $active "Params.severity" "=" "down" }} { "is": "index", - "cStateVersion": "4.4", - "apiVersion": "1.0.0", + "cStateVersion": "5.0", + "apiVersion": "2.0", "title": "{{ .Site.Title }}", "languageCodeHTML": "{{ .Site.LanguageCode }}", "languageCode": "{{ T "languageCode" }}", diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 79db524..531b47b 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -8,7 +8,7 @@ {{ if .Params.informational }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -23,7 +23,7 @@ {{ else if .Params.Resolved }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -65,9 +65,10 @@ {{ end }} {{ end }} - {{ else }} - + {{ else }} + + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 8465483..d966643 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -3,11 +3,11 @@ * Dev toolset */ - console.log('cState v4.4 - https://github.com/cstate/cstate'); + console.log('cState v5 Dev - https://github.com/cstate/cstate'); document.getElementsByTagName('html')[0].className = 'js'; /** - * Make theme color pretty + * Change header color based on status */ if (document.body.className === 'change-header-color') { @@ -43,6 +43,7 @@ /** * Returns a relative date string for the given date. */ + function timeSince(date) { var seconds = Math.floor((new Date() - date) / 1000); @@ -78,6 +79,7 @@ * Changes elements with the class 'relative-time' into relative times and * moves the timestamp to a title attribute tooltip. */ + function updateRelativeTimes() { var elements = document.querySelectorAll('.relative-time'); for (var i = 0; i < elements.length; i++) { @@ -95,21 +97,17 @@ element.innerHTML = html.trim(); } } + updateRelativeTimes(); - setInterval(updateRelativeTimes, 5000); - /** - * Reload homepage after 290 seconds. - */ - if (document.querySelector('body.status-homepage')) { - setTimeout(location.reload, 290000) - } + // Update "time since" feature every 5s + setInterval(updateRelativeTimes, 5000); {{ if ne .Site.Params.googleAnalytics "UA-00000000-1" }} - + + - {{ range $categories }} -
+
{{ if not .untitled }}
@@ -42,6 +32,8 @@ {{ end }} + +
{{ else }} @@ -94,8 +86,54 @@ {{ end }}
{{ end }} -
+ + + + {{ end }} - + \ No newline at end of file diff --git a/layouts/partials/js.html b/layouts/partials/js.html index d966643..765e787 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -40,6 +40,18 @@ document.location.pathname = '/admin'; } + /** + * Category logic + */ + + function toggleCategoryHead(el) { + if (el.parentNode.className == 'category category--open category--titled') { + el.parentNode.className = 'category category--closed category--titled'; + } else { + el.parentNode.className = 'category category--open category--titled'; + } + } + /** * Returns a relative date string for the given date. */ diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 283e840..dfb5a98 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -319,14 +319,23 @@ .status-notice .announcement-box { border-top: 0; } /** - * Dynamically show individual component statuses + * Dynamically show component statuses */ - .component-status { float: right; } - .component[data-status="ok"] .component-status { color: {{ .Site.Params.ok }}; } - .component[data-status="disrupted"] .component-status { color: {{ .Site.Params.disrupted }}; } - .component[data-status="down"] .component-status { color: {{ .Site.Params.down }}; } - .component[data-status="notice"] .component-status { color: {{ .Site.Params.notice }}; } + .category--open .category-status { display: none; } + .component-status, .category-status { float: right; } + .component[data-status="ok"] .component-status, + .category__head[data-status="ok"] .category-status + { color: {{ .Site.Params.ok }}; } + .component[data-status="disrupted"] .component-status, + .category__head[data-status="disrupted"] .category-status + { color: {{ .Site.Params.disrupted }}; } + .component[data-status="notice"] .component-status, + .category__head[data-status="notice"] .category-status + { color: {{ .Site.Params.notice }}; } + .component[data-status="down"] .component-status, + .category__head[data-status="down"] .category-status + { color: {{ .Site.Params.down }}; } /** * Responsiveness @@ -386,15 +395,19 @@ .error { color: #ff4242; } .warning {color: #ffde7f; } .ok { color: #7fff7f; } - - .component[data-status="ok"] - .component-status { color: #7fff7f; } - .component[data-status="disrupted"] - .component-status { color: #ffde7f; } - .component[data-status="notice"] - .component-status { color: #83a4e8; } - .component[data-status="down"] - .component-status { color: #ff8181; } + + .component[data-status="ok"] .component-status, + .category__head[data-status="ok"] .category-status + { color: #7fff7f; } + .component[data-status="disrupted"] .component-status, + .category__head[data-status="disrupted"] .category-status + { color: #ffde7f; } + .component[data-status="notice"] .component-status, + .category__head[data-status="notice"] .category-status + { color: #83a4e8; } + .component[data-status="down"] .component-status, + .category__head[data-status="down"] .category-status + { color: #ff8181; } } {{ end }} -- cgit v1.2.3-70-g09d2 From a69adf3be547f602c6fc6d6c4ee71a8073645a96 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 6 Mar 2021 16:23:24 +0200 Subject: Improve README --- README.md | 96 ++++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index ad667cc..b31a1fd 100644 --- a/README.md +++ b/README.md @@ -74,10 +74,9 @@ There are other commercial options that may update faster because of their archi ## Getting started 💻 This is how you create a **new site powered by cState.** What you are generating is a Hugo site with specific, already existing modifications (to Hugo, cState is a theme). + -### — The easy way — - -#### 💚 Netlify and Netlify CMS +### 💚 Netlify and Netlify CMS cState was built to work best with Netlify and comes with the neccesary files to enable Netlify CMS. @@ -102,38 +101,49 @@ These are the settings you should be using: + Publish directory: **public** + Add one build environment variable + Key: **HUGO_VERSION** - + Value: **0.48** (or later) + + Value: **0.80** (or later) ++ Also **for the Build image selection, pick Ubuntu Xenial 16.04 or later** +### 🧡 Other great hosting and CMS options -#### 🧡 GitLab Pages (Experimental) +The most popular options, apart from Netlify's offers, are: -GitLab Pages, unlike GitHub Pages, supports Hugo, so you can let GitLab build and serve cState without needing to do it on your own machine ([similarly to how you can blog with GitLab Pages from your phone](https://about.gitlab.com/blog/2016/08/19/posting-to-your-gitlab-pages-blog-from-ios/)). +* **Hosting:** + * GitHub Pages + * GitLab Pages + * CloudFlare Pages + * Vercel +* **Admin panels / CMS:** + * Forestry.io + * Or just use your Git provider (github.com, gitlab.com, etc) -[GitLab has a good guide for getting started with GitLab Pages in their documentation.](https://docs.gitlab.com/ee/user/project/pages/#getting-started) +You can also look at [other headless CMS options **(we use Git-based CMS types)** on jamstack.org](https://jamstack.org/headless-cms/). -**In short: a `.gitlab-ci.yml` file** is responsible for making cState work. As of v4.2.1, the [cState automatically ships with this file](https://github.com/cstate/cstate/releases/tag/v4.2.1). +### GitLab Pages -As of this time, this is a relatively untested option, but Hugo does seem to generate the right things (this can be checked by downloading the **CI/CD artificats**). +Here is a [good guide for getting started with the service.](https://docs.gitlab.com/ee/user/project/pages/#getting-started) -According to GitLab, it may take up to 30 minutes before the site is available after the first deployment. +**In short: a `.gitlab-ci.yml` file** is responsible for making cState work. As of v4.2.1, the [cState automatically ships with this file](https://github.com/cstate/cstate/releases/tag/v4.2.1), but support is still experimental. -You can [make Netlify CMS work on GitLab](https://www.netlifycms.org/docs/gitlab-backend/), but that requires overriding an existing file in the theme. Create a file in `static/admin/config.yml` and follow the instructions linked earlier. (cState by default ships with Git Gateway.) +As of this time, this is a relatively untested option, but Hugo does seem to generate the right things (this can be checked by downloading the **CI/CD artificats**). +According to GitLab, it may take up to 30 minutes before the site is available after the first deployment. -#### 🖤 Other platforms +You can [make Netlify CMS work on GitLab](https://www.netlifycms.org/docs/gitlab-backend/), but that requires overriding an existing file in the theme. Create a file in `static/admin/config.yml` and follow the instructions linked earlier. (cState by default ships with Git Gateway for Netlify.) -Check out [Forestry.io](//forestry.io) and [Vercel](//vercel.com). +### GitHub Pages, CloudFlare Pages, Vercel, Forestry, and others -Keep reading to see how to deploy manually. +There is no official, separate documentation for these, but if you look below to see how to deploy manually, the instructions will be the same everywhere. +### Doing it on your PC +Keep reading to see how to deploy manually. Developers wishing to contribute, scroll to the very bottom. -### — Manual builds — +### Manual builds For this tutorial, it is assumed that you have Hugo and Git installed (check with `hugo version` & `git --version`). -> A minimum version of `0.48` is required for Hugo, starting with v3. - +> A minimum version of `0.80` is required for Hugo, starting with v5. #### I want to use my site in production @@ -161,30 +171,6 @@ And the folder `public` can now be hosted. The downside with manual building is that, if you do not want to use a solution like GitLab Pages or Netlify, this process will need to happen on your computer. This can be tedious. - -#### I want to contribute to the development - -1. Clone this repository in the command line: - -```bash -git clone --recursive -b master https://github.com/cstate/cstate.git -``` - -2. Navigate to the theme directory: - -```bash -cd cstate/exampleSite -``` - -3. Launch the development setup like this: - -```bash -hugo serve --baseUrl=http://localhost/ --theme=cstate --themesDir=../.. --verbose -``` - -The main directory is the theme itself (the cState guts, basically) and the `exampleSite` folder houses all content. Use this local setup to experiment before making a PR. - - ### — Docker — cState comes with a Dockerfile and Netlify ([according to their article from 2016](https://www.netlify.com/blog/2016/10/18/how-our-build-bots-build-sites/)) uses a similar Docker system to build cState. This is an option for people who prefer Docker and NGINX instead of serverless, but serverless still has the priority in our development. @@ -280,15 +266,37 @@ Check out [the wiki](https://github.com/cstate/cstate/wiki). ## Contribute 💥 -**Making a change in the code** +### Making a change in the code PRs should be submitted to the `dev` branch, if it exists. Before submitting a pull request, create an issue to [discuss the implications of your proposal](https://github.com/cstate/cstate/issues). -**For translators** +Here is a guide for how you should develop: + +1. Clone this repository in the command line: + +```bash +git clone --recursive -b master https://github.com/cstate/cstate.git +``` + +2. Navigate to the theme directory: + +```bash +cd cstate/exampleSite +``` + +3. Launch the development setup like this: + +```bash +hugo serve --baseUrl=http://localhost/ --theme=cstate --themesDir=../.. --verbose +``` + +The main directory is the theme itself (the cState guts, basically) and the `exampleSite` folder houses all content. Use this local setup to experiment before making a PR. + +### For translators [See this](https://github.com/cstate/cstate/wiki/Translations#add-your-translations). -**Code of conduct** +### Code of conduct [Be kind](/CODE_OF_CONDUCT.md). -- cgit v1.2.3-70-g09d2 From 6cf928cf1122055a595dd24ec6a96e69ab62ae05 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 6 Mar 2021 17:25:23 +0200 Subject: Improve Netlify.toml --- exampleSite/netlify.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exampleSite/netlify.toml b/exampleSite/netlify.toml index 0645d58..5def631 100644 --- a/exampleSite/netlify.toml +++ b/exampleSite/netlify.toml @@ -14,4 +14,9 @@ command = "hugo -b $DEPLOY_PRIME_URL" [context.branch-deploy] - command = "hugo -b $DEPLOY_PRIME_URL" \ No newline at end of file + command = "hugo -b $DEPLOY_PRIME_URL" + +[[headers]] + for = "/*.json" + [headers.values] + Access-Control-Allow-Origin = "*" \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 730ffa6e49d6758134ae2c140f561c7a97ff9dd2 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 6 Mar 2021 17:34:29 +0200 Subject: Clean up README --- README.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b31a1fd..43812a8 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,12 @@ -

cState example illustration

- -
+

cState example illustration

> Über fast, backwards compatible (IE8+), tiny, and simple status page built with Hugo. Completely _free_ with Netlify. Comes with Netlify CMS, read-only API, and other useful features. -## Sponsors 🏅 - -Statuspal +GitHub last commit Awesome status page -You can also support the creator of this project by **starring, sharing, and using cState**. Thank you! +Sponsored by Statuspal -[*Learn more about sponsorships*](https://github.com/sponsors/mistermantas) +You can also support the creator of this project by **starring, sharing, using cState and/or [financially supporting the author](https://github.com/sponsors/mistermantas)**. Thank you! ## Examples 🥳 @@ -19,8 +15,6 @@ You can also support the creator of this project by **starring, sharing, and usi * [**Example site — cstate.mnts.lt**](https://cstate.mnts.lt) * [Source code of the example cState site](https://github.com/cstate/example) -*Thank you to [Netlify](https://www.netlify.com) for hosting our demo websites!* - ### More examples from the internet * [Chocolatey](https://status.chocolatey.org/) -- cgit v1.2.3-70-g09d2 From ad77f48b3beb3407e4bafedb93076291a61111c2 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 6 Mar 2021 17:36:08 +0200 Subject: cleanup --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 43812a8..346a1ab 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ And the folder `public` can now be hosted. The downside with manual building is that, if you do not want to use a solution like GitLab Pages or Netlify, this process will need to happen on your computer. This can be tedious. -### — Docker — +### Docker cState comes with a Dockerfile and Netlify ([according to their article from 2016](https://www.netlify.com/blog/2016/10/18/how-our-build-bots-build-sites/)) uses a similar Docker system to build cState. This is an option for people who prefer Docker and NGINX instead of serverless, but serverless still has the priority in our development. @@ -296,7 +296,7 @@ The main directory is the theme itself (the cState guts, basically) and the `exa ## License ✍ -[MIT](https://github.com/cstate/cstate/blob/master/LICENSE.md) © [Mantas Vilčinskas](https://mnts.lt) +[MIT](https://github.com/cstate/cstate/blob/master/LICENSE.md) © [Mantas Vilčinskas](https://vilcinskas.me) A special thanks to all [the contributors](https://github.com/cstate/cstate/graphs/contributors) -- cgit v1.2.3-70-g09d2 From 7aac467a98762e9c717ff04c4c62833ae454b911 Mon Sep 17 00:00:00 2001 From: Josh Miles <19347018+notjoshmiles@users.noreply.github.com> Date: Mon, 8 Mar 2021 12:16:04 +0000 Subject: Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 346a1ab..2b7af8c 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ You can also support the creator of this project by **starring, sharing, using c * [FSCI](https://status.fsci.in/) * [Storehouse](https://status.sthse.co) * [Hyrousek](https://status.hyrousek.tk) +* [josh.win](https://status.josh.win) *Want your status page here? [Create a PR](https://github.com/cstate/cstate/edit/dev/README.md)!* @@ -105,7 +106,7 @@ The most popular options, apart from Netlify's offers, are: * **Hosting:** * GitHub Pages * GitLab Pages - * CloudFlare Pages + * Cloudflare Pages * Vercel * **Admin panels / CMS:** * Forestry.io @@ -125,7 +126,7 @@ According to GitLab, it may take up to 30 minutes before the site is available a You can [make Netlify CMS work on GitLab](https://www.netlifycms.org/docs/gitlab-backend/), but that requires overriding an existing file in the theme. Create a file in `static/admin/config.yml` and follow the instructions linked earlier. (cState by default ships with Git Gateway for Netlify.) -### GitHub Pages, CloudFlare Pages, Vercel, Forestry, and others +### GitHub Pages, Cloudflare Pages, Vercel, Forestry, and others There is no official, separate documentation for these, but if you look below to see how to deploy manually, the instructions will be the same everywhere. -- cgit v1.2.3-70-g09d2 From a95d82dea49227feeefedf6a58a3593da307e128 Mon Sep 17 00:00:00 2001 From: Jacob Marshall <29145479+jacobhq@users.noreply.github.com> Date: Sun, 14 Mar 2021 08:15:20 +0000 Subject: Allow cross origin on Vercel deployments --- exampleSite/vercel.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 exampleSite/vercel.json diff --git a/exampleSite/vercel.json b/exampleSite/vercel.json new file mode 100644 index 0000000..53aef1d --- /dev/null +++ b/exampleSite/vercel.json @@ -0,0 +1,12 @@ +{ + "headers": [ + { + "source": "/(.*)", + "headers": [ + { "key": "Access-Control-Allow-Origin", "value": "*" }, + { "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS" }, + { "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" } + ] + } + ] +} -- cgit v1.2.3-70-g09d2 From 740f8fe924ecda15de73002f648454cf5612142f Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 17 Apr 2021 14:05:27 +0300 Subject: v5 ready to deploy --- layouts/partials/js.html | 2 +- layouts/partials/meta.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 765e787..28ce0a1 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -3,7 +3,7 @@ * Dev toolset */ - console.log('cState v5 Dev - https://github.com/cstate/cstate'); + console.log('cState v5.0 - https://github.com/cstate/cstate'); document.getElementsByTagName('html')[0].className = 'js'; /** diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index dfb5a98..c46ee94 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -12,7 +12,7 @@ {{ range .AlternativeOutputFormats -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} - +

GitHub release GitHub last commit GitHub repo size in bytes Discord Chat Awesome status page

GitHub release GitHub last commit GitHub repo size in bytes Discord Chat Twitter Awesome status page