@wsdot/go-orange
v1.0.0
Published
Determines if a website should be using "Go Orange" theming for National Work Zone Awareness Week (NWZAW).
Downloads
2
Readme
"Go Orange" detection
Determines if a date falls within National Work Zone Awareness Week (NWZAW).
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!");
}
}