From 610bb62f30a1a23f2fcca3d0088449bf53a3f394 Mon Sep 17 00:00:00 2001 From: Greenscreener Date: Mon, 5 Oct 2020 02:47:06 +0200 Subject: [PATCH 1/2] Added online-only notice. --- themes/patek/assets/css/main.scss | 15 +++++++++++++++ themes/patek/layouts/index.html | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/themes/patek/assets/css/main.scss b/themes/patek/assets/css/main.scss index 4f8aa53..0b95462 100644 --- a/themes/patek/assets/css/main.scss +++ b/themes/patek/assets/css/main.scss @@ -329,3 +329,18 @@ patek-logo { font-weight: bold; } // /Custom styles + +.patek-logo-top { + position: relative; +} +.patek-logo-top .online-notice { + white-space: nowrap; + position: absolute; + display: inline-block; + font-size: 2rem; + padding: 0px 5px; + border-radius: 3px; + background-color: red; + font-family: 'Fira Code', monospace; + transform: rotate(-27deg) translate(-190px, -50px); +} diff --git a/themes/patek/layouts/index.html b/themes/patek/layouts/index.html index 0023239..417ab45 100644 --- a/themes/patek/layouts/index.html +++ b/themes/patek/layouts/index.html @@ -29,6 +29,9 @@
Pátek +
@@ -90,4 +93,4 @@
{{ partial "footer.html" . }} -{{ end }} \ No newline at end of file +{{ end }} From 2fbd3f949f806d6446d81afb9672c95f676db6af Mon Sep 17 00:00:00 2001 From: Greenscreener Date: Thu, 15 Oct 2020 12:20:54 +0200 Subject: [PATCH 2/2] Added programmatic switching of online mode to config. --- config.json | 7 +++++++ themes/patek/layouts/index.html | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 6807dc8..cdd4c53 100644 --- a/config.json +++ b/config.json @@ -12,6 +12,13 @@ "languageName": "English" } }, + "params": { + "onlineOnly": { + "active": true, + "link": "/blog/covidbreak-part2", + "displayText":"Online mode" + } + }, "taxonomies": { "tag": "tags", "project": "projects", diff --git a/themes/patek/layouts/index.html b/themes/patek/layouts/index.html index 417ab45..53cc19a 100644 --- a/themes/patek/layouts/index.html +++ b/themes/patek/layouts/index.html @@ -29,9 +29,11 @@
Pátek + {{ if .Site.Params.onlineOnly.active }} + {{ end }}