From ca0f8d390c5076a271d3b05649fbdf41faa20f0e Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Tue, 1 Jul 2025 02:57:55 -0500 Subject: [PATCH] Add workaround for code icon being chopped off on side Introduced by 16f08dce7fc0d5c3d7f8f0fa00629d268adb71d7. Since the aspect ratio of the icon isn't square, it's too wide and collides with the text next to it. Would be nice to follow #82 and switch to a better maintained icon pack. --- assets/css/bobastyle.css | 5 +++++ layouts/_partials/icon_code.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index db4f1c7..370b23c 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -299,6 +299,11 @@ table.simple tbody tr:nth-child(even) { vertical-align: sub; } +/* workarounds for some icons from jam-icons being non-square aspect ratio */ +.icon-code { + width: 1.25em; +} + /* }}} */ diff --git a/layouts/_partials/icon_code.html b/layouts/_partials/icon_code.html index f5003c2..940980a 100644 --- a/layouts/_partials/icon_code.html +++ b/layouts/_partials/icon_code.html @@ -1,6 +1,6 @@ {{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}} {{- $icon := $icon_resource.Content -}} -{{- $icon = replaceRE `` (printf `%s icon` .) $icon -}} {{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}} {{- $icon | safeHTML -}}