1.0.2 • Published 7 years ago

primo-explore-clickable-logo v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

primo-explore-clickable-logo

Features

The library's logo in the top bar becomes a clickable link that returns the user to the "new search" page. You can optionally pass an image to be used to replace the logo on smaller screens, when there is less available space in the top bar.

Install

  1. Make sure you've installed and configured primo-explore-devenv.
  2. Navigate to your template/central package root directory. For example:
    cd primo-explore/custom/MY_VIEW_ID
  3. If you do not already have a package.json file in this directory, create one:
    npm init -y
  4. Install this package:
    npm install primo-explore-clickable-logo --save-dev

Usage

Once this package is installed, add clickableLogo as a dependency for your custom module definition. You can optionally pass a link to an image to be used on smaller screens.

var app = angular.module('viewCustom', ['clickableLogo'])
app.value('libraryLogoSmall', 'custom/MY_VIEW_ID/img/library-logo-small.png')

Note: If you're using the --browserify build option, you will need to first import the module with:

import 'primo-explore-clickable-logo';

Finally, add these lines to your custom.css:

prm-logo div.product-logo {
  display: none;
}

prm-logo div.product-logo-local {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}