Prettify frontend with a CSS template
This commit is contained in:
parent
667bed6edf
commit
6caca22472
|
@ -46,3 +46,18 @@ def admin():
|
||||||
@login_required
|
@login_required
|
||||||
def nuke():
|
def nuke():
|
||||||
return render_template("nuked.html", title="NUKE THE SYSTEM!")
|
return render_template("nuked.html", title="NUKE THE SYSTEM!")
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/data")
|
||||||
|
def data():
|
||||||
|
return render_template("data.html", title="Data")
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/tables")
|
||||||
|
def tables():
|
||||||
|
return render_template("data.html", title="Data")
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/plots")
|
||||||
|
def plots():
|
||||||
|
return render_template("data.html", title="Data")
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,40 +1,46 @@
|
||||||
{% extends 'bootstrap/base.html' %}
|
{% extends 'bootstrap/base.html' %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
IGDB
|
IGDB
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="{{url_for('.static', filename='bootstrap.min.css')}}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
<nav class="navbar navbar-default">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||||
<div class="container">
|
<a class="navbar-brand" href="{{ url_for('index') }}">IGDB</a>
|
||||||
<div class="navbar-header">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
<span class="navbar-toggler-icon"></span>
|
||||||
<span class="sr-only">Toggle navigation</span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="{{ url_for('index') }}">Microblog</a>
|
|
||||||
</div>
|
<div class="collapse navbar-collapse" id="navbarColor01">
|
||||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
<ul class="navbar-nav mr-auto">
|
||||||
<ul class="nav navbar-nav">
|
<li class="nav-item active">
|
||||||
<li><a href="{{ url_for('index') }}">Home</a></li>
|
<a class="nav-link" href="{{ url_for('index') }}">Home <span class="sr-only">(current)</span></a>
|
||||||
</ul>
|
</li>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
{% if current_user.is_anonymous %}
|
{% if current_user.is_anonymous %}
|
||||||
<li><a href="{{ url_for('login') }}">Login</a></li>
|
<li class="nav-link"><a href="{{ url_for('data') }}">Data</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ url_for('admin') }}">Administration</a></li>
|
<li class="nav-link"><a href="{{ url_for('data') }}">Data</a></li>
|
||||||
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
<li class="nav-link"><a href="{{ url_for('admin') }}">Administration</a></li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
<ul class="navbar-nav navbar-right">
|
||||||
|
{% if current_user.is_anonymous %}
|
||||||
|
<li class="nav-link"><a href="{{ url_for('login') }}">Login</a></li>
|
||||||
|
{% else %}
|
||||||
|
<li class="nav-item"><a href="{{ url_for('logout') }}">Logout</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</nav>
|
||||||
</nav>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% with messages = get_flashed_messages() %}
|
{% with messages = get_flashed_messages() %}
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
|
@ -45,5 +51,5 @@
|
||||||
|
|
||||||
{# application content needs to be provided in the app_content block #}
|
{# application content needs to be provided in the app_content block #}
|
||||||
{% block app_content %}{% endblock %}
|
{% block app_content %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Hey, {{ current_user.username }}!</h1>
|
||||||
|
Wanna check out some cool data?
|
||||||
|
<li><a href="{{ url_for('tables') }}"></a></li>
|
||||||
|
<li><a href="{{ url_for('plots') }}"></a></li>
|
||||||
|
{% endblock %}
|
|
@ -1,6 +1,8 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="jumbotron">
|
||||||
<h1 id="igdb-internation-glacier-database">IGDB: Internation Glacier Database</h1>
|
<h1 id="igdb-internation-glacier-database">IGDB: Internation Glacier Database</h1>
|
||||||
<p>The IGDB is a database, that uses data from the <a href="http://dx.doi.org/10.5904/wgms-fog-2018-11">WGMS</a> to illustrate the consequences of climate change.</p>
|
<p>The IGDB is a database, that uses data from the <a href="http://dx.doi.org/10.5904/wgms-fog-2018-11">WGMS</a> to illustrate the consequences of climate change.</p>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue