Compare commits

...

2 Commits

Author SHA1 Message Date
erica-garga 143559040e instructions 3 years ago
erica-garga 17b27cf1af instructions 3 years ago

@ -32,7 +32,7 @@
"ingredients = [ingredient.strip() for ingredient in input().split(',')]\n",
"\n",
"\n",
"print(\"Which passages do you follow to cook the recipe? Please write them separated by a comma\")\n",
"print(\"Which steps do you need to follow to cook the recipe? Please write them separated by a comma\")\n",
"instructions = [instruction.strip() for instruction in input().split(',')]\n"
]
},
@ -71,8 +71,7 @@
"\n",
"with open('cms.json','w') as file:\n",
" file.write(json.dumps(cms))\n",
" \n",
"print(json.dumps(cms))\n"
" print('Thank you for your contribuition')\n"
]
},
{

@ -1,90 +1,127 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<script src="cms.js" defer></script>
<title>🥣 Soup Gen</title>
</head>
<body>
<div class="cookbook">
<h2>Soup Gen Cookbook</h2>
<div class="cookbook-info" id="cookbookInfo"></div>
<div class="recipes" id="cookbook"></div>
</div>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<script src="cms.js" defer></script>
<title>🥣 Soup Gen</title>
</head>
<div class="intro">
<div class="description">
<h1>Soup Generator</h1>
each soup has:
</div>
<body>
<div class="intro">
<h1>🥣 Soup Generator</h1>
<div class="description">
<p>
Hey this is a Soup + Other Cookbook and it is meant to be collaborative! For now you can add a recipe
only if you are from XPUB, but we are working to make this open access.
</p>
<p>
To add a recipe:
<ol>
<li>
Enter your Jupiter, and go to <code>~/shared/html/soup-gen/</code>
</li>
<li>
Open the notebook <code>add_recipe.ipynb</code>
</li>
<li>
Run the first snippet, it will ask you for some info about the recipe: fill the blank space in the
output message.
</li>
<li>
Run the second snippet, it will save the recipe in the Soupboat.
</li>
<li>
You added a recipe!
</li>
<li>
__CONGRATS__
</li>
</ol>
</p>
<div class="recipe">
<div class="info">
<h2 class="title">Title [string]</h2>
<div class="description">Description [string]</div>
<div class="chef">Chef [string]</div>
</div>
Each soup has:
</div>
<div class="ingredients">
<h3>List of ingredients [array of strings]</h3>
<ul>
<li>First ingredient</li>
<li>Second ingredient</li>
<li>...</li>
</ul>
</div>
<div class="instructions">
<h3>List of instructions [array of strings]</h3>
<ol>
<li>First instruction</li>
<li>Second instruction</li>
<li>...</li>
</ol>
</div>
<div class="recipe">
<div class="info">
<h2 class="title">Title</h2>
<div class="description">Description</div>
<div class="chef">Chef</div>
</div>
<div class="todo">
<div class="ingredients">
<h3>List of ingredients</h3>
<ul>
<em>TODO short term:</em>
<li>💻 Receive recipe as a form ?</li>
<li>🔍 Ingredients list and filter!!! (like chat reader)</li>
<li>💬 Different types of entries for the cms: recipe, diary, ecc.</li>
<li>📷 Add recipe picture ?</li>
<li>🎨 Design</li>
<em>TODO long term:</em>
<li>💾 Better CMS (and not just a JSON file ah ah)</li>
<li>🦥 Recipes lazy loading :P</li>
<li>📔 Web to print design</li>
<li>📃 Soup pagination</li>
<li>First ingredient</li>
<li>Second ingredient</li>
<li>...</li>
</ul>
</div>
<div class="instructions">
<h3>List of instructions</h3>
<ol>
<li>First instruction</li>
<li>Second instruction</li>
<li>...</li>
</ol>
</div>
</div>
</div>
<ul class="questions">
<em>Questions:</em>
<li>
What is the best solution to receive recipes from users??? We imagine it to be
something like an HTML form that the NGNIX server could parse and then put in
the cms.json file??? or there's a better way to do it? is this dangerous???
</li>
<li>
What is the best solution to add images?? Can we upload them on the soupboat
from the form? We need to process them with something in order to reduce size?
Or just put a limit in the file upload maybe? (to avoid a server mental
breakdown)
</li>
<li>
Can we setup something like a CI/CD pipeline for deploying the Cookbook directly
from the git repo??? Maybe it could just be setting up some hooks in git to
transfer and replace the static file to the soupboat public_html/soup-gen/
folder on new commit?
</li>
<li>Or maybe we can try and use Flask?</li>
<div class="cookbook">
<h2>Soup Gen Cookbook</h2>
<div class="cookbook-info" id="cookbookInfo"></div>
<div class="recipes" id="cookbook"></div>
</div>
<div class="intro">
<div class="todo">
<ul>
<em>TODO short term:</em>
<li>💻 Receive recipe as a form ?</li>
<li>🔍 Ingredients list and filter!!! (like chat reader)</li>
<li>💬 Different types of entries for the cms: recipe, diary, ecc.</li>
<li>📷 Add recipe picture ?</li>
<li>🎨 Design</li>
<em>TODO long term:</em>
<li>💾 Better CMS (and not just a JSON file ah ah)</li>
<li>🦥 Recipes lazy loading :P</li>
<li>📔 Web to print design</li>
<li>📃 Soup pagination</li>
<li>🐱‍🐉 Generative soups, starting from existing ingredients, and instructions, and tags</li>
</ul>
</div>
</body>
</html>
<ul class="questions">
<em>Questions:</em>
<li>
What is the best solution to receive recipes from users??? We imagine it to be
something like an HTML form that the NGNIX server could parse and then put in
the cms.json file??? or there's a better way to do it? is this dangerous???
</li>
<li>
What is the best solution to add images?? Can we upload them on the soupboat
from the form? We need to process them with something in order to reduce size?
Or just put a limit in the file upload maybe? (to avoid a server mental
breakdown)
</li>
<li>
Can we setup something like a CI/CD pipeline for deploying the Cookbook directly
from the git repo??? Maybe it could just be setting up some hooks in git to
transfer and replace the static file to the soupboat public_html/soup-gen/
folder on new commit?
</li>
<li>Or maybe we can try and use Flask?</li>
</ul>
</div>
</body>
</html>

@ -6,13 +6,15 @@ body {
.intro {
margin: 32px;
max-width: 800px;
max-width: 1000px;
}
.intro .recipe {
border: 1px solid currentColor;
}
h1,
h2,
h3 {

Loading…
Cancel
Save