commit: 420571e033024029ab837d903c3bfea744f64165
parent 4cf09e15b4f57947843e2c877900144aaad34a98
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Wed, 14 Mar 2018 12:10:27 +1300
Implemented pages
Diffstat:
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/links/main.css b/links/main.css
@@ -20,6 +20,9 @@ h1,h2,h3,h4 { font-weight: normal; font-family: 'alte_haas_grotesk_bold'; margin
#view #core #content h2 { text-transform: capitalize; font-size:28px; }
#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; line-height: 26px }
+#view #core #content p:nth-child(2) { font-size:24px; }
+#view #core #content p a { font-weight: bold }
+#view #core #content p a:hover { text-decoration: underline; }
#view #core #content img { margin-bottom: 30px; border-radius: 2px }
#view #core #content img.photo { width:100%; }
#view #core #content columns { columns:2; display: block; margin-bottom:30px; column-gap: 30px }
diff --git a/scripts/database/ingredients.js b/scripts/database/ingredients.js
@@ -1,4 +1,18 @@
DATABASE.ingredients = `
+
+Coffee
+ TYPE : Legume
+ BREF : {{Coffee}} is considered to be one of the best foods because their chemical structures are not altered by cooking. Lens is the latin name for lentil.
+ LONG
+ & Lentils are considered to be one of the best foods because their chemical structures are not altered by cooking. Lens is the latin name for lentil.
+ & Lentils are considered to be one of the latin name for lentil. Lentils are considered to be one of the best foods because their chemical structures are not altered by cooking. Lens is the latin name for lentil. Lentils are considered to be one of the best foods because their chemical structures are not altered by cooking. Lens is the latin name for lentil.
+ - Item1
+ - Item2
+ - Item3
+
+
+
+
~ LEGUMES
Lentils
@@ -619,12 +633,6 @@ Lapsang souchong
Tags
Tea
-
-~ COFFEE
-
-Coffee
- Details : Missing.
-
~ ALCOHOL
Wine
diff --git a/scripts/templates/ingredient.js b/scripts/templates/ingredient.js
@@ -14,18 +14,21 @@ function IngredientTemplate(id,rect)
title:`GrimGrains — ${t.name.capitalize()}`,
view: {
core: {
- content: make_ingredient(t.name,t.tables.recipes),
+ content: make_ingredient(t.name,ingredient,t.tables.recipes),
related:make_related(related_recipes(t.name,t.tables.recipes))
}
}
}
}
- function make_ingredient(name,recipes)
+ function make_ingredient(name,ingredient,recipes)
{
+ console.log(ingredient)
var html = ""
- html += `<h1>${name.capitalize()}</h1>`
+ html += `<h1>${ingredient.TYPE ? ingredient.TYPE.capitalize()+"/" : ''}${name.capitalize()}</h1>`
+ html += ingredient.BREF ? `<p>${ingredient.BREF.to_markup()}</p>` : ''
+ html += ingredient.LONG ? new Runic(ingredient.LONG) : ''
html += `${make_similar(name,recipes)}`
return html
}