From e20eab57b69b023b40a39e17ae60b8888894c286 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 27 Oct 2022 10:18:08 -0400 Subject: [PATCH] Make sidebar buttons more like buttons, improve screen reader support, remove resource shortcode --- themes/red/assets/css/site.css | 14 +++++++++++-- .../layouts/_default/_markup/render-link.html | 2 +- themes/red/layouts/partials/sidebar.html | 4 ++-- themes/red/layouts/shortcodes/resource.html | 21 ------------------- 4 files changed, 15 insertions(+), 26 deletions(-) delete mode 100644 themes/red/layouts/shortcodes/resource.html diff --git a/themes/red/assets/css/site.css b/themes/red/assets/css/site.css index 1dac4eb..ab413d7 100644 --- a/themes/red/assets/css/site.css +++ b/themes/red/assets/css/site.css @@ -32,7 +32,9 @@ } aside div a { - font-size: 125%; + font-size: 135%; + margin-top: 13px; + margin-bottom: 13px; } } @@ -79,6 +81,14 @@ footer { flex-basis: 100%; } +.site-menu { + width: 100%; + border: 1px solid gray; + border-radius: 5px; + margin-top: 5px; + margin-bottom: 5px; +} + .article-img { width: 100%; height: auto; @@ -115,4 +125,4 @@ tr:nth-child(even) { table { width: 100%; -} \ No newline at end of file +} diff --git a/themes/red/layouts/_default/_markup/render-link.html b/themes/red/layouts/_default/_markup/render-link.html index 9f0136c..af91efa 100644 --- a/themes/red/layouts/_default/_markup/render-link.html +++ b/themes/red/layouts/_default/_markup/render-link.html @@ -1,4 +1,4 @@ {{ $icon := resources.Get "external-link.svg" }} {{ .PlainText }}{{ if strings.HasPrefix .Destination "http" }}External link{{ end -}} +target="_blank"{{ end }}>{{ .PlainText }}{{ if strings.HasPrefix .Destination "http" }}{{- end -}} diff --git a/themes/red/layouts/partials/sidebar.html b/themes/red/layouts/partials/sidebar.html index 120687a..7c8f27f 100644 --- a/themes/red/layouts/partials/sidebar.html +++ b/themes/red/layouts/partials/sidebar.html @@ -1,7 +1,7 @@ \ No newline at end of file + diff --git a/themes/red/layouts/shortcodes/resource.html b/themes/red/layouts/shortcodes/resource.html deleted file mode 100644 index a01bdea..0000000 --- a/themes/red/layouts/shortcodes/resource.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ $arg := .Get "page"}} -{{ $name := .Get "name" }} - -{{ $headless := .Site.GetPage $arg }} -{{ $image := ($headless.Resources.ByType "image") }} -{{ with $image }} -{{ range . }} - -{{ if eq .Name $name }} - - -
-{{ $resized := .Resize "x400 webp drawing" }} -{{ .Name }} -
"{{.Name}}" from {{ $headless.Title }}.
-{{ end }} -
- -{{ end }} - -{{ end }}