diff --git a/django/library/forms.py b/django/library/forms.py index b4d711c..f455876 100644 --- a/django/library/forms.py +++ b/django/library/forms.py @@ -6,6 +6,14 @@ class QuizForm(forms.ModelForm): model = QivipQuiz fields = ['name', 'description', 'status', 'category','difficulty','credits'] + def __init__(self, *args, **kwargs): + super(QuizForm, self).__init__(*args, **kwargs) + for field in self.fields.values(): + field.widget.attrs.update({ + 'class': 'dark:bg-[#2a2f3a]! dark:text-white' + }) + + class QuestionForm(forms.ModelForm): class Meta: model = QivipQuestion @@ -34,5 +42,5 @@ class QuizFilterForm(forms.Form): required=False, label="Kategorie", widget=forms.Select(attrs={ - 'class': 'border-2 border-gray-300 rounded-lg p-2 w-full' + 'class': 'border-2 border-gray-300 rounded-lg p-2 w-full dark:bg-[#2a2f3a] dark:text-white' })) \ No newline at end of file diff --git a/django/static/css/t-input.css b/django/static/css/t-input.css index 726280d..666e567 100644 --- a/django/static/css/t-input.css +++ b/django/static/css/t-input.css @@ -17,7 +17,7 @@ a.qp-a-button-small { .register input{@apply p-3 rounded-full bg-gray-200 focus:scale-105 transition duration-200 font-black w-full;} .input-group { - @apply flex flex-col gap-4 max-w-md mx-auto p-6 bg-white rounded-xl shadow-lg; + @apply flex flex-col gap-4 max-w-md mx-auto p-6 bg-white rounded-xl shadow-lg; } .input-group form { diff --git a/django/templates/404.html b/django/templates/404.html index bdb7592..da27217 100644 --- a/django/templates/404.html +++ b/django/templates/404.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block content %} -
+
-

Seite nicht gefunden

-

Ups, die angeforderte Seite wurde nicht gefunden. Überprüfen Sie die URL oder kehren Sie zur Startseite zurück.

+

Seite nicht gefunden

+

Ups, die angeforderte Seite wurde nicht gefunden. Überprüfen Sie die URL oder kehren Sie zur Startseite zurück.

-
+
+

Willkommen, {{ request.user.username }}!

@@ -18,16 +18,16 @@
-
+
-
+
Erfolge
-
    +
    • {{ my_quizzes_number }} Quizze erstellt
    • {{ my_questions_number }} Fragen insgesamt erstellt
    @@ -37,7 +37,7 @@
- qivip + qivip
diff --git a/django/templates/accounts/login.html b/django/templates/accounts/login.html index 90fda41..23b04e5 100644 --- a/django/templates/accounts/login.html +++ b/django/templates/accounts/login.html @@ -4,7 +4,7 @@ {% block content %}
-

Anmeldung

+

Anmeldung

{% if form.errors %}
diff --git a/django/templates/accounts/register.html b/django/templates/accounts/register.html index 8b3820d..b1afe9f 100644 --- a/django/templates/accounts/register.html +++ b/django/templates/accounts/register.html @@ -4,7 +4,7 @@
-

Registrieren

+

Registrieren

{% if form.errors %} diff --git a/django/templates/base.html b/django/templates/base.html index eac8bb6..b5f2fd8 100644 --- a/django/templates/base.html +++ b/django/templates/base.html @@ -1,6 +1,6 @@ {% load static %} - + @@ -75,5 +75,6 @@ + \ No newline at end of file diff --git a/django/templates/homepage/home.html b/django/templates/homepage/home.html index 894c152..2aa3640 100644 --- a/django/templates/homepage/home.html +++ b/django/templates/homepage/home.html @@ -6,7 +6,7 @@

qivip

weil Lernen auch Spaß
machen kann!

-
+
Teilnehmen Moderieren Erstellen @@ -25,13 +25,13 @@ {% if faqs %}
-

FAQs

+

FAQs

-
+

@@ -43,7 +43,7 @@

{% for faq in faqs %} -
+
{{ faq.question }} diff --git a/django/templates/homepage/impress.html b/django/templates/homepage/impress.html index 1d54f5a..660cc4e 100644 --- a/django/templates/homepage/impress.html +++ b/django/templates/homepage/impress.html @@ -1,8 +1,8 @@ {% extends 'base.html' %} {% block content%} -
-
+
+

Impressum

@@ -12,7 +12,7 @@
- qivip + qivip
diff --git a/django/templates/homepage/privacy.html b/django/templates/homepage/privacy.html index 30a0d91..1175107 100644 --- a/django/templates/homepage/privacy.html +++ b/django/templates/homepage/privacy.html @@ -2,7 +2,7 @@ {% block content%}
-
+

Datenschutz-
erklärung

@@ -12,7 +12,7 @@
- qivip + qivip
diff --git a/django/templates/library/delete_confirmation.html b/django/templates/library/delete_confirmation.html index ecb3254..b170f6d 100644 --- a/django/templates/library/delete_confirmation.html +++ b/django/templates/library/delete_confirmation.html @@ -3,15 +3,15 @@ {% block content %}
-
+
-

Löschen bestätigen

+

Löschen bestätigen

-

+

{% if object.quiz_id %} Möchten Sie die Frage "{{ object.data.question }}" wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden. {% else %} diff --git a/django/templates/library/detail_quiz.html b/django/templates/library/detail_quiz.html index 865a982..20deecb 100644 --- a/django/templates/library/detail_quiz.html +++ b/django/templates/library/detail_quiz.html @@ -4,21 +4,21 @@

-
-

{{ quiz.name }}

+
+

{{ quiz.name }}

-
+
{% if quiz.user_id == request.user %} - + - + @@ -54,13 +54,13 @@
{% if quiz.description %} -

{{ quiz.description }}

+

{{ quiz.description }}

{% endif %}
{% if detail == True %} -
+
@@ -71,7 +71,7 @@ {% else %} -
+
@@ -85,7 +85,7 @@
-
+

Fragen @@ -123,7 +123,7 @@ -
+

{{ forloop.counter }}.

{% if quiz.user_id == request.user %} {% endif %}
@@ -144,7 +144,7 @@ {% for option in question.data.options %} -
  • +
  • {% if option.is_correct %} @@ -152,10 +152,10 @@ {{ option.value }} {% else %} - + - {{ option.value }} + {{ option.value }} {% endif %}
  • {% endfor %} @@ -173,7 +173,7 @@ - {{ option.value }} + {{ option.value }} {% endfor %} @@ -186,7 +186,7 @@ {% for option in question.data.options %} {% if option.is_correct %}

    - Richtige Antwort: + Richtige Antwort: {{ option.value }}

    {% endif %} @@ -209,7 +209,7 @@
    {% if quiz.user_id == request.user %} - + {% endif %} @@ -236,32 +236,32 @@
    {% if quiz.base_quiz %} -

    Kopie von: {{ quiz.base_quiz}}

    +

    Kopie von: {{ quiz.base_quiz}}

    {% endif %}
    {% if quiz.base_quiz %} -

    Autor: {{ quiz.base_quiz.user_id }}

    +

    Autor: {{ quiz.base_quiz.user_id }}

    {% endif %}
    -

    Credits:

    +

    Credits:

    {% if quiz.credits %} -

    - {{ quiz.credits }} - (Credits für das Quiz) +

    + {{ quiz.credits }} + (Credits für das Quiz)

    {% else %} -

    Keine Credits für das Quizformular vorhanden!

    +

    Keine Credits für das Quizformular vorhanden!

    {% endif %}
    @@ -270,13 +270,13 @@