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. An optional photo grounds the countdown block, under a veil of its colour, in the themes that fill it.

Live card

This card is drawn in your browser by the same code the Players run, with sample data.

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

Data and privacy

This card uses its configured properties and live card data.

Properties

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

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"Happy hour"maxLength: 30
imagestring""maxLength: 200A project media reference (media:<id>): a photo that grounds the filled countdown block while a window is on, under a veil of the block's colour. Themes that set the countdown on the page draw it plain. Empty leaves the block plain.
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.

Example params

{
  "theme": "neomustard"
}
screenrig card create --type happy-hour --major 1 --file params.json --context-file context.md

Example data

{
  "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"
    }
  ]
}

Layouts

This fullscreen card fills the whole screen in landscape or portrait and is not placed as a corner, chip, or strip.

Layouts: full. Forms: landscape, portrait.

Use this card

Add this card to a playlist as in Publish a card canvas, place it with the layouts and anchors and update its data as in Write live values.