diff options
author | Mantas Vilčinskas <hi@mnts.lt> | 2022-02-12 11:24:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-12 11:24:26 +0200 |
commit | fadb79e4e7cfc0f26c06fd6630952f76537b29b9 (patch) | |
tree | e5779d2cb51f5d6bb58956d8052abfa363af374e | |
parent | 1b38c11f977115be1618c1ec1600441823f7e7cf (diff) | |
parent | 4278adfa68955602bf7f79adc42f177e63d34905 (diff) |
cState v5.3 #218
cState v5.3
-rw-r--r-- | exampleSite/config.yml | 4 | ||||
-rw-r--r-- | exampleSite/netlify.toml | 3 | ||||
-rw-r--r-- | layouts/_default/list.xml | 1 | ||||
-rw-r--r-- | layouts/index.json | 2 | ||||
-rw-r--r-- | layouts/index.xml | 1 | ||||
-rw-r--r-- | layouts/issues/small.html | 2 | ||||
-rw-r--r-- | layouts/partials/index/components.html | 8 | ||||
-rw-r--r-- | layouts/partials/js.html | 2 | ||||
-rw-r--r-- | layouts/partials/meta.html | 7 |
9 files changed, 26 insertions, 4 deletions
diff --git a/exampleSite/config.yml b/exampleSite/config.yml index b270320..f968d0b 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -162,6 +162,10 @@ params: category: North Coast - name: Backup Gateway category: North Coast + - name: Website + description: The web frontend for the application. + category: Uncategorized + link: https://example.com/ - name: API description: The guts of the application. category: Uncategorized diff --git a/exampleSite/netlify.toml b/exampleSite/netlify.toml index b403f89..edf34b2 100644 --- a/exampleSite/netlify.toml +++ b/exampleSite/netlify.toml @@ -20,3 +20,6 @@ for = "/*.json" [headers.values] Access-Control-Allow-Origin = "*" + for = "/*.xml" + [headers.values] + Access-Control-Allow-Origin = "*" diff --git a/layouts/_default/list.xml b/layouts/_default/list.xml index 219354b..5b7e2ce 100644 --- a/layouts/_default/list.xml +++ b/layouts/_default/list.xml @@ -1,3 +1,4 @@ +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <link rel="alternate" type="text/html" href="{{ .Site.BaseURL }}"/> diff --git a/layouts/index.json b/layouts/index.json index bf2e62c..207f0ac 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -1,6 +1,6 @@ {{ $incidents := where .Site.RegularPages "Params.section" "issue" }}{{ $active := where $incidents "Params.resolved" "=" false }}{{ $isNotice := where $active "Params.severity" "=" "notice" }}{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }}{{ $isDown := where $active "Params.severity" "=" "down" }}{ "is": "index", - "cStateVersion": "5.2", + "cStateVersion": "5.3", "apiVersion": "2.0", "title": "{{ .Site.Title }}", "languageCodeHTML": "{{ .Site.LanguageCode }}", diff --git a/layouts/index.xml b/layouts/index.xml index c8bce41..89f76b0 100644 --- a/layouts/index.xml +++ b/layouts/index.xml @@ -1,4 +1,5 @@ {{ if not .Site.Params.disableIncidentHistory }} +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <!-- diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 51f5e67..5eb3a2d 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -88,7 +88,7 @@ <!-- Marker --> {{ if eq .Params.severity "notice" }} - <strong class="warning"> + <strong class="error"> ◆ {{ if .Date.Before now }} {{ T "downtimeOngoing" }} diff --git a/layouts/partials/index/components.html b/layouts/partials/index/components.html index d3d67bd..835c523 100644 --- a/layouts/partials/index/components.html +++ b/layouts/partials/index/components.html @@ -65,6 +65,14 @@ </span> {{ end }} + {{ with .link }} + <span class="span-icon"> + <a href="{{ . }}" class="link-style"> + 🔗 + </a> + </span> + {{ end }} + <span class="component-status"> {{ if $thisIsDown }} {{ T "thisIsDown" }} diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 88948df..1b9c554 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -3,7 +3,7 @@ * Dev toolset */ - console.log('cState v5.2 - https://github.com/cstate/cstate'); + console.log('cState v5.3 - https://github.com/cstate/cstate'); document.getElementsByTagName('html')[0].className = 'js'; /** diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 0e8725b..85a235a 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -12,7 +12,7 @@ {{ range .AlternativeOutputFormats -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} - <meta name="generator" content="cState v5.2 - https://github.com/cstate/cstate"> + <meta name="generator" content="cState v5.3 - https://github.com/cstate/cstate"> <meta name="theme-color" content="{{ .Site.Params.brand }}"> <script> var themeBrandColor = '{{ .Site.Params.brand }}'; @@ -115,6 +115,11 @@ .padding { padding: 12px; } .clicky { cursor: pointer; } + .link-style { border: none; } + .span-icon { + float: right; + margin-left: 16px; + } /** * Categories |