diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-19 15:05:59 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-19 15:05:59 +0200 |
commit | 619e0e0f5263875b753334483d9b896194e9a61d (patch) | |
tree | 861b970de54b77ad715aa9d4177eaaad384c198a /templates/registration | |
parent | initial commit (diff) | |
download | scout-subs-619e0e0f5263875b753334483d9b896194e9a61d.tar.gz scout-subs-619e0e0f5263875b753334483d9b896194e9a61d.zip |
More data for users
Diffstat (limited to 'templates/registration')
-rw-r--r-- | templates/registration/base.html | 30 | ||||
-rw-r--r-- | templates/registration/base_custom.html | 55 | ||||
-rw-r--r-- | templates/registration/base_simple.html | 17 | ||||
-rw-r--r-- | templates/registration/login.html | 22 |
4 files changed, 114 insertions, 10 deletions
diff --git a/templates/registration/base.html b/templates/registration/base.html index 51dad17..f5a8a80 100644 --- a/templates/registration/base.html +++ b/templates/registration/base.html @@ -8,12 +8,36 @@ <title>{% block title %}Scout Brega{% endblock %}</title> </head> <body> - {% block nav %} - {% endblock %} + <nav> + <div class="nav-wrapper red lighten-1"> + {% block nav %} + {% endblock %} + <ul class="right"> + {% if user.is_staff %} + <li><a href="{% url 'server' %}">Pannello Admin</a></li> + {% endif %} + {% if user.is_authenticated %} + <li><a href="{% url 'personal' %}">{{ user.username }}</a></li> + {% endif %} + {% if user.username != "" %} + <li> + <a href="{% url 'logout' %}"><i class="material-icons">exit_to_app</i></a> + </li> + {% else %} + <li><a href="{% url 'signup' %}">Registrazione</a></li> + <li><a href="{% url 'login' %}">Login</a></li> + {% endif %} + </ul> + </div> + </nav> <main style="margin-left: 10px;margin-right: 10px;margin-top: 10px;"> {% block content %} {% endblock %} </main> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> + <script + src="https://code.jquery.com/jquery-3.5.1.min.js" + integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" + crossorigin="anonymous"></script> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> </body> </html>
\ No newline at end of file diff --git a/templates/registration/base_custom.html b/templates/registration/base_custom.html new file mode 100644 index 0000000..d38be7a --- /dev/null +++ b/templates/registration/base_custom.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> +<head> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <meta charset="utf-8"> + <title>{% block title %}Scout Brega{% endblock %}</title> +</head> +<body> + {% block nav %} + {% endblock %} + <main style="margin-left: 10px;margin-right: 10px;margin-top: 10px;"> + {% block content %} + {% endblock %} + </main> + <script + src="https://code.jquery.com/jquery-3.5.1.min.js" + integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" + crossorigin="anonymous"></script> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> + <script type="text/javascript"> + var elem = $('.tabs') + var options = { + yearRange:100, + format:'dd.mm.yyyy', + i18n: { + months: [ 'gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre' ], + monthsShort: [ 'gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic' ], + weekdays: [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab' ], + weekdaysAbbrev: [ 'D', 'L', 'M', 'M', 'G', 'V', 'S' ], + today: 'Oggi', + clear: 'Cancella', + close: 'Chiudi', + firstDay: 1, + format: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy/mm/dd', + labelMonthNext: 'Mese successivo', + labelMonthPrev: 'Mese precedente', + labelMonthSelect: 'Seleziona un mese', + labelYearSelect: 'Seleziona un anno' + }} + var instance = M.Tabs.init(elem, options); + document.addEventListener('DOMContentLoaded', function() { + var elems = document.querySelectorAll('.datepicker'); + var instances = M.Datepicker.init(elems, options); + }); + document.addEventListener('DOMContentLoaded', function() { + var elems = document.querySelectorAll('select'); + var instances = M.FormSelect.init(elems, options); + }); + </script> +</body> +</html>
\ No newline at end of file diff --git a/templates/registration/base_simple.html b/templates/registration/base_simple.html new file mode 100644 index 0000000..82087bc --- /dev/null +++ b/templates/registration/base_simple.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> + <meta charset="utf-8"> + <title>{% block title %}Scout Brega{% endblock %}</title> +</head> +<body> + <main style="margin-left: 10px;margin-right: 10px;margin-top: 10px;"> + {% block content %} + {% endblock %} + </main> + <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> +</body> +</html>
\ No newline at end of file diff --git a/templates/registration/login.html b/templates/registration/login.html index 71880b3..9459f93 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -1,12 +1,20 @@ -{% extends 'registration/base.html' %} +{% extends 'registration/base_simple.html' %} {% block title %}Login{% endblock %} {% block content %} -<h2>Login</h2> -<form method="post"> - {% csrf_token %} - {{ form.as_p }} - <button class="btn waves-effect waves-light" type="submit">Login</button> -</form> + <div class="row"> + <div class="col l4 offset-l4 m8 offset-m2 s12"> + <div class="card"> + <div class="card-content"> + <form method="post"> + {% csrf_token %} + {{ form.as_p }} + <br> + <button class="btn waves-effect waves-light" type="submit">Login</button> + </form> + </div> + </div> + </div> + </div> {% endblock %}
\ No newline at end of file |