This commit is contained in:
Hubert Jankowski 2022-06-08 23:24:17 +02:00
parent 4266adb76c
commit 072b67c9f0
9 changed files with 54 additions and 15 deletions

View File

@ -16,7 +16,7 @@ Including another URLconf
from django.contrib import admin
from django.urls import include
from django.urls import path
from .views import home, welcome, help, hard, popular
from .views import home, welcome, help, hard, popular, helpp
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = [
@ -25,6 +25,7 @@ urlpatterns = [
path('popular', popular, name='popular'),
path('hard', hard, name='hard'),
path('help', help, name='help'),
path('help/<int:help_id>', helpp, name="helpp"),
path('users/', include("users.urls")),
path('questions/', include("questions.urls")),
path('answers/', include("answers.urls")),

View File

@ -19,6 +19,11 @@ def home(request):
def help(request):
return render(request, 'help-new.html', )
def helpp(request, help_id):
return render(request, f'help_{help_id}.html', )
@login_required
def popular(request):
context = {}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

View File

@ -13,7 +13,7 @@
.sidenav a {
padding: 6px 8px 6px 16px;
text-decoration: none;
text-decoration: none;mainTestContainer
font-size: 20px;
color: #FEEFE5;
display: block;
@ -95,6 +95,22 @@
height: 200px;
}
.mainTournamentRankingContainer {
border-radius: 25px;
border: 2px solid #FF0B7E;
padding: 20px;
width: 350px;
height: 100px;
}
.mainTournamentContainer {
border-radius: 25px;
border: 2px solid #FF0B7E;
padding: 20px;
width: 450px;
height: 100px;
}
.mainTestName {
font-weight: bold;
font-size: 20px;
@ -186,6 +202,19 @@
transform: translate(200%,0%);
}
.mainTournamentContainer button {
height: 30px;
width: 85px;
color: #FFF;
font-size: 17px;
background: #00916E;
cursor: pointer;
border-radius: 25px;
border: none;
outline: none;
transform: translate(200%,0%);
}
.solvedTestContainer button {
height: 30px;
width: 150px;
@ -283,7 +312,12 @@
text-align: center;
}
.mainTestContainer a {
.mainTestContaine r a {
color: inherit;
text-decoration: inherit;
}
.mainTournamentContainer a {
color: inherit;
text-decoration: inherit;
}

View File

@ -11,7 +11,7 @@
<a href="help/3">3. Tworzenie testów</a><br><br>
<a href="help/4">4. Edycja testów</a><br><br>
<a href="help/5">5. Przeglądanie historii testów</a><br><br>
<a href="help/6">6. Rozwiązywanie testów</a>
<a href="help/6">6. Tryb turniejowy</a>
</div>
<h3>Mamy nadzieję, że nasza instrukcja jest pomocna i że będziesz mógł na spokojnie wykorzystać cały potencjał aplikacji i zabrać się za rozwiązywanie (lub tworzenie) nowych testów :)</h3>

View File

@ -16,17 +16,16 @@
<input type="submit" value="Wyszukaj">
</div>
</form>
{% if final_tournaments%}
{% for tournament in final_tournaments%}
{{forloop.counter}}
tuniej: {{tournament.tournament__name}}
wynik: {{tournament.score}}
gracz: {{tournament.user__email}}
data: {{tournament.date|date:"d M Y"}}
<br>
<div class="mainTournamentRankingContainer">
<strong>Miejsce:</strong> {{forloop.counter}} <br>
<strong>Nazwa turnieju:</strong> {{tournament.tournament__name}} <br>
<strong>Gracz:</strong> {{tournament.user__email}} <br>
<strong>Wynik gracza:</strong> {{tournament.score}} <br>
<strong>Data wykonania testu:</strong> {{tournament.date|date:"d M Y"}}
</div>
<br>
{% endfor %}
{% endif %}

View File

@ -5,9 +5,9 @@
{% block content %}
<h1>Turnieje</h1>
<button class="tournamentButton"><a href="{% url 'CreateTournament' %}">Stwórz nowy turniej</a></button><br>
<button class="tournamentButton"><a href="{% url 'CreateTournament' %}">Stwórz nowy turniej</a></button><br><br>
{% for tournament in tournaments %}
<div class="mainTestContainer">
<div class="mainTournamentContainer">
<div class="mainTestName">
{{tournament.name}}
<!-- {% if test.password != "" %}-->