Design the page
This commit is contained in:
parent
78e18d6dc1
commit
b01ed31e45
|
@ -56,26 +56,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</head>
|
</head>
|
||||||
<body class="d-flex w-100 h-100 flex-column">
|
<body class="d-flex w-100 h-100 flex-column">
|
||||||
<main class="mb-auto">
|
<main class="mb-auto">
|
||||||
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-navbar shadow-sm">
|
|
||||||
<a class="navbar-brand" href="/">{{ request.site.name }}</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
|
||||||
data-target="#navbarNavDropdown"
|
|
||||||
aria-controls="navbarNavDropdown" aria-expanded="false"
|
|
||||||
aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
{% if not user.is_authenticated %}
|
|
||||||
<li class="nav-item active">
|
|
||||||
<a class="nav-link" href="{% url 'login' %}">
|
|
||||||
<i class="fa fa-sign-in"></i> Se connecter
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<div class="container-fluid my-3" style="max-width: 1600px;">
|
<div class="container-fluid my-3" style="max-width: 1600px;">
|
||||||
{% block contenttitle %}<h1>{{ title }}</h1>{% endblock %}
|
{% block contenttitle %}<h1>{{ title }}</h1>{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -83,43 +63,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer class="bg-light mt-auto py-2">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm">
|
|
||||||
<form action="{% url 'set_language' %}" method="post"
|
|
||||||
class="form-inline">
|
|
||||||
<span class="text-muted mr-1">
|
|
||||||
Tombola Saper[list]popette —
|
|
||||||
<a href="mailto:tresorie.bde@lists.crans.org"
|
|
||||||
class="text-muted">Nous contacter</a> —
|
|
||||||
</span>
|
|
||||||
{% csrf_token %}
|
|
||||||
<select title="language" name="language"
|
|
||||||
class="custom-select custom-select-sm"
|
|
||||||
onchange="this.form.submit()">
|
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
|
||||||
{% get_available_languages as LANGUAGES %}
|
|
||||||
{% get_language_info_list for LANGUAGES as languages %}
|
|
||||||
{% for language in languages %}
|
|
||||||
<option value="{{ language.code }}"
|
|
||||||
{% if language.code == LANGUAGE_CODE %}
|
|
||||||
selected{% endif %}>
|
|
||||||
{{ language.name_local }} ({{ language.code }})
|
|
||||||
</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
<noscript>
|
|
||||||
<input type="submit">
|
|
||||||
</noscript>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm text-right">
|
|
||||||
<a href="#" class="text-muted">Retour en haut</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
{% block extrajavascript %}
|
{% block extrajavascript %}
|
||||||
{% endblock extrajavascript %}
|
{% endblock extrajavascript %}
|
||||||
|
|
|
@ -7,16 +7,40 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
Old:
|
<div style="">
|
||||||
{% for reward in old_rewards %}
|
<div class="alert alert-danger" style="width: 15%; float: left; margin: 1%;">
|
||||||
{{ reward.name }} (won by {{ previous_reward.rewarded_by.note }}, ticket n°{{ previous_reward.rewarded_by.number }})<br />
|
<strong>Lots déjà offerts :</strong>
|
||||||
{% endfor %}
|
<ul>
|
||||||
Previous: {{ previous_reward.name }} (won by {{ previous_reward.rewarded_by.note }}, ticket n°{{ previous_reward.rewarded_by.number }})<br />
|
{% for reward in old_rewards %}
|
||||||
Current: {{ current_reward.name }}<br />
|
<li><strong>{{ reward.name }} :</strong> remporté par {{ reward.rewarded_by.note }} (ticket n° {{ reward.rewarded_by.number }})</li>
|
||||||
Next:
|
{% endfor %}
|
||||||
{% for reward in next_rewards %}
|
</ul>
|
||||||
{{ reward.name }}<br />
|
</div>
|
||||||
{% endfor %}
|
|
||||||
|
<div class="alert alert-warning" style="width: 30%; float: left; margin: 1%;">
|
||||||
|
<strong>Lot précédent :</strong><br />
|
||||||
|
<strong>{{ previous_reward.name }} :</strong> remporté par {{ previous_reward.rewarded_by.note }}
|
||||||
|
(ticket n° {{ previous_reward.rewarded_by.number }})<br />
|
||||||
|
|
||||||
|
<img src="{{ previous_reward.image.url }}" alt="{{ previous_reward.name }}" style="width: 100%;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-info" style="width: 30%; float: left; margin: 1%;">
|
||||||
|
<strong>Lot suivant :</strong><br />
|
||||||
|
<strong>{{ current_reward.name }}</strong><br />
|
||||||
|
|
||||||
|
<img src="{{ current_reward.image.url }}" alt="{{ previous_reward.name }}" style="width: 100%;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-success" style="width: 15%; float: left; margin: 1%;">
|
||||||
|
<strong>Lots à venir :</strong>
|
||||||
|
<ul>
|
||||||
|
{% for reward in next_rewards %}
|
||||||
|
<li><strong>{{ reward.name }}</strong></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrajavascript %}
|
{% block extrajavascript %}
|
||||||
|
|
|
@ -166,6 +166,9 @@ STATIC_ROOT = os.path.realpath(__file__)
|
||||||
STATICFILES_DIRS = [
|
STATICFILES_DIRS = [
|
||||||
os.path.join(BASE_DIR, 'static')]
|
os.path.join(BASE_DIR, 'static')]
|
||||||
|
|
||||||
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||||
|
MEDIA_URL = '/media/'
|
||||||
|
|
||||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap4.html'
|
DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap4.html'
|
||||||
# URL prefix for static files.
|
# URL prefix for static files.
|
||||||
|
|
|
@ -15,8 +15,10 @@ Including another URLconf
|
||||||
1. Import the include() function: from django.urls import include, path
|
1. Import the include() function: from django.urls import include, path
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
|
from . import settings
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.contrib.staticfiles.urls import static
|
||||||
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
@ -25,3 +27,6 @@ urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('', include('tbde.urls')),
|
path('', include('tbde.urls')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
urlpatterns += staticfiles_urlpatterns()
|
||||||
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
Loading…
Reference in New Issue