From 04a7dbc11255f29195c07df93e5cf9a5c5e78462 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 22 Jun 2018 15:07:33 +0200 Subject: [PATCH] Made main images of detail pages be in a link, that leads to the image file. Fixed error in search. --- .gitignore | 2 ++ inc/mdEmbeds.php | 10 +++++----- inc/search.php | 2 +- themes/default/mdEmbeds.css | 3 +-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 58a3d51..8266c20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /data /files +/new +*.swp diff --git a/inc/mdEmbeds.php b/inc/mdEmbeds.php index 1b86edd..dd7b323 100644 --- a/inc/mdEmbeds.php +++ b/inc/mdEmbeds.php @@ -155,7 +155,7 @@ function drawObjectDetails(array $contents, array $settings):string { foreach ($contents['object_images'] as $image) { if ($image['is_main'] != "j") continue; $output .= ' - '; + '; } } @@ -329,7 +329,7 @@ function drawInstitutionDetails(array $contents, array $settings):string { if (isset($contents['institution_image']) and $contents['institution_image']) { $output .= ' - '; + '; } $output .= ' @@ -456,7 +456,7 @@ function drawCollectionDetails(array $contents, array $settings):string { if (isset($contents['collection_image']) and $contents['collection_image']) { $output .= ' - '; + '; } $output .= ' @@ -566,7 +566,7 @@ function drawExhibitionDetails(array $contents, array $settings):string { if (isset($contents['image']) and $contents['image']) { $output .= ' - '; + '; } $output .= ' @@ -722,7 +722,7 @@ function drawEventDetails(array $contents, array $settings):string { if (isset($contents['image']) and $contents['image']) { $output .= ' - '; + '; } $output .= ' diff --git a/inc/search.php b/inc/search.php index 9b679c9..f485c9b 100644 --- a/inc/search.php +++ b/inc/search.php @@ -40,7 +40,7 @@ function searchInPages(string $searchTerm):array { } - usort($results, function($a, $b) { + uasort($results, function($a, $b) { if ($a['priority'] == $b['priority']) return 0; return ($a['priority'] > $b['priority']) ? -1 : 1; }); diff --git a/themes/default/mdEmbeds.css b/themes/default/mdEmbeds.css index 3eb715b..eb43279 100644 --- a/themes/default/mdEmbeds.css +++ b/themes/default/mdEmbeds.css @@ -52,8 +52,7 @@ div.objDetails { } div.objDetails dt { font-weight: bold; margin-top: .5em; } div.objDetails dd { margin-left: 0; padding-left: 0; } div.objDetails .objMainImg { max-width: 200px; margin: .5em 1em 1em 0; float: left; - border: 1px solid #D6D6D6; transition: max-width .4s; } -div.objDetails .objMainImg:hover { max-width: 100vw; max-height: 80vh; float: initial; } + border: 1px solid #D6D6D6; } .metadataLine { margin-top: 2.5em; color: #666; border-top: 1px solid #D6D6D6; } .metadataLine > span { margin-right: 2em; font-size: .95em; font-style: italic; }