Skip to content

Commit

Permalink
column layout with style sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsleh committed Feb 18, 2020
1 parent 7d9f747 commit 5e61703
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .ipynb_checkpoints/EDA-checkpoint.ipynb

This file was deleted.

9 changes: 9 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from flask import Flask

from flask_bootstrap import Bootstrap

app = Flask(__name__)

bootstrap = Bootstrap(app)

from app import routes
7 changes: 7 additions & 0 deletions app/routes.py
Original file line number Diff line number Diff line change
@@ -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')
25 changes: 25 additions & 0 deletions app/static/style.css
Original file line number Diff line number Diff line change
@@ -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;
}
38 changes: 38 additions & 0 deletions app/templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<html>
<head>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <style>
* {
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;
}
</style> -->
</head>
<body>
<!-- <div>Visualization: <a href="/index">Home</a></div> -->
<hr>
{% block content %}{% endblock %}
</body>
</html>
19 changes: 19 additions & 0 deletions app/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends "base.html" %}

{% block content %}
<h2>Visualization</h2>

<div class="row">

<div class="column left" style="background-color:#aaa;">
<h2>Navigation Bar</h2>
</div>

<div class="column right" style="background-color:#bbb;">
<h2>Map of Amsterdam</h2>
</div>

</div>

{% endblock %}

5 changes: 5 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from flask import Flask

app = Flask(__name__)

from app import routes

0 comments on commit 5e61703

Please sign in to comment.