Skip to content

🎨 adds background images to primo-explore's standalone login screen.

License

Notifications You must be signed in to change notification settings

alliance-pcsg/primo-explore-login-backgrounds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🎨 adds background images to primo-explore's standalone login screen.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published