logo

Grimgrains

Unnamed repository; edit this file 'description' to name the repository.
commit: d5a3d9a6efba9323a8d5b329d9dc5f51557d689c
parent ed08c9177f4c29d8e89a6014c48719c4d54d511f
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Thu,  8 Mar 2018 15:21:47 +1300

Restructure

Diffstat:

Mscripts/graph.js20++++++++++----------
Mscripts/nodes/template.js4++--
Mscripts/templates/ingredient.js4++--
3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/scripts/graph.js b/scripts/graph.js @@ -20,18 +20,18 @@ function graph() Ø("view").mesh({x:32,y:0},[ - Ø("main").create({x:2,y:2},DomNode), + Ø("body").create({x:2,y:2},DomNode), Ø("header").create({x:2,y:8},DomNode), Ø("logo").create({x:2,y:14},DomNode), - Ø("search").create({x:6,y:14},DomNode), - Ø("menu").create({x:10,y:14},DomNode), + Ø("search").create({x:5,y:14},DomNode), + Ø("menu").create({x:8,y:14},DomNode), - Ø("body").create({x:14,y:8},DomNode), - Ø("core").create({x:14,y:14},DomNode), - Ø("related").create({x:17,y:14},DomNode), + Ø("core").create({x:11,y:8},DomNode), + Ø("content").create({x:11,y:14},DomNode), + Ø("related").create({x:14,y:14},DomNode), - Ø("footer").create({x:10,y:8},DomNode), + Ø("footer").create({x:8,y:8},DomNode), ]) // Model @@ -41,9 +41,9 @@ function graph() // Assoc Ø("template").syphon(["recipe","ingredient","page"]) - Ø("template").connect("main") - Ø("main").bind(["header","body","footer"]) - Ø("body").bind(["core","related"]) + Ø("template").connect("body") + Ø("body").bind(["header","core","footer"]) + Ø("core").bind(["content","related"]) Ø("header").bind(["logo","search","menu"]) Ø("query").connect("router") diff --git a/scripts/nodes/template.js b/scripts/nodes/template.js @@ -11,9 +11,9 @@ function TemplateNode(id,rect) // Select the right signal var assoc = this.signal(q.type.slice(0, -1)); - this.send({main:assoc.answer(q)}) + this.send({body:assoc.answer(q)}) // // Install Dom - this.signal("main").request() + this.signal("body").request() } } \ No newline at end of file diff --git a/scripts/templates/ingredient.js b/scripts/templates/ingredient.js @@ -14,8 +14,8 @@ function IngredientTemplate(id,rect) header:{ search: t.name.capitalize() }, - body: { - core: ingredient.DESC, + core: { + content: ingredient.DESC, related:{ related_recipes:related_recipes(t.name,t.tables.recipes), related_ingredients:related_ingredients(t.name,ingredient.TAGS[0],sort(t.tables.ingredients))