From 5e617037d4d1fac16636b819872f5ab91da037fc Mon Sep 17 00:00:00 2001 From: nilsleh Date: Tue, 18 Feb 2020 16:32:04 +0100 Subject: [PATCH] column layout with style sheet --- .ipynb_checkpoints/EDA-checkpoint.ipynb | 6 ---- app/__init__.py | 9 ++++++ app/routes.py | 7 +++++ app/static/style.css | 25 ++++++++++++++++ app/templates/base.html | 38 +++++++++++++++++++++++++ app/templates/index.html | 19 +++++++++++++ run.py | 5 ++++ 7 files changed, 103 insertions(+), 6 deletions(-) delete mode 100644 .ipynb_checkpoints/EDA-checkpoint.ipynb create mode 100644 app/routes.py create mode 100644 app/templates/base.html create mode 100644 app/templates/index.html diff --git a/.ipynb_checkpoints/EDA-checkpoint.ipynb b/.ipynb_checkpoints/EDA-checkpoint.ipynb deleted file mode 100644 index 7fec515..0000000 --- a/.ipynb_checkpoints/EDA-checkpoint.ipynb +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cells": [], - "metadata": {}, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/app/__init__.py b/app/__init__.py index e69de29..38dda03 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -0,0 +1,9 @@ +from flask import Flask + +from flask_bootstrap import Bootstrap + +app = Flask(__name__) + +bootstrap = Bootstrap(app) + +from app import routes \ No newline at end of file diff --git a/app/routes.py b/app/routes.py new file mode 100644 index 0000000..3ebf0be --- /dev/null +++ b/app/routes.py @@ -0,0 +1,7 @@ +from flask import render_template +from app import app + +@app.route('/') +@app.route('/index') +def index(): + return render_template('index.html') \ No newline at end of file diff --git a/app/static/style.css b/app/static/style.css index e69de29..3b2a6e5 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -0,0 +1,25 @@ +* { + box-sizing: border-box; +} + +/* Create two unequal columns that floats next to each other */ +.column { + float: left; + padding: 10px; + height: 300px; /* Should be removed. Only for demonstration */ +} + +.left { + width: 25%; +} + +.right { + width: 75%; +} + +/* Clear floats after the columns */ +.row:after { + content: ""; + display: table; + clear: both; +} \ No newline at end of file diff --git a/app/templates/base.html b/app/templates/base.html new file mode 100644 index 0000000..a0cc82e --- /dev/null +++ b/app/templates/base.html @@ -0,0 +1,38 @@ + + + + + + + + +
+ {% block content %}{% endblock %} + + \ No newline at end of file diff --git a/app/templates/index.html b/app/templates/index.html new file mode 100644 index 0000000..e622661 --- /dev/null +++ b/app/templates/index.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block content %} +

Visualization

+ +
+ +
+

Navigation Bar

+
+ +
+

Map of Amsterdam

+
+ +
+ +{% endblock %} + diff --git a/run.py b/run.py index e69de29..82b47ea 100644 --- a/run.py +++ b/run.py @@ -0,0 +1,5 @@ +from flask import Flask + +app = Flask(__name__) + +from app import routes \ No newline at end of file