From 96fcd49e041833f54cf8adb55cf32d3889aff775 Mon Sep 17 00:00:00 2001 From: "stella.ubaha@boston.gov" Date: Wed, 2 Oct 2024 12:02:55 -0400 Subject: [PATCH 1/2] DIG-5063 Replace SVG embed with svg image --- docroot/themes/custom/bos_theme/bos_theme.theme | 8 ++++---- .../themes/custom/bos_theme/css/bos_theme_overrides.css | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docroot/themes/custom/bos_theme/bos_theme.theme b/docroot/themes/custom/bos_theme/bos_theme.theme index 542f61c730..30c9bdf0bd 100755 --- a/docroot/themes/custom/bos_theme/bos_theme.theme +++ b/docroot/themes/custom/bos_theme/bos_theme.theme @@ -753,11 +753,11 @@ function bos_theme_preprocess_image(&$variables) { $variables['uri'] = str_replace("https://assets.boston.gov/icons", $path . "/themes/custom/patterns/assets/icons", $variables['uri']); } // Load the icon. - $icon = file_get_contents($variables['uri']); + //$icon = file_get_contents($variables['uri']); // If the icon is in the format //domain/file then add scheme. - $icon = preg_replace(['/<\?xml.*\?>/i', '//i'], '', $icon); - $variables['icon'] = Xss::filter($icon, explode(' ', BOS_CORE_SVG_ELEMENTS)); - $variables['attributes']->removeAttribute("src"); + /*$icon = preg_replace(['/<\?xml.*\?>/i', '//i'], '', $icon);*/ + //$variables['icon'] = Xss::filter($icon, explode(' ', BOS_CORE_SVG_ELEMENTS)); + //$variables['attributes']->removeAttribute("src"); } } diff --git a/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css b/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css index fa5165d449..ee574f2003 100644 --- a/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css +++ b/docroot/themes/custom/bos_theme/css/bos_theme_overrides.css @@ -777,7 +777,7 @@ What: Fixes the department icon to be 100px square. (Iterators issue #39) */ @media screen and (min-width: 980px) { .node-type-department-profile .department-icon { - padding: 13px 0 0 15px; + padding: 0 0 0 4px; } } .node-department-profile .department-icon svg { From 6c68424b9acc3717b6326e4ed08be56d5621025f Mon Sep 17 00:00:00 2001 From: "stella.ubaha@boston.gov" Date: Wed, 2 Oct 2024 13:58:53 -0400 Subject: [PATCH 2/2] DIG-5063 Replace SVG embed with svg image --- docroot/themes/custom/bos_theme/bos_theme.theme | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docroot/themes/custom/bos_theme/bos_theme.theme b/docroot/themes/custom/bos_theme/bos_theme.theme index 30c9bdf0bd..77e0fcf525 100755 --- a/docroot/themes/custom/bos_theme/bos_theme.theme +++ b/docroot/themes/custom/bos_theme/bos_theme.theme @@ -752,6 +752,10 @@ function bos_theme_preprocess_image(&$variables) { $path = \Drupal::request()->getSchemeAndHttpHost(); $variables['uri'] = str_replace("https://assets.boston.gov/icons", $path . "/themes/custom/patterns/assets/icons", $variables['uri']); } + + /* + * TODO: Review if the rest of the code in that hook is still actually required. + */ // Load the icon. //$icon = file_get_contents($variables['uri']); // If the icon is in the format //domain/file then add scheme.