Skip to content

Determines if a website should be using "Go Orange" theming.

License

Notifications You must be signed in to change notification settings

WSDOT-GIS/go-orange

Repository files navigation

"Go Orange" detection

Determines if a date falls within National Work Zone Awareness Week (NWZAW).

Node.js CI npm npm

Usage

Installation

npm install @wsdot/go-orange

Use

import {
  isWorkZoneAwarenessMonth,
  isWorkZoneAwarenessWeek,
} from "@wsdot/go-orange";

const today = new Date();
const isGoOrangeMonth = isWorkZoneAwarenessMonth(today);
const isNWZAWeek = isWorkZoneAwarenessWeek(today);

if (isGoOrangeMonth) {
  // Import the specific Go Orange CSS or whatever customizations you need to do.
  if (isNWZAWeek) {
    alert("It's National Work Zone Awareness Week!");
  }
}

About

Determines if a website should be using "Go Orange" theming.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published