From 89d3544db502c9a6c18e22efc7d39713fd6a90ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar?= Date: Wed, 24 Jul 2024 19:59:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style(error):=20enhance=20visibi?= =?UTF-8?q?lity=20of=20Zola=20errors=20(#359)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sass/main.scss | 1 + sass/parts/_zola-error.scss | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 sass/parts/_zola-error.scss diff --git a/sass/main.scss b/sass/main.scss index 0023216..05a2ed8 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -21,6 +21,7 @@ @use 'parts/_table.scss'; @use 'parts/_tags.scss'; @use 'parts/_theme-switch.scss'; +@use 'parts/_zola-error.scss'; @font-face { src: local('Inter'), diff --git a/sass/parts/_zola-error.scss b/sass/parts/_zola-error.scss new file mode 100644 index 0000000..c64cea7 --- /dev/null +++ b/sass/parts/_zola-error.scss @@ -0,0 +1,28 @@ +// Styles Zola error messages. See https://github.com/welpo/tabi/pull/359 +body > div:last-child > div:last-child[style]:not([class]):not([id]) { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 9999; + box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px; + border: 2px solid var(--admonition-danger-border); + border-radius: 5px; + background-color: var(--admonition-danger-bg); + padding: 15px; + width: fit-content; + max-width: 80%; +} + +body > div:last-child > div:last-child[style]:not([class]):not([id]) > p[style]:first-child { + margin: 0; + color: var(--admonition-danger-border); + font-weight: bold; +} + +body > div:last-child > div:last-child[style]:not([class]):not([id]) > pre[style]:last-child { + margin-bottom: 0; + background-color: var(--admonition-danger-code); + padding: 10px; + overflow-x: auto; +}