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 --- layouts/partials/meta.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts/partials/meta.html') diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 77c66db..283e840 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 -}} - + - {{ 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 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(-) (limited to 'layouts/partials/meta.html') 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 -}} - +