website restyling, minor fixes

This commit is contained in:
Arthur Gerbaud
2016-08-13 16:40:43 +02:00
parent 8bac5d8bd4
commit 46b807ec1e
36 changed files with 390 additions and 407 deletions

View File

@@ -5,19 +5,18 @@
<title>{% block title %}La maraude{% endblock %}</title>
{% if stylesheets %}{% for stylesheet in stylesheets %}<link rel="stylesheet" type="text/css" href="{% static stylesheet %}" />{% endfor %}{% endif %}
{# Load CSS and JavaScript #}{% bootstrap_css %}{% bootstrap_javascript %}
<link href="/static/bootstrap/navbar-fixed-side.css" rel="stylesheet" />
</head>
<body>
{% block globalnav %}{% endblock %}
<div class="container">
<div class="container-fluid">
<div class="row">
{% if panels %}<div class="col-md-8">{% else %}<div class="col-md-12">{% endif %}
{% bootstrap_messages %}
<div class="page-header"><h1>{% block page_header %}Header{% endblock %}</h1></div>
<div class="col-sm-4 col-md-4 col-lg-2">
{% include "navbar.html" %}
</div>
<div class="col-sm-8 col-md-8 col-lg-10">
<h1 class="page-header">{% block page_header %}{% endblock %}</h1>
{% block content %}{% endblock %}
</div>
{% if panels %}<div class="col-md-4" id="sidebar">
{% block panels %}{% endblock %}
</div>{% endif %}
</div>
</div>
</body>

View File

@@ -3,13 +3,6 @@
{% block title %}{{ page_title }}{% endblock %}
{% block page_header %}{{ page_header }} <small>{{ page_header_small }}</small>{% endblock %}
{% block globalnav %}
<div class="row">
<div class="col-md-12">
{% include "navbar.html" %}
</div>
</div>
{% endblock %}
{% block content %}{% include content_template %}{% endblock %}

View File

@@ -5,13 +5,6 @@
{# Tweak columns layout for login box %}
{% block panels %}<div class="col-md-8 col-md-offset-2">{% endblock %}
{% block page_header %}
<div class="jumbotron bg-warning">
<h2>ALSA - Projet Maraude</h2>
<p>Description de la maraude...</p>
</div>
{% endblock %}
{% block content %}
<div class="panel panel-primary">
<div class="panel-heading"><h3 class="panel-title">Connexion</h3></div>

View File

@@ -1,38 +1,12 @@
{% load bootstrap3 %}
<div class="col-md-12 col-lg-6">
<div class="jumbotron">
<h2>Objectifs</h2>
<p>Description de la maraude à destination des visiteurs, partenaires, etc...</p>
<h2>Nous rencontrer</h2>
{% block content %}
{% bootstrap_messages %}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Maraude ALSA</h3></div>
<div class="panel-body text-center">
{% if user.is_authenticated %}
<p>Bienvenue {{ user }} !</p>
<div class="btn-group">
<a href="{% url 'maraudes:index' %}" class="btn btn-primary">Entrer</a>
{% if user.is_superuser %}
<a href="admin/" class="btn btn-warning">Administration</a>
{% endif %}
<p>Les maraudeurs arpentent les rues de Mulhouse les <b>lundis</b>, <b>mardis</b> et <b>jeudis</b> en soirée,
et les <b>vendredis</b> en fin d'après-midi.
</p>
<p>Ils sont reconnaissables à leur vestes oranges, n'hésitez pas à les interpeller.</p>
</div>
{% else %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
{% if next %}
{% if user.is_authenticated %}
<div class="alert alert-warning"><p>Your account doesn't have access to this page. To proceed,
please login with an account that has access.</p></div>
{% else %}
<div class="alert alert-danger"><p>Veuillez vous connecter pour accéder à cette page.</p></div>
{% endif %}
{% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
{% bootstrap_form form %}
{% bootstrap_button "Connexion" button_type="submit" button_class="btn-lg btn-primary" %}
<input type="hidden" name="next" value="{{ next|default:'maraudes/' }}" />
</form>
{% endif %}
</div>
<div class="panel-footer"><p>version: 0.01</p></div>
</div>
{% endblock %}
</div>

View File

@@ -1,25 +1,45 @@
{% load bootstrap3 %}{% load staticfiles %}
<nav class="navbar navbar-inverse navbar-static-top" role="navigation" id="menu">
<nav class="navbar navbar-inverse navbar-fixed-side" role="navigation" id="menu">
<div class="container">
<ul class="nav navbar-nav navbar-left">{% for app in apps %}
<li {% if app == active_app %} class="active" {%endif%}>
<a href="/{{app.label}}/">{{ app.name|title }}</a>
</li>{%endfor%}
</ul>
{% if prochaine_maraude_abs %}<p class="navbar-text">{% bootstrap_icon "calendar" %} <b>Prochaine maraude :</b>
{% if prochaine_maraude_abs.date == now.date %} Aujourd'hui {% else %} {{ prochaine_maraude_abs.date }} {% endif %}
- {{ prochaine_maraude_abs.heure_debut.hour }}h</p>{%endif%}
<!-- Navbar Right Aligned elements -->
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a id="UserMenu" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% bootstrap_icon "user" %} {{user}} <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="UserMenu">
{% if user.is_authenticated %}{% if user.is_superuser %}<li><a href="/admin/">Administration</a></li>
<li role="separator" class="divider"></li>{% endif %}
<li><a href="{% url 'logout' %}">Déconnecter</a></li>{% endif %}
</ul>
</li>
</ul>
<div class="navbar-header">
<button class="navbar-toggle" data-target=".navbar-collapse" data-toggle="collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'index' %}">La Maraude ALSA</a>
</div>{% if user.is_authenticated %}
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">{% for app in apps %}
<li {% if app == active_app %} class="active" {%endif%}>
<a href="/{{app.label}}/"><strong style="color:#fff;">{{ app.name|title }}</strong></a>
</li>
{% if app == active_app %}{% for t in app_menu %}{% include t %}{% endfor %}{% endif %}
{%endfor%}
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a id="UserMenu" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% bootstrap_icon "user" %} {{user}} <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="UserMenu">
{% if user.is_superuser %}<li><a href="/admin/">Administration {% bootstrap_icon "new-window" %} </a></li>{% endif %}
<li><a href="{% url 'logout' %}">Déconnecter {% bootstrap_icon "log-out" %}</a></li>
</ul>
</li>
</ul>
</div>
{% else %}
<div class="collapse navbar-collapse">
<div class="text-center navbar-text"><h4 style="color:#fff;">Connexion</h4></div>
<form class="navbar-form navbar-left" method="post" action="{% url 'login' %}">
<div class="form-group text-center">{% csrf_token %}
<input autofocus="" class="form-control" id="id_username" maxlength="254" name="username" placeholder="Nom d&#39;utilisateur" title="" type="text" required />
<input class="form-control" id="id_password" name="password" placeholder="Mot de passe" title="" type="password" required />
<input type="hidden" name="next" value="{{ next|default:'/maraudes/' }}" /><br />
<button class="btn btn-default" type="submit">Se connecter</button>
</div>
</form>
</div>{% endif %}
</div>
</nav>