Compare commits
10 Commits
75e97b9d4a
...
94c46143a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94c46143a9 | ||
| 4179c43f0f | |||
| 7316daa317 | |||
| 43788b8f85 | |||
| eefbf3c4b4 | |||
| 6ff633e2f4 | |||
| 378d0dc496 | |||
| 22f7f6908c | |||
| 80190a3669 | |||
| 6f97dd6fb5 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.html
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM python:3.12
|
||||
WORKDIR /usr/local/app
|
||||
|
||||
# Install the application dependencies
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy in the source code
|
||||
COPY . .
|
||||
EXPOSE 5000
|
||||
|
||||
# Setup an app user so the container doesn't run as the root user
|
||||
RUN useradd app
|
||||
USER app
|
||||
|
||||
CMD ["cd", "/usr/local/app"]
|
||||
CMD "ls"
|
||||
CMD ["flask", "--app", "build", "run", "--host=0.0.0.0"]]
|
||||
60
build.py
60
build.py
@ -7,29 +7,51 @@ env = Environment(
|
||||
autoescape=select_autoescape()
|
||||
)
|
||||
|
||||
with open('menu.yaml', 'r') as file:
|
||||
menu = yaml.safe_load(file)
|
||||
def generateMenu():
|
||||
with open('menu.yaml', 'r') as file:
|
||||
menu = yaml.safe_load(file)
|
||||
|
||||
templateMenu = env.get_template("menu.html")
|
||||
templateRecipes = env.get_template("recipes.html")
|
||||
templateMenu = env.get_template("menu.html")
|
||||
templateRecipes = env.get_template("recipes.html")
|
||||
|
||||
for bev in menu['menu']:
|
||||
#print(bev)
|
||||
for name in bev:
|
||||
print(name)
|
||||
for ingredient in bev[name]['ingredients']:
|
||||
print(f'<li>{ingredient[list(ingredient)[0]]} {list(ingredient)[0]}</li>')
|
||||
print(markdown.markdown(bev[name]['directions']))
|
||||
bev[name]['directions_html'] = markdown.markdown(bev[name]['directions'])
|
||||
for bev, details in menu['menu'].items():
|
||||
#print(bev)
|
||||
print(bev)
|
||||
#for ingredient in details['ingredients']:
|
||||
# print(f'<li>{ingredient[list(ingredient)[0]]} {list(ingredient)[0]}</li>')
|
||||
details['directions_html'] = markdown.markdown(details['directions'])
|
||||
|
||||
with open('index.html', 'w') as file:
|
||||
file.write(templateMenu.render(bevs = menu['menu']))
|
||||
menuHtml = templateMenu.render(bevs = menu['menu'])
|
||||
recipesHtml = templateRecipes.render(bevs = menu['menu'])
|
||||
return {'menuHtml': menuHtml, 'recipesHtml': recipesHtml}
|
||||
|
||||
with open('recipes.html', 'w') as file:
|
||||
file.write(templateRecipes.render(bevs = menu['menu']))
|
||||
if (__name__ == 'build'):
|
||||
from flask import Flask
|
||||
|
||||
print(menu['menu'])
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def serveMenu():
|
||||
return generateMenu()['menuHtml']
|
||||
@app.route("/recipes")
|
||||
def serveRecipes():
|
||||
return generateMenu()['recipesHtml']
|
||||
|
||||
elif (__name__ == '__main__'):
|
||||
html = generateMenu()
|
||||
with open('index.html', 'w') as file:
|
||||
file.write(html['menuHtml'])
|
||||
|
||||
with open('recipes.html', 'w') as file:
|
||||
file.write(html['recipesHtml'])
|
||||
|
||||
|
||||
for ingredient in menu['out_of_stock']:
|
||||
print(ingredient)
|
||||
print(generateMenu())
|
||||
#print(menu)
|
||||
#
|
||||
#
|
||||
#
|
||||
#for ingredient in menu['out_of_stock']:
|
||||
# print(ingredient)
|
||||
#
|
||||
#print(__name__)
|
||||
|
||||
183
index.html
183
index.html
@ -1,183 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<title>Cocktail Menu</title>
|
||||
</head>
|
||||
<body class="menu">
|
||||
<main>
|
||||
|
||||
<h1>Cocktails</h1>
|
||||
|
||||
|
||||
<h2>Old Fashioned</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Bourbon</li>
|
||||
|
||||
|
||||
|
||||
<li>Maple syrup</li>
|
||||
|
||||
|
||||
|
||||
<li>Angostura bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Boulevardier</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Bourbon</li>
|
||||
|
||||
|
||||
|
||||
<li>Campari</li>
|
||||
|
||||
|
||||
|
||||
<li>Sweet vermouth</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Black Manhattan</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Rye whiskey</li>
|
||||
|
||||
|
||||
|
||||
<li>Amaro</li>
|
||||
|
||||
|
||||
|
||||
<li>Angostura bitters</li>
|
||||
|
||||
|
||||
|
||||
<li>Orange bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>MonteNegroni</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Amaro Montenegro</li>
|
||||
|
||||
|
||||
|
||||
<li>Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>Sweet vermouth</li>
|
||||
|
||||
|
||||
|
||||
<li>Angostura bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Sidecar</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Bourbon</li>
|
||||
|
||||
|
||||
|
||||
<li>Cointreau</li>
|
||||
|
||||
|
||||
|
||||
<li>Lemon juice</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Gin & Tonic</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>Tonic water</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Gimlet</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>Lime juice</li>
|
||||
|
||||
|
||||
|
||||
<li>Simple syrup</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Bennet</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>Lime juice</li>
|
||||
|
||||
|
||||
|
||||
<li>Simple syrup</li>
|
||||
|
||||
|
||||
|
||||
<li>Angostura bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
199
menu.yaml
199
menu.yaml
@ -1,87 +1,122 @@
|
||||
---
|
||||
menu:
|
||||
- Old Fashioned:
|
||||
base: Bourbon
|
||||
category: Ancestrals
|
||||
ingredients:
|
||||
- Bourbon: 2 oz
|
||||
- Maple syrup: 1tsp
|
||||
- Angostura bitters: 2 dashes
|
||||
directions: |
|
||||
1. Stir with ice. Strain into rocks glass over large cube.
|
||||
1. Garnish with orange twist.
|
||||
- Boulevardier:
|
||||
base: Bourbon
|
||||
category: Spirit-Forward
|
||||
ingredients:
|
||||
- Bourbon: 1.5 oz
|
||||
- Campari: 1 oz
|
||||
- Sweet vermouth: 1 oz
|
||||
directions: |
|
||||
1. Stir with ice. Strain into rocks glass over large cube.
|
||||
1. Garnish with orange twist.
|
||||
- Black Manhattan:
|
||||
base: Rye whiskey
|
||||
category: Spirit-Forward
|
||||
ingredients:
|
||||
- Rye whiskey: 2 oz
|
||||
- Amaro: 1 oz
|
||||
- Angostura bitters: 1 dash
|
||||
- Orange bitters: 1 dash
|
||||
directions: |
|
||||
1. Stir with ice. Strain into chilled coupe.
|
||||
1. Garnish with orange twist.
|
||||
- MonteNegroni:
|
||||
base: Amaro Montenegro & Gin
|
||||
category:
|
||||
ingredients:
|
||||
- Amaro Montenegro: 1 1/3 oz
|
||||
- Gin: 2/3 oz
|
||||
- Sweet vermouth: 2/3 oz
|
||||
- Angostura bitters: 2 drops
|
||||
directions: |
|
||||
1. Stir with ice. Strain into rocks glass over large cube.
|
||||
1. Garnish with orange twist.
|
||||
- Sidecar:
|
||||
base: Bourbon
|
||||
category: Sours
|
||||
ingredients:
|
||||
- Bourbon: 2 oz
|
||||
- Cointreau: 1 oz
|
||||
- Lemon juice: 0.5 oz
|
||||
directions: |
|
||||
1. Shake with ice. Double strain into chilled coupe.
|
||||
- "Gin & Tonic":
|
||||
base: Gin
|
||||
category: Highballs
|
||||
ingredients:
|
||||
- Gin: 2 oz
|
||||
- Tonic water: 4 oz
|
||||
directions: |
|
||||
1. Pour gin and tonic over ice in short glass.
|
||||
1. Stir gently.
|
||||
1. Garnish with lime wheel.
|
||||
- Gimlet:
|
||||
base: Gin
|
||||
category: Sours
|
||||
ingredients:
|
||||
- Gin: 2 oz
|
||||
- Lime juice: 1 oz
|
||||
- Simple syrup: 0.5 oz
|
||||
directions: |
|
||||
1. Shake with ice.
|
||||
1. Double strain into chilled coupe.
|
||||
- Bennet:
|
||||
base: Gin
|
||||
category: Sours
|
||||
ingredients:
|
||||
- Gin: 2 oz
|
||||
- Lime juice: 1 oz
|
||||
- Simple syrup: 0.5 oz
|
||||
- Angostura bitters: 1 dash
|
||||
directions: |
|
||||
1. Shake with ice.
|
||||
1. Double strain into chilled coupe.
|
||||
Old Fashioned:
|
||||
base: Bourbon
|
||||
category: Ancestrals
|
||||
ingredients:
|
||||
Bourbon: 2 oz
|
||||
Maple syrup: 1tsp
|
||||
Angostura bitters: 2 dashes
|
||||
directions: |
|
||||
1. Stir with ice. Strain into rocks glass over large cube.
|
||||
1. Garnish with orange twist.
|
||||
Boulevardier:
|
||||
base: Bourbon
|
||||
category: Spirit-Forward
|
||||
ingredients:
|
||||
Bourbon: 1.5 oz
|
||||
Campari: 1 oz
|
||||
Sweet vermouth: 1 oz
|
||||
directions: |
|
||||
1. Stir with ice. Strain into rocks glass over large cube.
|
||||
1. Garnish with orange twist.
|
||||
Manhattan:
|
||||
base: Bourbon
|
||||
category: Ancestrals
|
||||
ingredients:
|
||||
Bourbon: 1.5 oz
|
||||
Sweet vermouth: 1 oz
|
||||
Angostura bitters: 2 dashes
|
||||
directions: |
|
||||
1. Stir with ice.
|
||||
2. Strain into chilled coupe.
|
||||
3. Garnish with cherry or orange twist.
|
||||
Black Manhattan:
|
||||
base: Rye whiskey
|
||||
category: Spirit-Forward
|
||||
ingredients:
|
||||
Rye whiskey: 2 oz
|
||||
Amaro: 1 oz
|
||||
Angostura bitters: 1 dash
|
||||
Orange bitters: 1 dash
|
||||
directions: |
|
||||
1. Stir with ice. Strain into chilled coupe.
|
||||
1. Garnish with orange twist.
|
||||
MonteNegroni:
|
||||
base: Amaro Montenegro & Gin
|
||||
category:
|
||||
ingredients:
|
||||
Amaro Montenegro: 1 1/3 oz
|
||||
Gin: 2/3 oz
|
||||
Sweet vermouth: 2/3 oz
|
||||
Angostura bitters: 2 drops
|
||||
directions: |
|
||||
1. Stir with ice. Strain into rocks glass over large cube.
|
||||
1. Garnish with orange twist.
|
||||
Sidecar:
|
||||
base: Bourbon
|
||||
category: Sours
|
||||
ingredients:
|
||||
Bourbon: 2 oz
|
||||
Cointreau: 1 oz
|
||||
Lemon juice: 0.5 oz
|
||||
directions: |
|
||||
1. Shake with ice. Double strain into chilled coupe.
|
||||
"Gin & Tonic":
|
||||
base: Gin
|
||||
category: Highballs
|
||||
ingredients:
|
||||
Gin: 2 oz
|
||||
Tonic water: 4 oz
|
||||
directions: |
|
||||
1. Pour gin and tonic over ice in short glass.
|
||||
1. Stir gently.
|
||||
1. Garnish with lime wheel.
|
||||
Gimlet:
|
||||
base: Gin
|
||||
category: Sours
|
||||
ingredients:
|
||||
Gin: 2 oz
|
||||
Lime juice: 1 oz
|
||||
Simple syrup: 0.5 oz
|
||||
directions: |
|
||||
1. Shake with ice.
|
||||
1. Double strain into chilled coupe.
|
||||
Bennet:
|
||||
base: Gin
|
||||
category: Sours
|
||||
ingredients:
|
||||
Gin: 2 oz
|
||||
Lime juice: 1 oz
|
||||
Simple syrup: 0.5 oz
|
||||
Angostura bitters: 1 dash
|
||||
directions: |
|
||||
1. Shake with ice.
|
||||
1. Double strain into chilled coupe.
|
||||
Garibaldi:
|
||||
base: Campari
|
||||
category: Highballs
|
||||
ingredients:
|
||||
Campari: 1.5 oz
|
||||
Orange juice: 4.5 oz
|
||||
directions: |
|
||||
1. Blend orange juice and Campari until frothy.
|
||||
1. Strain into ice-filled highball.
|
||||
White Russian:
|
||||
base: Vodka
|
||||
category:
|
||||
ingredients:
|
||||
Vodka: 1.5 oz
|
||||
Kahlua: 1 oz
|
||||
Heavy cream: 1 oz
|
||||
Instant coffee: 0.5 tsp
|
||||
directions: |
|
||||
1. Chill vodka
|
||||
1. Add large cube to lowball glass
|
||||
1. Sprinkle instant coffee powder over ice
|
||||
1. Slowly pour vodka around ice
|
||||
1. Slowly pour Kahlua around ice
|
||||
1. Slowly pour cream over ice
|
||||
|
||||
out_of_stock:
|
||||
- Rye whiskey
|
||||
|
||||
231
recipes.html
231
recipes.html
@ -1,231 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<title>Cocktail Menu</title>
|
||||
</head>
|
||||
<body class="recipes">
|
||||
<main>
|
||||
|
||||
<h1>Recipes</h1>
|
||||
|
||||
|
||||
<h2>Old Fashioned</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>2 oz Bourbon</li>
|
||||
|
||||
|
||||
|
||||
<li>1tsp Maple syrup</li>
|
||||
|
||||
|
||||
|
||||
<li>2 dashes Angostura bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Stir with ice. Strain into rocks glass over large cube.</li>
|
||||
<li>Garnish with orange twist.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Boulevardier</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>1.5 oz Bourbon</li>
|
||||
|
||||
|
||||
|
||||
<li>1 oz Campari</li>
|
||||
|
||||
|
||||
|
||||
<li>1 oz Sweet vermouth</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Stir with ice. Strain into rocks glass over large cube.</li>
|
||||
<li>Garnish with orange twist.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Black Manhattan</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>2 oz Rye whiskey</li>
|
||||
|
||||
|
||||
|
||||
<li>1 oz Amaro</li>
|
||||
|
||||
|
||||
|
||||
<li>1 dash Angostura bitters</li>
|
||||
|
||||
|
||||
|
||||
<li>1 dash Orange bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Stir with ice. Strain into chilled coupe.</li>
|
||||
<li>Garnish with orange twist.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>MonteNegroni</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>1 1/3 oz Amaro Montenegro</li>
|
||||
|
||||
|
||||
|
||||
<li>2/3 oz Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>2/3 oz Sweet vermouth</li>
|
||||
|
||||
|
||||
|
||||
<li>2 drops Angostura bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Stir with ice. Strain into rocks glass over large cube.</li>
|
||||
<li>Garnish with orange twist.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Sidecar</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>2 oz Bourbon</li>
|
||||
|
||||
|
||||
|
||||
<li>1 oz Cointreau</li>
|
||||
|
||||
|
||||
|
||||
<li>0.5 oz Lemon juice</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Shake with ice. Double strain into chilled coupe.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Gin & Tonic</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>2 oz Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>4 oz Tonic water</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Pour gin and tonic over ice in short glass.</li>
|
||||
<li>Stir gently.</li>
|
||||
<li>Garnish with lime wheel.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Gimlet</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>2 oz Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>1 oz Lime juice</li>
|
||||
|
||||
|
||||
|
||||
<li>0.5 oz Simple syrup</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Shake with ice.</li>
|
||||
<li>Double strain into chilled coupe.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Bennet</h2>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>2 oz Gin</li>
|
||||
|
||||
|
||||
|
||||
<li>1 oz Lime juice</li>
|
||||
|
||||
|
||||
|
||||
<li>0.5 oz Simple syrup</li>
|
||||
|
||||
|
||||
|
||||
<li>1 dash Angostura bitters</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Directions</h3>
|
||||
<p><ol>
|
||||
<li>Shake with ice.</li>
|
||||
<li>Double strain into chilled coupe.</li>
|
||||
</ol></p>
|
||||
|
||||
|
||||
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
11
requirements.txt
Normal file
11
requirements.txt
Normal file
@ -0,0 +1,11 @@
|
||||
blinker==1.9.0
|
||||
click==8.1.8
|
||||
Flask==3.1.0
|
||||
importlib_metadata==8.6.1
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.5
|
||||
Markdown==3.7
|
||||
MarkupSafe==3.0.2
|
||||
PyYAML==6.0.2
|
||||
Werkzeug==3.1.3
|
||||
zipp==3.21.0
|
||||
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="static/style.css">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
</head>
|
||||
<body class="{% block bodyclass %}{% endblock %}">
|
||||
|
||||
@ -3,17 +3,13 @@
|
||||
{% block bodyclass %}menu{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{% block header %}Cocktails{% endblock %}</h1>
|
||||
{% for bev in bevs %}
|
||||
{% for name, details in bev.items() %}
|
||||
<h2>{{ name }}</h2>
|
||||
<ul>
|
||||
{% for ingredient in details['ingredients'] %}
|
||||
{% for name, amount in ingredient.items() %}
|
||||
<li>{% block amount scoped %}{% endblock %}{{ name }}</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% block directions scoped %}{% endblock %}
|
||||
{% endfor %}
|
||||
{% for name, details in bevs.items() %}
|
||||
<h2>{{ name }}</h2>
|
||||
<ul>
|
||||
{% for name, amount in details['ingredients'].items() %}
|
||||
<li>{% block amount scoped %}{% endblock %}{{ name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% block directions scoped %}{% endblock %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user