From 0fd1a690e647884d534f19b4c82524e06d18eaeb Mon Sep 17 00:00:00 2001
From: rdrew <rdrew@upei.ca>
Date: Wed, 26 Feb 2025 16:03:41 -0400
Subject: [PATCH] mirador

---
 css/components/unsorted.css | 25 ++++++++++++++++---------
 olivesimagined.theme        | 28 ++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 9 deletions(-)

diff --git a/css/components/unsorted.css b/css/components/unsorted.css
index 51c2c61..3803644 100755
--- a/css/components/unsorted.css
+++ b/css/components/unsorted.css
@@ -1,7 +1,7 @@
 .leaflet-popup-content {
   & .node--view-mode-teaser .field {
-      margin-block-end: 0;
-    }
+    margin-block-end: 0;
+  }
   & .node__title {
     font-size: 1.4rem;
   }
@@ -12,17 +12,16 @@
     padding-bottom: 0;
     font-size: 0.9rem;
     & .field__label,
-    .field__items{
+    .field__items {
       font-size: 0.9rem;
-      font-weight: normal;;
-      
+      font-weight: normal;
     }
   }
 }
 .view-alphabetical-title-list {
   & .node--view-mode-teaser .field {
-      margin-block-end: 0;
-    }
+    margin-block-end: 0;
+  }
   & .node__title {
     /*font-size: 1.4rem;*/
   }
@@ -33,10 +32,18 @@
     /*padding-bottom: 0;*/
     /*font-size: 0.9rem;*/
     & .field__label,
-    .field__items{
+    .field__items {
       /*font-size: 0.9rem;*/
       font-weight: normal;
-      
     }
   }
 }
+.node--type-book {
+  figure {
+    border: 1px solid #ccc;
+    border-bottom: 0;
+  }
+  figcaption {
+    border: 1px solid #ccc;
+  }
+}
diff --git a/olivesimagined.theme b/olivesimagined.theme
index 50212c9..3f6857c 100755
--- a/olivesimagined.theme
+++ b/olivesimagined.theme
@@ -698,3 +698,31 @@ function _olivesimagined_hex_to_hsl(string $hex_string) {
   return [$h, $s, $l];
 }
 
+function olivesimagined_preprocess_mirador(&$variables) {
+  $block = \Drupal::service('plugin.manager.block')->createInstance($viewer . '_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,
+      ],
+
+    ],
+  ]);
+}