Live card
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
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
title | string | "Happy hour" | maxLength: 30 | |
image | string | "" | maxLength: 200 | A 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. |
currency | string | "$" | maxLength: 3 | |
decimals | number, string | "auto" | "auto", 0, 1, 2 | |
hour12 | boolean | true | ||
pageSeconds | number | 10 | minimum: 5; maximum: 120 | |
footnote | string | "" | maxLength: 120 | A line along the foot, for example Dine-in only. |
timeZone | string, null | null |
Dynamic properties
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
windows | array | [{"days":["weekdays"],"start":"16:00","end":"18:00"},{"days":["fri","sat"],"start":"22:00","end":"00:00","label":"Late"}] | maxItems: 8 | The weekly windows. |
windows[].days | array | maxItems: 7 | mon to sun, or weekdays, weekends, daily. | |
windows[].start | string | maxLength: 5; Required | HH:MM, 24-hour, in the screen's zone. | |
windows[].end | string | maxLength: 5; Required | HH:MM; an end before the start runs past midnight. | |
windows[].label | string | maxLength: 24 | ||
specials | array | [{"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: 24 | What is on special, at the happy price. |
specials[].name | string | minLength: 1; maxLength: 120; Required | ||
specials[].note | string | maxLength: 160 | ||
specials[].badge | string | maxLength: 16 | ||
specials[].price | number, null | minimum: 0 | The happy-hour price. | |
specials[].was | number, null | minimum: 0 | The regular price, struck through. | |
specials[].priceLabel | string | maxLength: 16 | Replaces 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.