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.contrib import admin
from django.urls import include from django.urls import include
from django.urls import path 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 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = [ urlpatterns = [
@ -25,6 +25,7 @@ urlpatterns = [
path('popular', popular, name='popular'), path('popular', popular, name='popular'),
path('hard', hard, name='hard'), path('hard', hard, name='hard'),
path('help', help, name='help'), path('help', help, name='help'),
path('help/<int:help_id>', helpp, name="helpp"),
path('users/', include("users.urls")), path('users/', include("users.urls")),
path('questions/', include("questions.urls")), path('questions/', include("questions.urls")),
path('answers/', include("answers.urls")), path('answers/', include("answers.urls")),

View File

@ -19,6 +19,11 @@ def home(request):
def help(request): def help(request):
return render(request, 'help-new.html', ) return render(request, 'help-new.html', )
def helpp(request, help_id):
return render(request, f'help_{help_id}.html', )
@login_required @login_required
def popular(request): def popular(request):
context = {} 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 { .sidenav a {
padding: 6px 8px 6px 16px; padding: 6px 8px 6px 16px;
text-decoration: none; text-decoration: none;mainTestContainer
font-size: 20px; font-size: 20px;
color: #FEEFE5; color: #FEEFE5;
display: block; display: block;
@ -95,6 +95,22 @@
height: 200px; 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 { .mainTestName {
font-weight: bold; font-weight: bold;
font-size: 20px; font-size: 20px;
@ -186,6 +202,19 @@
transform: translate(200%,0%); 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 { .solvedTestContainer button {
height: 30px; height: 30px;
width: 150px; width: 150px;
@ -288,6 +317,11 @@
text-decoration: inherit; text-decoration: inherit;
} }
.mainTournamentContainer a {
color: inherit;
text-decoration: inherit;
}
.mainTestDesc{ .mainTestDesc{
padding-bottom: 15px; padding-bottom: 15px;
text-align: center; text-align: center;

View File

@ -11,7 +11,7 @@
<a href="help/3">3. Tworzenie testów</a><br><br> <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/4">4. Edycja testów</a><br><br>
<a href="help/5">5. Przeglądanie historii 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> </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> <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"> <input type="submit" value="Wyszukaj">
</div> </div>
</form> </form>
{% if final_tournaments%} {% if final_tournaments%}
{% for tournament in final_tournaments%} {% for tournament in final_tournaments%}
{{forloop.counter}} <div class="mainTournamentRankingContainer">
tuniej: {{tournament.tournament__name}} <strong>Miejsce:</strong> {{forloop.counter}} <br>
wynik: {{tournament.score}} <strong>Nazwa turnieju:</strong> {{tournament.tournament__name}} <br>
gracz: {{tournament.user__email}} <strong>Gracz:</strong> {{tournament.user__email}} <br>
data: {{tournament.date|date:"d M Y"}} <strong>Wynik gracza:</strong> {{tournament.score}} <br>
<strong>Data wykonania testu:</strong> {{tournament.date|date:"d M Y"}}
</div>
<br> <br>
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@ -5,9 +5,9 @@
{% block content %} {% block content %}
<h1>Turnieje</h1> <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 %} {% for tournament in tournaments %}
<div class="mainTestContainer"> <div class="mainTournamentContainer">
<div class="mainTestName"> <div class="mainTestName">
{{tournament.name}} {{tournament.name}}
<!-- {% if test.password != "" %}--> <!-- {% if test.password != "" %}-->