From 12a6be6e50735c7b6bc5c3204433b8374d9c6113 Mon Sep 17 00:00:00 2001 From: "S.W.S. de Zeeuw" <stef@SWSs-MacBook-Pro.local> Date: Sat, 12 Dec 2020 07:34:19 +0100 Subject: [PATCH] Added trade page --- app/main/routes.py | 5 +++++ app/templates/base.html | 1 + app/templates/trade.html | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 app/templates/trade.html diff --git a/app/main/routes.py b/app/main/routes.py index a5c8c69..c1164e8 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -62,6 +62,11 @@ def explore(): posts=posts.items, next_url=next_url, prev_url=prev_url) +@bp.route('/trade') +@login_required +def trade(): + return render_template('trade.html', title=_('Trade')) + @bp.route('/user/<username>') @login_required diff --git a/app/templates/base.html b/app/templates/base.html index eacee92..6f54d79 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -20,6 +20,7 @@ <ul class="nav navbar-nav"> <li><a href="{{ url_for('main.index') }}">{{ _('Home') }}</a></li> <li><a href="{{ url_for('main.explore') }}">{{ _('Explore') }}</a></li> + <li><a href="{{ url_for('main.trade') }}">{{ _('Trade') }}</a></li> </ul> {% if g.search_form %} <form class="navbar-form navbar-left" method="get" action="{{ url_for('main.search') }}"> diff --git a/app/templates/trade.html b/app/templates/trade.html new file mode 100644 index 0000000..83b1227 --- /dev/null +++ b/app/templates/trade.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block app_content %} +<h1>{{ _('Trade') }}</h1> + <div class="btn-group btn-group-toggle" data-toggle="buttons"> + <label class="btn btn-secondary active"> + <input type="radio" name="options" id="limit" autocomplete="off" checked> Limit + </label> + <label class="btn btn-secondary"> + <input type="radio" name="options" id="market" autocomplete="off"> Market + </label> + <label class="btn btn-secondary"> + <input type="radio" name="options" id="cond." autocomplete="off"> Cond. + </label> + </div> + <form> + <div class="form-group"> + <label for="exampleInputEmail1">Ticker</label> + <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="ETHBTC"> + <small id="emailHelp" class="form-text text-muted">Please enter a symbol</small> + </div> + </form> +{% endblock %}