# season-js

> Customize your logo and carousel based on the current season

Latest version **1.0.2** (published 2019-08-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install season-js
pnpm add season-js
yarn add season-js
bun add season-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-08-29 |
| First published | 2019-08-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lydia Gashawtena |
| Maintainers | lydiag |

## Links

- npm: https://www.npmjs.com/package/season-js
- Repository: http://git.gebeya.com/lydiagashawtena/season-js
- npm.io page: https://npm.io/package/season-js

## Recent versions

- 1.0.2 (latest) — 2019-08-29
- 1.0.1 — 2019-08-27
- 1.0.0 — 2019-08-27

## README

# SeasonJs

A Javascript library that provides logo decorations and images for carousels based on the current holiday season.

## Installation

`npm i season-js`

## Dependencies

- **Jimp(JavaScript Image Manipulation Program)**: This library is used for editing the images. Include the following script tag before including the season-js script tag.
<br>
 `<script src="https://unpkg.com/jimp@0.5.6/browser/lib/jimp.js"></script>`


## Usage

- Include the season-js script tag in your page: 
<br>
`<script src="vendor/season-js/season-js.js"></script>`

- Initialize SeasonJs with the package location and set the holiday type(ethiopian, international):
<br>
`var seasonJs = new SeasonJs("vendor/");
seasonJs.setHolidayType(<HOLIDAY TYPE>);
`

- Initialize SeasonLogo with the id of the img tag that contains the logo, set the decoration position(top, bottom) and call replaceLogo:
<br>
`var seasonLogo = seasonJs.seasonLogo(<ID>);
seasonLogo.setDecorationPosition(<DECORATION POSITION>);
seasonLogo.replaceLogo();
`

- Initialize SeasonCarousel with the id of the img that contains the image of one of the carousels and call replaceLogo:
<br>
`var seasonCarousel = seasonJs.seasonCarousel(<ID>);
seasonCarousel.replaceCarousel();
`

### Example Usage

```
<script src="https://unpkg.com/jimp@0.5.6/browser/lib/jimp.js"></script>
<script src="vendor/season-js/season-js.js"></script>
<script>
    var seasonJs = new SeasonJs("vendor/");
    seasonJs.setHolidayType("ethiopian");

    var seasonLogo = seasonJs.seasonLogo("logo");
    seasonLogo.setDecorationPosition("bottom");
    seasonLogo.replaceLogo();

    var seasonCarousel = seasonJs.seasonCarousel("carousel-1");
    seasonCarousel.replaceCarousel();
</script>
```

---
_Source: https://npm.io/package/season-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
