@orbis-cascade/primo-explore-login-backgrounds

1.1.0 • Public • Published

primo-explore-login-backgrounds

Build Status npm

Features

Full-screen background images appear on the standalone login page when a user navigates to /primo-explore/login. Images can be included with the view package in a login subfolder and enumerated in a config option. A new image is randomly chosen from the configured options each time the page is visited.

Screenshot

screenshot

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
  1. If you do not already have a package.json file in this directory, create one:
npm init -y
  1. Install this package:
npm install primo-explore-login-backgrounds --save-dev

Usage

Once this package is installed, add loginBackgrounds as a dependency for your custom module definition.

var app = angular.module('viewCustom', ['loginBackgrounds'])

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

import 'primo-explore-login-backgrounds';

You can set up the images by adding them to a new folder login inside the img directory of your view package. When you have finished adding images, you can add a configuration block like the one below listing the ones you wish to make available.

Example

The example below adds three images, one of which will be randomly chosen each time a user logs in. We assume lib1.jpg, lib2.jpg, and lib3.jpg all reside in MY_VIEW/img/login.

app.constant('loginImages', [
  'lib1.jpg',
  'lib2.jpg',
  'lib3.jpg'
])

Running tests

  1. Clone the repo
  2. Run npm install
  3. Run npm test

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @orbis-cascade/primo-explore-login-backgrounds

      Weekly Downloads

      0

      Version

      1.1.0

      License

      MIT

      Unpacked Size

      929 kB

      Total Files

      7

      Last publish

      Collaborators

      • kveldhui
      • eoulib
      • bryan_v
      • budak
      • jeremy2443