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,8 +20,8 @@
</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">

View File

@ -5,8 +5,16 @@
{% 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>
</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> <p>
What next? Here are some ideas: What next? Here are some ideas:
</p> </p>
@ -17,9 +25,23 @@
<li>Already have an account? Login on the right.</li> <li>Already have an account? Login on the right.</li>
</ul> </ul>
</p> </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">
<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. Login with callsign (uppercase) and password.
</p>
<form method="post" action="{% url "login" %}" class="uniForm"> <form method="post" action="{% url "login" %}" class="uniForm">
{% csrf_token %} {% csrf_token %}
{{ loginForm|crispy }} {{ loginForm|crispy }}
@ -28,15 +50,12 @@
</div> </div>
</form> </form>
</div> </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,10 +3,12 @@
{% 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> -->
<div class="panel panel-primary">
<div class="panel-heading">Login</div>
<div class="panel-body">
<p> <p>
Don't have an account? <a href="{% url 'register' %}">Register here!</a> Don't have an account? <a href="{% url 'register' %}">Register here!</a>
</p> </p>
@ -18,9 +20,11 @@
{% 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>
<!-- <!--
<div class="row"> <div class="row">

View File

@ -1,18 +1,25 @@
{% 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">
<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' %}"> <form method="POST" action="{% url 'register' %}">
{% csrf_token %} {% csrf_token %}
<table> {{ form|crispy }}
{{ form.as_table }} <input type="submit" value="Register">
</table>
<input type="submit" value="Create User">
</form> </form>
</div> </div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}