Initial commit
This commit is contained in:
parent
118ba56584
commit
f57b636e3e
9 changed files with 225 additions and 0 deletions
40
app/FoodBot.py
Normal file
40
app/FoodBot.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# import sqlite3
|
||||
from flask import Flask, request, render_template
|
||||
|
||||
# Config
|
||||
DATABASE = '/db/foodbot.db'
|
||||
DEBUG = True
|
||||
SECRET_KEY = 'development key'
|
||||
USERNAME = 'admin'
|
||||
PASSWORD = 'tetten'
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(__name__)
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def home():
|
||||
return render_template('home.html')
|
||||
|
||||
|
||||
@app.route('/about/')
|
||||
def about():
|
||||
return render_template('about.html')
|
||||
|
||||
|
||||
@app.route('/stats/')
|
||||
def stats():
|
||||
return render_template('stats.html')
|
||||
|
||||
|
||||
@app.route('/login/', methods=['GET', 'POST'])
|
||||
def login():
|
||||
if request.method == 'POST':
|
||||
pass
|
||||
else:
|
||||
return render_template('login.html')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
# app.run(host='0.0.0.0')
|
7
app/README.md
Normal file
7
app/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
FOODBOT
|
||||
=======
|
||||
|
||||
FoodBot exists so lazy fucks like you and me don't need to keep tabs of who is ordering what from where.
|
||||
Start an order and let people add items with a simple mouse-click!
|
||||
No more calculating prices and making lists!
|
||||
Be lazier today!
|
90
app/static/css/main.css
Normal file
90
app/static/css/main.css
Normal file
|
@ -0,0 +1,90 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create dark grey header with a white logo
|
||||
*/
|
||||
|
||||
header {
|
||||
background-color: #2B2B2B;
|
||||
height: 35px;
|
||||
width: 100%;
|
||||
opacity: .9;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
header h1.logo {
|
||||
margin: 0;
|
||||
font-size: 1.7em;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
float: left;
|
||||
}
|
||||
|
||||
header h1.logo:hover {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* Center the body content
|
||||
*/
|
||||
|
||||
.container {
|
||||
width: 940px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
div.jumbo {
|
||||
padding: 10px 0 30px 0;
|
||||
background-color: #eeeeee;
|
||||
-webkit-border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
div.login {
|
||||
padding: 10px 0 30px 0;
|
||||
background-color: #eeeeee;
|
||||
-webkit-border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 3em;
|
||||
margin-top: 40px;
|
||||
text-align: center;
|
||||
letter-spacing: -2px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.7em;
|
||||
font-weight: 100;
|
||||
margin-top: 30px;
|
||||
text-align: center;
|
||||
letter-spacing: -1px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.menu {
|
||||
float: right;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.menu li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.menu li + li {
|
||||
margin-left: 35px;
|
||||
}
|
||||
|
||||
.menu li a {
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
}
|
6
app/templates/about.html
Normal file
6
app/templates/about.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>About</h1>
|
||||
<p>This is an About page for FoodBot. Don't I look good? Oh stop, you're making me blush.</p>
|
||||
{% endblock %}
|
7
app/templates/home.html
Normal file
7
app/templates/home.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
<div class="jumbo">
|
||||
<h2>Welcome to FoodBot</h2>
|
||||
<h3>This is the home page for FoodBot</h3>
|
||||
</div>
|
||||
{% endblock %}
|
30
app/templates/layout.html
Normal file
30
app/templates/layout.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>FoodBot</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<div class="container">
|
||||
<h1 class="logo">FOODBOT</h1>
|
||||
<nav>
|
||||
<ul class="menu">
|
||||
<li><a href="{{ url_for('home') }}">Home</a></li>
|
||||
<li><a href="{{ url_for('stats') }}">Stats</a></li>
|
||||
<li><a href="{{ url_for('about') }}">About</a></li>
|
||||
<li><a href="{{ url_for('login') }}">Login</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
24
app/templates/login.html
Normal file
24
app/templates/login.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<section class="container">
|
||||
<div class="login">
|
||||
<h1>Login with Zeus-Account</h1>
|
||||
<form method="post" action="{{ url_for('home') }}">
|
||||
<p><input type="text" name="login" value="" placeholder="Zeus e-mail "></p>
|
||||
<p><input type="password" name="password" value="" placeholder="Password"></p>
|
||||
<p class="remember_me">
|
||||
<label>
|
||||
<input type="checkbox" name="remember_me" id="remember_me">
|
||||
Remember me on this computer
|
||||
</label>
|
||||
</p>
|
||||
<p class="submit"><input type="submit" name="commit" value="Login"></p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="login-help">
|
||||
<p>Forgot your password? <a href="{{ url_for('home') }}">Click here to reset it</a>.</p>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
6
app/templates/stats.html
Normal file
6
app/templates/stats.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Stats bruh</h1>
|
||||
<p>TOP 4</p>
|
||||
{% endblock %}
|
15
db/muhscheme
Normal file
15
db/muhscheme
Normal file
|
@ -0,0 +1,15 @@
|
|||
ORDERS
|
||||
=======
|
||||
OrderID | Courier | Locatie | Starttijdstip | Eindtijstip | Comment
|
||||
|
||||
Item
|
||||
=====
|
||||
ItemID | OrderID | User | Food
|
||||
|
||||
Locaties
|
||||
======
|
||||
LocatieID | Naam | Adres | Telefoonnummer
|
||||
|
||||
Food
|
||||
=====
|
||||
FoodID | LocatieID | Naam | Prijs
|
Loading…
Reference in a new issue