Made main images of detail pages be in a link, that leads to the image file.
Fixed error in search.
This commit is contained in:
parent
4e06d0bae7
commit
04a7dbc112
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
|||
/data
|
||||
/files
|
||||
/new
|
||||
*.swp
|
||||
|
|
|
@ -155,7 +155,7 @@ function drawObjectDetails(array $contents, array $settings):string {
|
|||
foreach ($contents['object_images'] as $image) {
|
||||
if ($image['is_main'] != "j") continue;
|
||||
$output .= '
|
||||
<img class="objMainImg" src="' . $settings['mdImgFolder'] . $image['folder'] . '/' . $image['filename_loc'] . '" />';
|
||||
<a href="' . $settings['mdImgFolder'] . $image['folder'] . '/' . $image['filename_loc'] . '"><img class="objMainImg" src="' . $settings['mdImgFolder'] . $image['folder'] . '/' . $image['filename_loc'] . '" /></a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,7 @@ function drawInstitutionDetails(array $contents, array $settings):string {
|
|||
|
||||
if (isset($contents['institution_image']) and $contents['institution_image']) {
|
||||
$output .= '
|
||||
<img class="objMainImg" src="' . $settings['mdImgFolder'] . $contents['institution_image'] . '" />';
|
||||
<a href="' . $settings['mdImgFolder'] . $contents['institution_image'] . '"><img class="objMainImg" src="' . $settings['mdImgFolder'] . $contents['institution_image'] . '" /></a>';
|
||||
}
|
||||
|
||||
$output .= '
|
||||
|
@ -456,7 +456,7 @@ function drawCollectionDetails(array $contents, array $settings):string {
|
|||
|
||||
if (isset($contents['collection_image']) and $contents['collection_image']) {
|
||||
$output .= '
|
||||
<img class="objMainImg" src="' . $settings['mdImgFolder'] . $contents['collection_image'] . '" />';
|
||||
<a href="' . $settings['mdImgFolder'] . $contents['collection_image'] . '"><img class="objMainImg" src="' . $settings['mdImgFolder'] . $contents['collection_image'] . '" /></a>';
|
||||
}
|
||||
|
||||
$output .= '
|
||||
|
@ -566,7 +566,7 @@ function drawExhibitionDetails(array $contents, array $settings):string {
|
|||
|
||||
if (isset($contents['image']) and $contents['image']) {
|
||||
$output .= '
|
||||
<img class="objMainImg" src="' . $settings['mdVersion'] . $contents['image'] . '" />';
|
||||
<a href="' . $settings['mdVersion'] . $contents['image'] . '"><img class="objMainImg" src="' . $settings['mdVersion'] . $contents['image'] . '" /></a>';
|
||||
}
|
||||
|
||||
$output .= '
|
||||
|
@ -722,7 +722,7 @@ function drawEventDetails(array $contents, array $settings):string {
|
|||
|
||||
if (isset($contents['image']) and $contents['image']) {
|
||||
$output .= '
|
||||
<img class="objMainImg" src="' . $settings['mdVersion'] . $contents['image'] . '" />';
|
||||
<a href="' . $settings['mdVersion'] . $contents['image'] . '"><img class="objMainImg" src="' . $settings['mdVersion'] . $contents['image'] . '" /></a>';
|
||||
}
|
||||
|
||||
$output .= '
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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; }
|
||||
|
|
Reference in New Issue
Block a user