41. Exercise 11

Stepping back from the individual recipes, let’s make an overview page.

Each recipe has a category. The “endpoint”2 http://localhost:9000/recipes/categories.json returns a JSON payload that identifies each recipe by category:

{
  "main": ["beef-stroganof.html", "mac-n-cheese.html",
           "marys-beef-stew.html", "pizza.html"],
  "side": ["rice-a-roni.html"],
  "candy": ["treacle-taffy.html"]
}

Write a stylesheet that will retrieve this document and let the user navigate between categories and recipes.