From 8775ab093f4bea45964576b7e94336c4afcc5c20 Mon Sep 17 00:00:00 2001 From: rdrew Date: Thu, 29 May 2025 09:57:31 -0300 Subject: [PATCH 1/2] cleanup --- .DS_Store | Bin 6148 -> 6148 bytes .gitignore | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index a580bdfa4f58bbd6ddd40e9566b76e176687eb88..a877e222e8c12396cd4b52087d1085ea2a568184 100644 GIT binary patch delta 310 zcmZoMXfc=|#>B)qu~2NHo}wrd0|Nsi1A_nqLk>eCLkUAFLvd31#*NDvCmV>c)N_JG zav2JcWs3`va`Kaa`nD$(Bn1{L;LX;^=TB84gYk z&UgXw>S|L99R*V}!&)7MYD*&n9R(9(v)Wot4pC)&>!A4ToZP(pPN3U>fDz~~FyMvK tFsf@~j}q%w&zlg2~NEW1{0YZZ{Zw?XJz&x>m1pu!ROvV5J delta 88 zcmZoMXfc=|#>CJzu~2NHo}wrt0|NsP3otO`FeEaRFr+dRmjzEORA*$|{FF(Fb+ZC< nB-3Vg4t@@xmd%39- Date: Fri, 30 May 2025 12:34:32 -0300 Subject: [PATCH 2/2] svg in prepro --- olivesdocs.theme | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/olivesdocs.theme b/olivesdocs.theme index f9ace9a..ff28324 100755 --- a/olivesdocs.theme +++ b/olivesdocs.theme @@ -698,33 +698,17 @@ function _olivesdocs_hex_to_hsl(string $hex_string) { return [$h, $s, $l]; } -/* -function olivesdocs_preprocess_mirador(&$variables) { - $block = \Drupal::service('plugin.manager.block')->createInstance($viewer . 'mirador_block', [ - 'iiif_manifest_url' => "/node/$manifest_nid/manifest-single", - 'thumbnail_navigation_position' => 'hidden', - 'window_config' => [ - 'allowClose' => FALSE, - 'allowMaximize' => FALSE, - 'allowTopMenuButton' => FALSE, - 'allowWindowSideBar' => FALSE, - 'hideWindowTitle' => TRUE, - 'panels' => [ - 'info' => FALSE, - 'attribution' => FALSE, - ' canvas' => FALSE, - 'annotations' => FALSE, - 'search' => FALSE, - ], - ], - 'workspace_config' => [ - 'allowNewWindows' => FALSE, - 'isWorkspaceAddVisible' => FALSE, - 'workspaceControlPanel' => [ - 'enable' => FALSE, - ], - ], - ]); +function mytheme_preprocess_field(&$variables, $hook) { + // Check if this is the title field for the landing_page content type. + if ($variables['element']['#field_name'] == 'title' && $variables['element']['#bundle'] == 'landing_page') { + // Define the SVG code. + $svg_code = ''; + + // Add the SVG code as a Twig variable. + $variables['svg_image'] = [ + '#markup' => $svg_code, + '#allowed_tags' => ['svg', 'path'], + ]; + } } - */