component-headerbite-vuejs v1.0.16
Component Headerbite Vuejs
Vue Headerbite Template Component
Synopsis
To deliver heading component providing location and day
Code Examples
Install:
npm install component-headerbite-vuejs --saveUsage:
Vue.use(Headerbite, options);or within existing components:
import Headerbite from 'component-headerbite-vuejs';
export default {
components: {
Headerbite
}
}Installation
Install dependencies:
npm installCopy .env.example to create .env:
cp .env.example .envCopy config files over:
cp ./src/config/build.js ./src/config/development.jsServe with hot reload at localhost:8080 (default):
npm run devBuild for production with minification:
npm run buildDocumentation
Properties
| Name | Type | Description |
|---|---|---|
| venueType | String | Type of venue (Options: Mall, Movie Theatre, Campus, Airpot, Bikepath) |
| venueName | String | Name for given venue |
| address | String | Street address |
| dma | Number | The DMA of a given location |
| stationary | String | Gives priority of address over other properties true |
| showTitle | Boolean | Options to display or hide title true |
Displaying Options
Venue
- Image. With the
venueTypeset it will display the background image of the given venue (Options listed above).venueTypetakes priority over all other properties - Heading.
venueNameis set it will display its contents above the date. IfvenueNameis not set it will fallback to theaddress
DMA
- Image. With the
dmaset it will display the background image of the given DMA (Only supported for the following DMAs: 501, 504, 506, 511, 514, 602, 803, 807). If DMA is provided that is not in the list a fallback image will be displayed - Heading Will display the name of the
dma. Ifstationaryis set totrue, then the address will be set instead of the DMA. (If address is set)
Address
- Image. With the
addressset and no other options the fallback image will be used. - Heading The
addresswill be set if no other options are used.
*Note: If no options are set the fallback image will be used and only the date will be displayed
Test
All widgets should have unit tests associated with them. To run all tests
npm testFor developments test with hot reloading at localhost:3001
npm run test:devTo run tests with coveralls support:
npm run test:coverallsStyle Guide
All project should follow JS Style guide. Style guide is a modified version of airbnb, and should be referenced during development. Any modified rules can be found in .eslintc.json file.
To run eslint:
npm run lintTo fix eslint errors:
npm run lint:fix