Happy hour card

Weekly happy-hour windows with a countdown: the specials at their happy price while one is on, and when the next one starts.

Category: Food and drink. Tags: Bars and pubs, Restaurants and cafes, Prices and rates, Countdowns and timers.

Previews

Happy hour
Canvas
Happy hour
Corner
Happy hour
Chip

Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

Card views, themes and publishing. Browse the gallery.

Data and privacy

This card uses its configured properties and live card data.

Properties

For theme, background, accent and position, see Common properties.

Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"Happy hour"maxLength: 30
currencystring"$"maxLength: 3
decimalsnumber, string"auto""auto", 0, 1, 2
hour12booleantrue
pageSecondsnumber10minimum: 5; maximum: 120
footnotestring""maxLength: 120A line along the foot, for example Dine-in only.
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
windowsarray[{"days":["weekdays"],"start":"16:00","end":"18:00"},{"days":["fri","sat"],"start":"22:00","end":"00:00","label":"Late"}]maxItems: 8The weekly windows.
windows[].daysarraymaxItems: 7mon to sun, or weekdays, weekends, daily.
windows[].startstringmaxLength: 5; RequiredHH:MM, 24-hour, in the screen's zone.
windows[].endstringmaxLength: 5; RequiredHH:MM; an end before the start runs past midnight.
windows[].labelstringmaxLength: 24
specialsarray[{"name":"House lager, pint","price":5,"was":8,"note":"Draught, 20 oz"},{"name":"Well cocktails","price":7,"was":11,"note":"Rum, vodka, gin or whisky"},{"name":"Glass of house red or white","price":6,"was":10},{"name":"Chicken wings, six","price":9,"was":14,"note":"Hot, honey garlic or dry rub","badge":"Popular"},{"name":"Loaded nachos","price":10,"was":15,"note":"Share between two"}]maxItems: 24What is on special, at the happy price.
specials[].namestringminLength: 1; maxLength: 120; Required
specials[].notestringmaxLength: 160
specials[].badgestringmaxLength: 16
specials[].pricenumber, nullminimum: 0The happy-hour price.
specials[].wasnumber, nullminimum: 0The regular price, struck through.
specials[].priceLabelstringmaxLength: 16Replaces the price, for example 2 for 10.

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "happy-hour",
  "primitive": "card",
  "card": "happy-hour",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "happy-hour-main"
}

Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.

curl --request PUT "https://api.screenrig.ai/api/card-data/happy-hour-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"windows":[{"days":["weekdays"],"start":"16:00","end":"18:00"},{"days":["fri","sat"],"start":"22:00","end":"00:00","label":"Late"}],"specials":[{"name":"House lager, pint","price":5,"was":8,"note":"Draught, 20 oz"},{"name":"Well cocktails","price":7,"was":11,"note":"Rum, vodka, gin or whisky"},{"name":"Glass of house red or white","price":6,"was":10},{"name":"Chicken wings, six","price":9,"was":14,"note":"Hot, honey garlic or dry rub","badge":"Popular"},{"name":"Loaded nachos","price":10,"was":15,"note":"Share between two"}]}}'