add some more mockups and functionality

This commit is contained in:
2022-07-16 17:40:31 +02:00
parent 25fc44b8b1
commit 34897225ba
6 changed files with 47 additions and 17 deletions

9
.gitignore vendored
View File

@@ -153,10 +153,5 @@ dmypy.json
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# vim
.swp

View File

@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}About{% endblock %}
{% block content %}
</br>
<div class="media">
<img class="mr-3" src="https://cdn.dribbble.com/users/1112628/screenshots/6233083/icon3.png" alt="Cheers">
<div class="media-body">
<h5 class="mt-0">About beertap</h5>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
{% endblock %}

View File

@@ -20,7 +20,7 @@
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">Beertap</a>
<a class="navbar-brand" href="/">Beertap</a>
<button
class="navbar-toggler"
type="button"

View File

@@ -4,8 +4,8 @@
<form method="POST">
<br />
<div class="btn-group d-flex" role="group" aria-label="order_buttons">
<button type="submit" name="submit_button" value="option1" class="btn btn-primary w-100 py-5">Left</button>
<button type="submit" name="submit_button" value="option2" class="btn btn-secondary w-100 py-5">Right</button>
<button type="submit" name="submit_button" value="option_1" class="btn btn-primary w-100 py-5">Left</button>
<button type="submit" name="submit_button" value="option_2" class="btn btn-secondary w-100 py-5">Right</button>
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}About{% endblock %}
{% block content %}
</br>
<div class="media">
<img class="mr-3" src="https://cdn.dribbble.com/users/1112628/screenshots/6233083/icon3.png" alt="Cheers">
<div class="media-body">
<h5 class="mt-0">Statistics</h5>
You drank approximately 6782348906890234678234698 beers.
</div>
</div>
{% endblock %}

View File

@@ -4,11 +4,22 @@ from flask import Blueprint, render_template, request, flash, jsonify
views = Blueprint('views', __name__)
@views.route('/', methods=['GET', 'POST'])
def beer_tap():
if request.method == 'POST':
if request.form['submit_button'] == 'option1':
print("Es Grosses uselah!")
if request.form['submit_button'] == 'option2':
print("Es Chliises uselah!")
@views.route('/', methods=['GET'])
def render():
return render_template('beertap.html')
@views.route('/', methods=['POST'])
def choice():
if request.form['submit_button'] == 'option_1':
print("Es Grosses uselah!")
if request.form['submit_button'] == 'option_2':
print("Es Chliises uselah!")
return render_template('beertap.html')
@views.route('/about', methods=['GET'])
def about():
return render_template('about.html')
@views.route('/statistics', methods=['GET'])
def statistics():
return render_template('statistics.html')