Compare commits
No commits in common. "adfea2e9e31f7242b5745378a404d372a904bd54" and "557750607616bba9610f23467327b69f4bed27d8" have entirely different histories.
adfea2e9e3
...
5577506076
@ -1,97 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = new Collection({
|
|
||||||
"createRule": null,
|
|
||||||
"deleteRule": null,
|
|
||||||
"fields": [
|
|
||||||
{
|
|
||||||
"autogeneratePattern": "[a-z0-9]{15}",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text3208210256",
|
|
||||||
"max": 15,
|
|
||||||
"min": 15,
|
|
||||||
"name": "id",
|
|
||||||
"pattern": "^[a-z0-9]+$",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": true,
|
|
||||||
"required": true,
|
|
||||||
"system": true,
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text1579384326",
|
|
||||||
"max": 0,
|
|
||||||
"min": 0,
|
|
||||||
"name": "name",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hidden": false,
|
|
||||||
"id": "number2683508278",
|
|
||||||
"max": null,
|
|
||||||
"min": null,
|
|
||||||
"name": "quantity",
|
|
||||||
"onlyInt": false,
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"autogeneratePattern": "",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "text3703245907",
|
|
||||||
"max": 0,
|
|
||||||
"min": 0,
|
|
||||||
"name": "unit",
|
|
||||||
"pattern": "",
|
|
||||||
"presentable": false,
|
|
||||||
"primaryKey": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hidden": false,
|
|
||||||
"id": "autodate2990389176",
|
|
||||||
"name": "created",
|
|
||||||
"onCreate": true,
|
|
||||||
"onUpdate": false,
|
|
||||||
"presentable": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "autodate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hidden": false,
|
|
||||||
"id": "autodate3332085495",
|
|
||||||
"name": "updated",
|
|
||||||
"onCreate": true,
|
|
||||||
"onUpdate": true,
|
|
||||||
"presentable": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "autodate"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"id": "pbc_3146854971",
|
|
||||||
"indexes": [],
|
|
||||||
"listRule": null,
|
|
||||||
"name": "ingredients",
|
|
||||||
"system": false,
|
|
||||||
"type": "base",
|
|
||||||
"updateRule": null,
|
|
||||||
"viewRule": null
|
|
||||||
});
|
|
||||||
|
|
||||||
return app.save(collection);
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_3146854971");
|
|
||||||
|
|
||||||
return app.delete(collection);
|
|
||||||
})
|
|
@ -1,28 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_842702175")
|
|
||||||
|
|
||||||
// add field
|
|
||||||
collection.fields.addAt(8, new Field({
|
|
||||||
"cascadeDelete": false,
|
|
||||||
"collectionId": "pbc_3146854971",
|
|
||||||
"hidden": false,
|
|
||||||
"id": "relation1264587087",
|
|
||||||
"maxSelect": 999,
|
|
||||||
"minSelect": 0,
|
|
||||||
"name": "ingredients",
|
|
||||||
"presentable": false,
|
|
||||||
"required": false,
|
|
||||||
"system": false,
|
|
||||||
"type": "relation"
|
|
||||||
}))
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_842702175")
|
|
||||||
|
|
||||||
// remove field
|
|
||||||
collection.fields.removeById("relation1264587087")
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
@ -1,28 +0,0 @@
|
|||||||
/// <reference path="../pb_data/types.d.ts" />
|
|
||||||
migrate((app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_3146854971")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"createRule": "",
|
|
||||||
"deleteRule": "",
|
|
||||||
"listRule": "",
|
|
||||||
"updateRule": "",
|
|
||||||
"viewRule": ""
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
}, (app) => {
|
|
||||||
const collection = app.findCollectionByNameOrId("pbc_3146854971")
|
|
||||||
|
|
||||||
// update collection data
|
|
||||||
unmarshal({
|
|
||||||
"createRule": null,
|
|
||||||
"deleteRule": null,
|
|
||||||
"listRule": null,
|
|
||||||
"updateRule": null,
|
|
||||||
"viewRule": null
|
|
||||||
}, collection)
|
|
||||||
|
|
||||||
return app.save(collection)
|
|
||||||
})
|
|
@ -49,9 +49,9 @@ const links = await Promise.all(
|
|||||||
<!-- Hidden element to pass server data to client -->
|
<!-- Hidden element to pass server data to client -->
|
||||||
<div class="hidden" id="carousel-data">{JSON.stringify(links)}</div>
|
<div class="hidden" id="carousel-data">{JSON.stringify(links)}</div>
|
||||||
|
|
||||||
<div class="relative flex items-center w-full md:w-80 h-60">
|
<div class="relative flex items-center w-70 h-60">
|
||||||
<button id="dec-button" class="absolute left-2" onclick="dec()">PREV</button>
|
<button id="dec-button" class="absolute left-2" onclick="dec()">PREV</button>
|
||||||
<img id="carousel-img" class="w-full h-full object-cover" src={links[0]} />
|
<img id="carousel-img" class="w-full h-full object-contain" src={links[0]} />
|
||||||
<!-- <div class="w-70 h-60 bg-green-600" /> -->
|
<!-- <div class="w-70 h-60 bg-green-600" /> -->
|
||||||
<button id="inc-button" class="absolute right-2" onclick="inc()">NEXT</button>
|
<button id="inc-button" class="absolute right-2" onclick="inc()">NEXT</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,7 @@ const recipies = await client.collection("recipes").getFullList()
|
|||||||
<PageLayout>
|
<PageLayout>
|
||||||
<!-- <p class="pb-2">What would you like today?</p> -->
|
<!-- <p class="pb-2">What would you like today?</p> -->
|
||||||
|
|
||||||
<div class="grid md:gap-2 gap-3 grid-cols-2 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-8">
|
<div class="grid md:gap-2 gap-3 grid-cols-2 md:grid-cols-2 lg:grid-cols-4">
|
||||||
{
|
{
|
||||||
recipies.map(r => (
|
recipies.map(r => (
|
||||||
<OverviewCard recipe={r} />
|
<OverviewCard recipe={r} />
|
||||||
|
@ -15,36 +15,16 @@ const steps = await Promise.all(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
const ingredients = await Promise.all(
|
|
||||||
re.ingredients.map(async s =>
|
|
||||||
await client.collection("ingredients").getOne(s)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout>
|
<SiteLayout>
|
||||||
<div class="flex flex-col">
|
<div class="flex">
|
||||||
<div class="flex flex-col md:flex-row">
|
<ImageCarousel recipe={re} />
|
||||||
<ImageCarousel recipe={re} />
|
|
||||||
<!-- Title -->
|
<div class="flex flex-col pl-4">
|
||||||
<p class=" text-[28pt] font-bold md:pl-5">{re.name}</p>
|
<p class=" text-[28pt] font-bold">{re.name}</p>
|
||||||
|
|
||||||
|
{steps.map(a => (<p>{a.instruction}</p>))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Ingredients -->
|
|
||||||
<div class="bg-[#2a2b2c] rounded-lg md:w-80 md:mt-4 grid grid-cols-3 px-4 text-center">
|
|
||||||
<span class="font-bold">Quantity</span>
|
|
||||||
<span class="font-bold">Unit</span>
|
|
||||||
<span class="font-bold">Food</span>
|
|
||||||
|
|
||||||
{
|
|
||||||
ingredients.map(ing => (
|
|
||||||
<span>{ing.quantity}</span>
|
|
||||||
<span>{ing.unit}</span>
|
|
||||||
<span>{ing.name}</span>
|
|
||||||
))
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</SiteLayout>
|
</SiteLayout>
|
Loading…
x
Reference in New Issue
Block a user