School lunch card

Today's school meal with allergen marks, and the days ahead: the main dish big, the sides listed, a key for the marks.

Category: Food and drink. Tags: Schools and campuses, Restaurants and cafes.

Previews

School lunch
Canvas
School lunch
Corner
School lunch
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

Feed: screenrig.lunch/v1.

Feed documents carry source attribution. The Player supplies the feed to the card.

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""maxLength: 40Empty reads School lunch (School breakfast, School snack).
schoolstring""maxLength: 60Shown beside the title. A feed's school name fills it when empty.
mealstring"lunch""breakfast", "lunch", "snack"
countinteger4minimum: 1; maximum: 6Days listed after the featured day.
showAllergensbooleantrueAllergen and diet marks and their key.
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
daysarray[]minItems: 0; maxItems: 31The menu by day. A feed (screenrig.lunch/v1) wins when present; the data store supplies the same rows otherwise.
days[].datestringmaxLength: 10; RequiredYYYY-MM-DD in the screen's zone.
days[].closedbooleanfalseNo meal this day (holiday, no school).
days[].notestringmaxLength: 80Shown on the day: Pizza day, or why there is no school.
days[].itemsarraymaxItems: 12The meal in order; the first item is the main dish.
days[].items[].namestringminLength: 1; maxLength: 60; Required
days[].items[].allergensarraymaxItems: 10milk, egg, fish, shellfish, tree nuts, peanuts, wheat, soy, sesame. Each shows as a two-letter mark.
days[].items[].dietstring"vegetarian", "vegan"Shows a V or VG mark.
days[].mealsarraymaxItems: 4A feed's meals for the day; the card's meal picks one. Without meals the day's items are used.
days[].meals[].kindstring"breakfast", "lunch", "snack"; Required
days[].meals[].itemsarraymaxItems: 12; Required
days[].meals[].items[].namestringminLength: 1; maxLength: 60; Required
days[].meals[].items[].allergensarraymaxItems: 10milk, egg, fish, shellfish, tree nuts, peanuts, wheat, soy, sesame. Each shows as a two-letter mark.
days[].meals[].items[].dietstring"vegetarian", "vegan"Shows a V or VG mark.

Canvas example

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

{
  "id": "school-lunch",
  "primitive": "card",
  "card": "school-lunch",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "school-lunch-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/school-lunch-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"days":[]}}'