Collection discovery

js, CSS

Example; all changes in collection discovery can take a while to show up.

js

Add author name and date (example), via Laura Percival and Jens Weber.

/* Javascript: */
app.component(‘prmGalleryItemAfter’, {
bindings: {
parentCtrl: ‘<‘
},
controller: function () {
var $ctrl = this;
$ctrl.$onInit = function () {
try {
$ctrl.author = $ctrl.parentCtrl.item.pnx.addata.au[0];
} catch (e) {
$ctrl.author = ”;
}
try {
$ctrl.date = $ctrl.parentCtrl.item.pnx.display.creationdate[0];
} catch (e) {
$ctrl.date = ”;
}
$ctrl.hasDate = !!$ctrl.date;
$ctrl.hasAuthor = !!$ctrl.author;
};
},
template: `
<div ng-if=”$ctrl.hasDate”>{{$ctrl.date}}</div>
<div ng-if=”$ctrl.hasAuthor”>{{$ctrl.author}}</div>
`,
});


CSS

For more CSS for collection discovery see SUNY’s FAQ page.

/* Make font white. */

.collection-info {
color: #FFF !important;
}

/* Top banner */

.prm-explore-main .header .transparent-top-bar div, prm-explore-main .header, prm-explore-main .header .transparent-top-bar:before, prm-search-bookmark-filter .md-button {
background-color: #FFFFFF ;
color: #000000;
}

/* Suppress subtitle “All collections” */
Configuration – Discovery – Labels – Collection Discovery Labels –
set nui.colldiscovery.lobby.description to NOT_DEFINED

/* Collection wrapper – background still visible after opening full title display */

md-backdrop.md-opaque {
background-color: #444 !important;
opacity: 0.9;
}

/* Fix styling of the breadcrumbs – also visible in the full title display */

prm-collection-navigation-breadcrumbs-item .md-button.button-as-link.link-alt-color {
box-shadow: none;
color: #14413C !important;
background: #F9F9F9 !important;
line-height: 24px;
}
 
prm-collection-navigation-breadcrumbs-item .md-button.button-as-link.link-alt-color:hover {
color: #14413c !important;
background: #F9F9F9 !important;
line-height: 24px;
}

/* Display of author and year */

prm-gallery-item-after {
    padding: 20px 15px;
    display: block;
    margin-top: -30px;
}   
prm-gallery-item-after div {
    margin-bottom: -40px;
    margin-top: -20px;
}
.is-grid-view prm-gallery-item .collection-element {
    padding: 15px;
}
prm-gallery-item .collection-element .item-title {
   padding-bottom: 30px;
}

8.5.2023