From 9a6e8edaccd871cc24e29a6ead691b6feb655843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 7 Oct 2022 20:25:44 +0200 Subject: [PATCH] mermaid: remove W3C validator errors #337 remove old-styled alignment --- exampleSite/content/basics/generator/_index.en.md | 2 +- layouts/partials/shortcodes/mermaid.html | 2 +- static/css/theme.css | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/basics/generator/_index.en.md b/exampleSite/content/basics/generator/_index.en.md index a52834226f..db38d29c21 100644 --- a/exampleSite/content/basics/generator/_index.en.md +++ b/exampleSite/content/basics/generator/_index.en.md @@ -27,7 +27,7 @@ This only works in modern browsers. {{% button style="secondary" icon="download" %}}Download variant{{% /button %}} {{% button style="warning" icon="trash" %}}Reset variant{{% /button %}} -
Graph
+
Graph
{{% button style="secondary" icon="download" %}}Download variant{{% /button %}} {{% button style="warning" icon="trash" %}}Reset variant{{% /button %}} diff --git a/layouts/partials/shortcodes/mermaid.html b/layouts/partials/shortcodes/mermaid.html index 0de0d720dc..6dded3f2a1 100644 --- a/layouts/partials/shortcodes/mermaid.html +++ b/layouts/partials/shortcodes/mermaid.html @@ -2,7 +2,7 @@ {{- $content := .content }} {{- $align := .align | default "center" }} {{- with $context }} -
+
{{- replaceRE "'" "'" ( replaceRE """ "\"" ( $content | safeHTML ) ) -}}
{{- .Page.Store.Set "hasMermaid" true }} diff --git a/static/css/theme.css b/static/css/theme.css index 3fa8a7b074..c648b948b0 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1479,3 +1479,18 @@ input[type="search"]::-webkit-search-results-decoration { display: none; } transform: translateY(0%); } */ + +.align-right { + display: flex; + justify-content: right; +} + +.align-center { + display: flex; + justify-content: center; +} + +.align-left { + display: flex; + justify-content: left; +}