Initial commit for MVP

This commit is contained in:
lucas
2022-04-22 09:30:01 -07:00
parent d7dbe11c5d
commit 3e346cf3eb
9 changed files with 386 additions and 1 deletions

29
templates/base.html Normal file
View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Akshar&display=swap" rel="stylesheet">
<title>{% block title %}{% endblock %}</title>
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon-16x16.png') }}">
{% block html_head %}{% endblock %}
</head>
<nav>
<ul>
<li class="nav"><a href="/">Home</a></li>
<li class="nav"><a href="/recipes">Recipes</a></li>
<li class="nav"><a href="/add">Add</a></li>
</ul>
</nav>
<body>
<div id="content">
{% block content %}{% endblock %}
</div>
<div id="footer">
{% block footer %}
&copy; Copyright 2022 by <a href="https://github.com/ljensen505">Lucas Jensen</a>.
{% endblock %}
</div>
</body>

14
templates/index.html Normal file
View File

@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}Home Page{% endblock %}
{% block html_head %}
{% endblock %}
{% block content %}
<h1>Welcome to the Bread App!</h1>
<p>Add, scale, and convert all your bread recipes here.</p>
{% endblock %}

30
templates/new.html Normal file
View File

@@ -0,0 +1,30 @@
{% extends "base.html" %}
{% block title %}Add Recipe{% endblock %}
{% block html_head %}
{% endblock %}
{% block content %}
<h1>New Recipe</h1>
<form action="{{ url_for("add_recipe")}}" method="post">
<label for="name">Recipe Name:</label>
<input required type="text" id="name" name="name" placeholder="Sourdough">
<br>
<p>Enter all values grams.</p>
{% for ing in ['flour', 'water', 'salt'] %}
<label for="{{ing}}_weight">{{ing.title()}}:</label>
<input required type="number" id="{{ing}}_weight" name="{{ing}}_weight" placeholder="100">
<br>
{% endfor %}
<label for="yield">Loaves:</label>
<input required type="number" id="yield" name="yield" placeholder="2">
<button type="submit">Add!</button>
{% endblock %}

19
templates/recipe.html Normal file
View File

@@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block title %}Recipes{% endblock %}
{% block html_head %}
{% endblock %}
{% block content %}
<h1>Bread Recipes</h1>
<ul>
{% for recipe in content %}
<li>
<a href=recipes/{{recipe}}>{{content[recipe]['name']}}</a>
</li>
{% endfor %}
</ul>
{% endblock %}