export default { setup() { const { ref, computed } = Vue; const recipes = ref(null); fetch("https://hub.xpub.nl/soupboat/cookbook/get") .then((res) => res.json()) .then((data) => (recipes.value = data)); const style = function (index) { return { transform: `translate(${index * 10}px, ${index * 10}px)`, }; }; const browse = function () { let recipe = recipes.value.pop(); recipes.value.unshift(recipe); }; return { recipes, style, browse }; }, template: `

{{recipe.title}}

{{recipe.description}}
It works with {{recipe.nature}}
Steps:
  1. {{log}}

from {{recipe.who}}

`, };