Template layout enhancement

This commit is contained in:
Sebastian Lohff 2017-01-20 17:29:21 +01:00 committed by root
parent a97878f78e
commit 5f3953ef8b
4 changed files with 98 additions and 68 deletions

View File

@ -5,8 +5,8 @@
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">The Contest</h3></div>
<div class="panel-body"> <div class="panel-body">
<div class="panel-heading">The Contest</div>
<p> <p>
Welcome to {{ contest.name }}! Welcome to {{ contest.name }}!
<p/> <p/>
@ -20,29 +20,29 @@
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">QRGs</h3></div>
<div class="panel-body"> <div class="panel-body">
<div class="panel-heading">QRGs</div> <p>The following frequencies may be used in this contest</p>
<p>The following frequencies may be used in this contest</p> <table class="table table-inverse">
<table class="table table-inverse"> <thead class="thead-inverse">
<thead class="thead-inverse"> <tr>
<tr> <th>Channel</th>
<th>Channel</th> <th>Band</th>
<th>Band</th> <th>QRG</th>
<th>QRG</th> <th>Note</th>
<th>Note</th> </tr>
</tr> </thead>
</thead> <tbody>
<tbody> {% for qrg in qrgs %}
{% for qrg in qrgs %} <tr>
<tr> <td>{{ qrg.channel }}</td>
<td>{{ qrg.channel }}</td> <td>{{ qrg.band }}</td>
<td>{{ qrg.band }}</td> <td>{{ qrg.qrg }}</td>
<td>{{ qrg.qrg }}</td> <td>{{ qrg.note }}</td>
<td>{{ qrg.note }}</td> </tr>
</tr> {% endfor %}
{% endfor %} </tbody>
</tbody> </table>
</table>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,38 +5,57 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-12">
<p class="lead">Hello and welcome to the 2nd DK0TU CQ TU contest, the CQ TU 2107!</p> <p class="lead">Hello and welcome to the 2nd DK0TU CQ TU contest, the CQ TU 2107!</p>
<p> </div>
What next? Here are some ideas: </div>
</p>
<p> <div class="row">
<ul> <div class="col-sm-6">
<li>If you want to review the contest rules, take a look at <a href="{% url "contest:overview" %}">the contest overview page</a></li> <div class="panel panel-default">
<li>Need an account and already got a call? <a href="{% url "register" %}">Register here</a>!</li> <div class="panel-heading"><h3 class="panel-title">Participate</h3></div>
<li>Already have an account? Login on the right.</li> <div class="panel-body">
</ul> <p>
</p> What next? Here are some ideas:
</p>
<p>
<ul>
<li>If you want to review the contest rules, take a look at <a href="{% url "contest:overview" %}">the contest overview page</a></li>
<li>Need an account and already got a call? <a href="{% url "register" %}">Register here</a>!</li>
<li>Already have an account? Login on the right.</li>
</ul>
</p>
<p>
Und nun noch ein Wort von unserem Sponsor:
<blockquote>
Serverbasierte Loesung finde ich nach eingem Ueberlegen doof.
<footer>DL7BST</footer>
</blockquote>
</p>
</div>
</div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
Login with callsign (uppercase) and password. <div class="panel panel-default">
<form method="post" action="{% url "login" %}" class="uniForm"> <div class="panel-heading"><h3 class="panel-title">Login</h3></div>
{% csrf_token %} <div class="panel-body">
{{ loginForm|crispy }} <p>
<div class="form-actions"> Login with callsign (uppercase) and password.
<button type="submit" class="btn btn-primary">Login</button> </p>
<form method="post" action="{% url "login" %}" class="uniForm">
{% csrf_token %}
{{ loginForm|crispy }}
<div class="form-actions">
<button type="submit" class="btn btn-primary">Login</button>
</div>
</form>
</div> </div>
</form> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
Und nun noch ein Wort von unserem Sponsor:
<blockquote>
Serverbasierte Loesung finde ich nach eingem Ueberlegen doof.
<footer>DL7BST</footer>
</blockquote>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -3,23 +3,27 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
<h2>Welcome!</h2>
<div class="row"> <div class="row">
<div class="col-sm-4 col-sm-offset-4"> <div class="col-sm-4 col-sm-offset-4">
<h2 class="text-center">Please login</h2> <!-- <h2 class="text-center">Please login</h2> -->
<p> <div class="panel panel-primary">
Don't have an account? <a href="{% url 'register' %}">Register here!</a> <div class="panel-heading">Login</div>
</p> <div class="panel-body">
<p> <p>
Trouble logging in? Remember that your call is all upper-case. Don't have an account? <a href="{% url 'register' %}">Register here!</a>
</p> </p>
<p>
Trouble logging in? Remember that your call is all upper-case.
</p>
<form action="{% url "login" %}" method="post" class="uniForm"> <form action="{% url "login" %}" method="post" class="uniForm">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button type="submit" class="btn btn-default" value="Login">Login</button> <button type="submit" class="btn btn-primary" value="Login">Login</button>
</form> </form>
</div>
</div>
</div> </div>
</div> </div>
<!-- <!--

View File

@ -1,17 +1,24 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load crispy_forms_tags %}
{% block content %} {% block content %}
<h2>Welcome!</h2>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
I have {{ call_count }} callsigns in my Database! <div class="panel panel-default">
<form method="POST" action="{% url 'register' %}"> <div class="panel-heading">Registration</div>
{% csrf_token %} <div class="panel-body">
<table> <p>
{{ form.as_table }} Please register with your (uppercase) Callsign as Usernames.
</table> For DN-Calls, /[A-Z] is allowed.
<input type="submit" value="Create User"> </p>
</form> <form method="POST" action="{% url 'register' %}">
{% csrf_token %}
{{ form|crispy }}
<input type="submit" value="Register">
</form>
</div>
</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}