logo

Grimgrains

Unnamed repository; edit this file 'description' to name the repository.
commit: f5a5c7b6425cb6c031c3a92d6940ce4d09697567
parent 86d3341f4b5298fb4dedf289d097226913e4ffc3
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Thu,  8 Mar 2018 20:04:26 +1300

Progress on related recipes

Diffstat:

Mlinks/main.css15++++++++-------
Mscripts/database/recipes.js2+-
Mscripts/nodes/dom.js7+------
Mscripts/templates/ingredient.js5+----
Mscripts/templates/recipe.js5+++--
5 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/links/main.css b/links/main.css @@ -15,22 +15,23 @@ h1,h2,h3,h4 { font-weight: normal; font-family: 'alte_haas_grotesk_bold'; margin #view #core { margin-bottom:30px; } -#view #core #content { position: relative; z-index: 100 } +#view #core #content { position: relative; z-index: 100; margin-bottom:45px; } #view #core #content h1 { text-transform: capitalize; font-size:36px; } #view #core #content h2 { text-transform: capitalize; font-size:28px; } -#view #core #content h2 { text-transform: capitalize; font-size:24px; } +#view #core #content h3 { text-transform: capitalize; font-size:24px; border-bottom:2px solid black; line-height: 45px } #view #core #content p { font-size:18px; margin-bottom: 30px; max-width:600px; } #view #core #content img { margin-bottom: 30px; border-radius: 2px } -#view #core #content list.ingredients { padding-left:20px; margin-bottom: 60px } -#view #core #content list.ingredients ln.ingredient { width:100px; display: block; float:left; margin-left:-10px;text-align:center } +#view #core #content list.ingredients { display: inline-block; margin-right:15px; } +#view #core #content list.ingredients ln.ingredient { width:100px; display: inline-block; text-align:center; vertical-align: top } #view #core #content list.ingredients ln.ingredient:hover t.name { text-decoration: underline; } #view #core #content list.ingredients ln.ingredient img { max-width: 100% } -#view #core #content list.ingredients ln.ingredient t.name { display: block; font-family: 'alte_haas_grotesk_bold'; font-size:14px; margin-bottom: 5px } +#view #core #content list.ingredients ln.ingredient t.name { display: block; font-family: 'alte_haas_grotesk_bold'; font-size:14px; margin-bottom: 5px;padding:0px 10px } #view #core #content list.ingredients ln.ingredient t.quantity { display: block; font-size:12px; } -#view #core #related { width:calc(100% + 60px); margin-left:-10px; } -#view #core #related ln { max-width: calc((100% / 3) - 20px); float:left; padding:10px; } +#view #core #related { width:100%; border-top:2px solid black; padding-top:45px;} +#view #core #related ln { max-width: calc((100% / 3) - 10px); float:left; } +#view #core #related ln:nth-child(1), #view #core #related ln:nth-child(2) { margin-right:15px;} #view #core #related ln img { border-radius: 2px } #view #core #related ln t.name { display: block; font-family: 'alte_haas_grotesk_bold'; font-size:16px; margin-bottom: 5px; text-transform: capitalize; line-height: 30px } #view #core #related ln t.details { display: block; font-family: 'alte_haas_grotesk_regular'; font-size:14px; text-transform: capitalize; line-height: 30px; line-height: 18px } \ No newline at end of file diff --git a/scripts/database/recipes.js b/scripts/database/recipes.js @@ -1607,7 +1607,7 @@ BLACK BURGER BUNS & Simple black burger buns with white sesame seeds, ready in under 1 hour! Made with bamboo charcoal powder. & There are days when I don't want to wait 3h for my bread to be ready, which was the case yesterday when I decided to make burger buns. Devine's sister was coming over for supper, and I had a lot of work to do that morning. Didn't want to spend the entire day running between my computer, and the kitchen. Making bread doesn't require a lot of active time, but i'd still need to check often. Sometimes, that's just enough to take all of my focus away. & To minimize that, I made a quick savoury bread! The same one I made on Valentine's day that had a smoked paprika heart in the center (yes i know so cute. Paprika love.) That recipe was based off culinaire amoula's <a href=\"http://www.culinaireamoula.com/article-pain-au-cumin-et-paprika-118254678.html\">Cumin and paprika savoury bread</a>. I simplified the recipe, removing the spices, and divided it into 5 buns instead of two large loaves. I recommend trying out her recipe as well, it's so good. You can have the bread alone with green tea :). - % black.burger.buns.1 + % recipes/black.burger.buns.1.jpg & I don't have a lot of experience with quick breads, i'm experimenting a lot though, to see what i can make in less time. Culinaire amoula's recipe helped me a lot, didn't think i could get bread that tasted this good, so quickly. It makes great burger buns! The bottom stays flat, so in the end you're not stuck with this weird 'ball bread.' My last burger was like that, and it made it hard to have it sit upright on a plate. No one wants to eat spherical burgers. & If you're in the mood for black burger buns, and need it done quickly, then try out this recipe! & <h1>Try my other black bread recipes:</h1><a href=\"http://grimgrains.com/basic+black+bread\">Basic black bread</a><br><a href=\"http://grimgrains.com/no+knead+black+bread\">No-knead black bread</a> diff --git a/scripts/nodes/dom.js b/scripts/nodes/dom.js @@ -5,18 +5,13 @@ function DomNode(id,rect,...params) this.type = params[0] ? params[0] : "yu"; this.glyph = NODE_GLYPHS.dom this.label = `${this.id}:${this.type}` - - console.log(params) - this.el = document.createElement(this.type) this.el.id = this.id + this.is_installed = false; - console.log(params) if(params[1]){ - this.el.innerHTML = params[1] } - this.is_installed = false; this.receive = function(content) { diff --git a/scripts/templates/ingredient.js b/scripts/templates/ingredient.js @@ -16,10 +16,7 @@ function IngredientTemplate(id,rect) }, 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)) - } + related:"hello" } } } diff --git a/scripts/templates/recipe.js b/scripts/templates/recipe.js @@ -52,7 +52,7 @@ function RecipeTemplate(id,rect) if(count > 1){ break; } count += 1 } - return `<list class='related'>${html}<hr/></list>` + return `${html}<hr/>` } function count_ingredients(recipe) @@ -87,8 +87,9 @@ function RecipeTemplate(id,rect) var html = ""; for(id in categories){ var elements = categories[id]; - html += categories.length > 1 ? `<h3>${id.capitalize()}</h3>` : '' + html += `<list class='ingredients'>` + html += Object.keys(categories).length > 1 ? `<h3>${id.capitalize()}</h3>` : "" for(id in elements){ var element = elements[id]; html += `