/KB-Primo-VE

Primary LanguageCSSMIT LicenseMIT

KB-Primo-VE

A Primo customization package by Royal Danish Library.

Target Primo ve

The following instructions are intended for Unix-like operating systems.

Installation

Building the package from primo-explore-devenv

Alternative to 'npm run start' from view folder (root of this repository) is to navigate into the root directory (primo-explore-devenv), and run the following command.

 gulp run --view VIEWNAME --ve --browserify

Use labels instead of hardcoding a text or link

There is a possibility in the Alma, Discovery/labels, which is to define labels and their translations and separate them from the code. If you need to use a text or link in the code, find or create a label in a code table (fulldisplay table has been normally used). For at use a label in the code there is two ways:

  1. To use translate filter, which uses the translated text in the exact place as the label: href="{{'fulldisplay.newUser.link' | translate}}" which results in href="XXX"
  2. To use translate attribute, which adds the translated text to the tag as the text value: <a translate="fulldisplay.homepage.card1.link3.label"></a> which results in <a translate="fulldisplay.homepage.card1.link3.label">XXX</a> There is a list of our custom labels her: https://sbprojects.statsbiblioteket.dk/pages/viewpage.action?spaceKey=ATD&title=Primo+customization+tekster+og+links

CSS preprocessing

We utilize SASS (with the SCSS syntax) for CSS preprocessing. SASS files are located under css/sass. To start CSS preproccessing, run the following command in view folder (root of this repository).

 npm run sass

Note: Preprocessing is not a requirement for building the package, and would only be needed when the stylesheets are modified. Also, the resulting CSS file should not be modified directly, as the modifications would be overwritten when CSS preprocessing is performed.

KB-Primo-VE additional packages

Announcement service: Displays a message on the top of the screen, every time there is a new text (other than &nbsp;) in the nui.message.announcement code table, if it hasn't already been dismissed by user. If you are only interested in this functionality, use the following repository: https://github.com/Det-Kongelige-Bibliotek/KB-Primo-VE-Announcement

LibChat service: includes a chat service, provided by libanswers/ springshare, onto the user interface (all pages). If you are only interested in this functionality, use the following repository: https://github.com/Det-Kongelige-Bibliotek/KB-Primo-VE-libChat

License

This software is released under the MIT License.