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

View File

@ -5,38 +5,57 @@
{% block content %}
<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>
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>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Participate</h3></div>
<div class="panel-body">
<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 class="col-sm-6">
Login with callsign (uppercase) and password.
<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 class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Login</h3></div>
<div class="panel-body">
<p>
Login with callsign (uppercase) and password.
</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>
</form>
</div>
</div>
</div>
<div class="row">
<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>
{% endblock %}

View File

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

View File

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