From 693e8f5cfc2215648232cb84c79f24a7ccc33aad Mon Sep 17 00:00:00 2001 From: PCloud Date: Fri, 3 May 2024 14:20:34 +0100 Subject: [PATCH] chore: improve accessbility and SEO --- assets/css/main.css | 8 ++++++++ layouts/_default/_markup/render-codeblock.html | 3 ++- layouts/_default/_markup/render-heading.html | 2 +- layouts/partials/single/footer.html | 2 +- tailwind.config.js | 2 ++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index e9c48233e..0e96e3e45 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -914,6 +914,10 @@ html.dark { padding-bottom: 0.5rem; } +.tw-text-fgColor-link-muted { + color: var(--global-link-color); +} + .tw-shadow-black { --tw-shadow-color: #000; --tw-shadow: var(--tw-shadow-colored); @@ -959,6 +963,10 @@ html.dark { color: var(--fgColor-link); } +.hover\:tw-text-fgColor-link-muted-hover:hover { + color: var(--global-link-hover-color); +} + .hover\:tw-shadow-md:hover { --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html index 97e8c0d22..0b7d27711 100644 --- a/layouts/_default/_markup/render-codeblock.html +++ b/layouts/_default/_markup/render-codeblock.html @@ -31,7 +31,8 @@ tw-duration-500 tw-ease-in-out print:!tw-hidden" - disabled> + disabled + aria-hidden="true"> {{- partial "plugin/fontawesome.html" (dict "Style" "solid" "Icon" "chevron-right") -}} diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index c8a3b18bf..e00930c47 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -15,7 +15,7 @@ {{- end -}} - + {{- if $isEnable -}} {{/* Add 1 to the current level */}} diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html index af1b024c3..5ea30de6d 100644 --- a/layouts/partials/single/footer.html +++ b/layouts/partials/single/footer.html @@ -82,7 +82,7 @@ {{- end -}}
- {{ T "back" }} | {{ T "home" }} +  | {{ T "home" }}
diff --git a/tailwind.config.js b/tailwind.config.js index 4ea3f0355..b1e9f98ab 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -11,6 +11,8 @@ module.exports = { 'fgColor-muted' : 'var(--fgColor-muted)', 'fgColor-link' : 'var(--fgColor-link)', 'fgColor-link-hover' : 'var(--fgColor-link-hover)', + 'fgColor-link-muted': 'var(--global-link-color)', + 'fgColor-link-muted-hover': 'var(--global-link-hover-color)', 'bgColor-default' : 'var(--bgColor-default)', 'bgColor-secondary' : 'var(--bgColor-secondary)', 'bgColor-accent-emphasis' : 'var(--bgColor-accent-emphasis)',