From 3a01af59342108110a828068586b10d80e3bb243 Mon Sep 17 00:00:00 2001 From: Artur Borecki Date: Wed, 11 Mar 2026 11:14:38 +0100 Subject: [PATCH] chore: remove unneeded templates --- kursy/templates/allauth/elements/alert.html | 6 -- kursy/templates/allauth/elements/badge.html | 19 ---- kursy/templates/allauth/elements/button.html | 36 ------- .../allauth/elements/button__entrance.html | 6 -- .../allauth/elements/button_group.html | 5 - kursy/templates/allauth/elements/details.html | 9 -- kursy/templates/allauth/elements/field.html | 101 ------------------ kursy/templates/allauth/elements/fields.html | 13 --- kursy/templates/allauth/elements/form.html | 14 --- .../allauth/elements/form__entrance.html | 2 - kursy/templates/allauth/elements/h1.html | 5 - .../allauth/elements/h1__entrance.html | 5 - kursy/templates/allauth/elements/h2.html | 1 - .../allauth/elements/h2__entrance.html | 5 - kursy/templates/allauth/elements/hr.html | 1 - kursy/templates/allauth/elements/img.html | 5 - kursy/templates/allauth/elements/p.html | 1 - kursy/templates/allauth/elements/panel.html | 17 --- .../templates/allauth/elements/provider.html | 6 -- .../allauth/elements/provider_list.html | 5 - kursy/templates/allauth/elements/table.html | 7 -- kursy/templates/allauth/elements/tbody.html | 5 - kursy/templates/allauth/elements/td.html | 5 - kursy/templates/allauth/elements/th.html | 5 - kursy/templates/allauth/elements/thead.html | 5 - kursy/templates/allauth/elements/tr.html | 5 - kursy/templates/allauth/layouts/entrance.html | 26 ----- kursy/templates/allauth/layouts/manage.html | 68 ------------ kursy/templates/base.html | 12 ++- kursy/templates/profile.html | 14 +++ 30 files changed, 21 insertions(+), 393 deletions(-) delete mode 100644 kursy/templates/allauth/elements/alert.html delete mode 100644 kursy/templates/allauth/elements/badge.html delete mode 100644 kursy/templates/allauth/elements/button.html delete mode 100644 kursy/templates/allauth/elements/button__entrance.html delete mode 100644 kursy/templates/allauth/elements/button_group.html delete mode 100644 kursy/templates/allauth/elements/details.html delete mode 100644 kursy/templates/allauth/elements/field.html delete mode 100644 kursy/templates/allauth/elements/fields.html delete mode 100644 kursy/templates/allauth/elements/form.html delete mode 100644 kursy/templates/allauth/elements/form__entrance.html delete mode 100644 kursy/templates/allauth/elements/h1.html delete mode 100644 kursy/templates/allauth/elements/h1__entrance.html delete mode 100644 kursy/templates/allauth/elements/h2.html delete mode 100644 kursy/templates/allauth/elements/h2__entrance.html delete mode 100644 kursy/templates/allauth/elements/hr.html delete mode 100644 kursy/templates/allauth/elements/img.html delete mode 100644 kursy/templates/allauth/elements/p.html delete mode 100644 kursy/templates/allauth/elements/panel.html delete mode 100644 kursy/templates/allauth/elements/provider.html delete mode 100644 kursy/templates/allauth/elements/provider_list.html delete mode 100644 kursy/templates/allauth/elements/table.html delete mode 100644 kursy/templates/allauth/elements/tbody.html delete mode 100644 kursy/templates/allauth/elements/td.html delete mode 100644 kursy/templates/allauth/elements/th.html delete mode 100644 kursy/templates/allauth/elements/thead.html delete mode 100644 kursy/templates/allauth/elements/tr.html delete mode 100644 kursy/templates/allauth/layouts/entrance.html delete mode 100644 kursy/templates/allauth/layouts/manage.html diff --git a/kursy/templates/allauth/elements/alert.html b/kursy/templates/allauth/elements/alert.html deleted file mode 100644 index bf1ff38..0000000 --- a/kursy/templates/allauth/elements/alert.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load allauth %} - diff --git a/kursy/templates/allauth/elements/badge.html b/kursy/templates/allauth/elements/badge.html deleted file mode 100644 index d91c81c..0000000 --- a/kursy/templates/allauth/elements/badge.html +++ /dev/null @@ -1,19 +0,0 @@ -{% load allauth %} -{% setvar variant %} - {% if "warning" in attrs.tags %} - warning - {% elif "danger" in attrs.tags %} - danger - {% elif "secondary" in attrs.tags %} - secondary - {% elif "success" in attrs.tags %} - success - {% else %} - primary - {% endif %} -{% endsetvar %} - - {% slot %} - {% endslot %} - diff --git a/kursy/templates/allauth/elements/button.html b/kursy/templates/allauth/elements/button.html deleted file mode 100644 index cee5ff3..0000000 --- a/kursy/templates/allauth/elements/button.html +++ /dev/null @@ -1,36 +0,0 @@ -{% load allauth %} -{% comment %} djlint:off {% endcomment %} -<{% if attrs.href %}a href="{{ attrs.href }}"{% else %}button{% endif %} -{% if attrs.form %}form="{{ attrs.form }}"{% endif %} -{% if attrs.id %}id="{{ attrs.id }}"{% endif %} -{% if attrs.name %}name="{{ attrs.name }}"{% endif %} -{% if attrs.type %}type="{{ attrs.type }}"{% endif %} -{% if attrs.value %}value="{{ attrs.value }}"{% endif %} -class="{% block class %} - inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 - {% if "link" in attrs.tags %}bg-transparent p-0 text-blue-600 hover:text-blue-700 hover:underline focus:ring-blue-500 - {% else %} - {% if "prominent" in attrs.tags %}px-5 py-3 text-base{% elif "minor" in attrs.tags %}px-2.5 py-1.5 text-sm{% else %}px-4 py-2 text-sm{% endif %} - {% if "outline" in attrs.tags %} - border - {% if "danger" in attrs.tags %}border-red-600 text-red-600 hover:bg-red-50 focus:ring-red-500{% elif "secondary" in attrs.tags %}border-slate-500 text-slate-600 hover:bg-slate-100 focus:ring-slate-500{% elif "warning" in attrs.tags %}border-amber-500 text-amber-700 hover:bg-amber-50 focus:ring-amber-500{% else %}border-blue-600 text-blue-600 hover:bg-blue-50 focus:ring-blue-500{% endif %} - {% else %} - {% if "danger" in attrs.tags %}bg-red-600 text-white hover:bg-red-700 focus:ring-red-500{% elif "secondary" in attrs.tags %}bg-slate-600 text-white hover:bg-slate-700 focus:ring-slate-500{% elif "warning" in attrs.tags %}bg-amber-500 text-slate-900 hover:bg-amber-600 focus:ring-amber-500{% else %}bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500{% endif %} - {% endif %} - {% endif %}{% endblock %}"> - {% if "tool" in attrs.tags %} - {% if "delete" in attrs.tags %} - - - - - {% elif "edit" in attrs.tags %} - - {% endif %} - {% endif %} - -{% if not "tool" in attrs.tags %} -{% slot %} -{% endslot %} -{% endif %} - diff --git a/kursy/templates/allauth/elements/button__entrance.html b/kursy/templates/allauth/elements/button__entrance.html deleted file mode 100644 index b784039..0000000 --- a/kursy/templates/allauth/elements/button__entrance.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "allauth/elements/button.html" %} -{% load allauth %} -{% block class %} - {{ block.super }} - w-full -{% endblock %} diff --git a/kursy/templates/allauth/elements/button_group.html b/kursy/templates/allauth/elements/button_group.html deleted file mode 100644 index c282dc1..0000000 --- a/kursy/templates/allauth/elements/button_group.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} -
- {% slot %} - {% endslot %} -
diff --git a/kursy/templates/allauth/elements/details.html b/kursy/templates/allauth/elements/details.html deleted file mode 100644 index 607fe8e..0000000 --- a/kursy/templates/allauth/elements/details.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load allauth %} -
- - {% slot summary %} - {% endslot %} - - {% slot body %} - {% endslot %} -
diff --git a/kursy/templates/allauth/elements/field.html b/kursy/templates/allauth/elements/field.html deleted file mode 100644 index 9ce7b4d..0000000 --- a/kursy/templates/allauth/elements/field.html +++ /dev/null @@ -1,101 +0,0 @@ -{% load allauth %} -{% if attrs.type == "checkbox" or attrs.type == "radio" %} -
- - - {% if slots.help_text %} -
- {% slot help_text %} - {% endslot %} -
- {% endif %} -
-{% elif attrs.type == "textarea" %} -
- - -
-{% elif attrs.type == "hidden" %} - -{% elif attrs.type == "select" %} -
- {% if not attrs.unlabeled %} - - {% endif %} - - {% if attrs.unlabeled %} - - {% endif %} -
-{% else %} -
- {% if not attrs.unlabeled %} - - {% endif %} - - {% if attrs.unlabeled %} - - {% endif %} - {% if slots.help_text %} -
- {% slot help_text %} - {% endslot %} -
- {% endif %} - {% if attrs.errors %} - {% for error in attrs.errors %}{% endfor %} - {% endif %} -
-{% endif %} diff --git a/kursy/templates/allauth/elements/fields.html b/kursy/templates/allauth/elements/fields.html deleted file mode 100644 index 27f5da8..0000000 --- a/kursy/templates/allauth/elements/fields.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load allauth %} -{% for bound_field in attrs.form %} - {% element field unlabeled=attrs.unlabeled name=bound_field.name type=bound_field.field.widget.input_type required=bound_field.field.required value=bound_field.value id=bound_field.auto_id errors=bound_field.errors placeholder=bound_field.field.widget.attrs.placeholder tabindex=bound_field.field.widget.attrs.tabindex autocomplete=bound_field.field.widget.attrs.autocomplete style=bound_field.field.widget.attrs.style choices=bound_field.field.choices %} - {% slot label %} - {{ bound_field.label }} - {% endslot %} - {% if bound_field.field.help_text %} - {% slot help_text %} - {{ bound_field.field.help_text }} - {% endslot %} - {% endif %} - {% endelement %} -{% endfor %} diff --git a/kursy/templates/allauth/elements/form.html b/kursy/templates/allauth/elements/form.html deleted file mode 100644 index 9a5f6fa..0000000 --- a/kursy/templates/allauth/elements/form.html +++ /dev/null @@ -1,14 +0,0 @@ -{% load allauth %} -{% for err in attrs.form.non_field_errors %}{% endfor %} -
- {% if not attrs.no_visible_fields %}
{% endif %} - {% slot body %} - {% endslot %} - {% if not attrs.no_visible_fields %}
{% endif %} - {% if not attrs.no_visible_fields %}
{% endif %} - {% slot actions %} - {% endslot %} - {% if not attrs.no_visible_fields %}
{% endif %} -
diff --git a/kursy/templates/allauth/elements/form__entrance.html b/kursy/templates/allauth/elements/form__entrance.html deleted file mode 100644 index abb1a62..0000000 --- a/kursy/templates/allauth/elements/form__entrance.html +++ /dev/null @@ -1,2 +0,0 @@ -{% extends "allauth/elements/form.html" %} -{% block form_class %}{% endblock %} diff --git a/kursy/templates/allauth/elements/h1.html b/kursy/templates/allauth/elements/h1.html deleted file mode 100644 index f76e46f..0000000 --- a/kursy/templates/allauth/elements/h1.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} -

- {% slot %} - {% endslot %} -

diff --git a/kursy/templates/allauth/elements/h1__entrance.html b/kursy/templates/allauth/elements/h1__entrance.html deleted file mode 100644 index 1663419..0000000 --- a/kursy/templates/allauth/elements/h1__entrance.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} -

- {% slot %} - {% endslot %} -

diff --git a/kursy/templates/allauth/elements/h2.html b/kursy/templates/allauth/elements/h2.html deleted file mode 100644 index 48f9d1f..0000000 --- a/kursy/templates/allauth/elements/h2.html +++ /dev/null @@ -1 +0,0 @@ -{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/kursy/templates/allauth/elements/h2__entrance.html b/kursy/templates/allauth/elements/h2__entrance.html deleted file mode 100644 index 37fd291..0000000 --- a/kursy/templates/allauth/elements/h2__entrance.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} -

- {% slot %} - {% endslot %} -

diff --git a/kursy/templates/allauth/elements/hr.html b/kursy/templates/allauth/elements/hr.html deleted file mode 100644 index e123ba7..0000000 --- a/kursy/templates/allauth/elements/hr.html +++ /dev/null @@ -1 +0,0 @@ -
diff --git a/kursy/templates/allauth/elements/img.html b/kursy/templates/allauth/elements/img.html deleted file mode 100644 index a356bca..0000000 --- a/kursy/templates/allauth/elements/img.html +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/kursy/templates/allauth/elements/p.html b/kursy/templates/allauth/elements/p.html deleted file mode 100644 index 59c270c..0000000 --- a/kursy/templates/allauth/elements/p.html +++ /dev/null @@ -1 +0,0 @@ -{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/kursy/templates/allauth/elements/panel.html b/kursy/templates/allauth/elements/panel.html deleted file mode 100644 index 1fc867c..0000000 --- a/kursy/templates/allauth/elements/panel.html +++ /dev/null @@ -1,17 +0,0 @@ -{% load allauth %} -
-
-
- {% slot title %} - {% endslot %} -
- {% slot body %} - {% endslot %} -
- {% if slots.actions %} -
- {% slot actions %} - {% endslot %} -
- {% endif %} -
diff --git a/kursy/templates/allauth/elements/provider.html b/kursy/templates/allauth/elements/provider.html deleted file mode 100644 index cb9b2c3..0000000 --- a/kursy/templates/allauth/elements/provider.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load allauth %} -
  • - {{ attrs.name }} -
  • diff --git a/kursy/templates/allauth/elements/provider_list.html b/kursy/templates/allauth/elements/provider_list.html deleted file mode 100644 index 5752e12..0000000 --- a/kursy/templates/allauth/elements/provider_list.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} - diff --git a/kursy/templates/allauth/elements/table.html b/kursy/templates/allauth/elements/table.html deleted file mode 100644 index e8eed1b..0000000 --- a/kursy/templates/allauth/elements/table.html +++ /dev/null @@ -1,7 +0,0 @@ -{% load allauth %} -
    - - {% slot %} - {% endslot %} -
    -
    diff --git a/kursy/templates/allauth/elements/tbody.html b/kursy/templates/allauth/elements/tbody.html deleted file mode 100644 index ddbe91e..0000000 --- a/kursy/templates/allauth/elements/tbody.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} - - {% slot %} - {% endslot %} - diff --git a/kursy/templates/allauth/elements/td.html b/kursy/templates/allauth/elements/td.html deleted file mode 100644 index d4cc759..0000000 --- a/kursy/templates/allauth/elements/td.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} - - {% slot %} - {% endslot %} - diff --git a/kursy/templates/allauth/elements/th.html b/kursy/templates/allauth/elements/th.html deleted file mode 100644 index c344351..0000000 --- a/kursy/templates/allauth/elements/th.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} - - {% slot %} - {% endslot %} - diff --git a/kursy/templates/allauth/elements/thead.html b/kursy/templates/allauth/elements/thead.html deleted file mode 100644 index 6b22db7..0000000 --- a/kursy/templates/allauth/elements/thead.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} - - {% slot %} - {% endslot %} - diff --git a/kursy/templates/allauth/elements/tr.html b/kursy/templates/allauth/elements/tr.html deleted file mode 100644 index 78b99d5..0000000 --- a/kursy/templates/allauth/elements/tr.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load allauth %} - - {% slot %} - {% endslot %} - diff --git a/kursy/templates/allauth/layouts/entrance.html b/kursy/templates/allauth/layouts/entrance.html deleted file mode 100644 index 358c410..0000000 --- a/kursy/templates/allauth/layouts/entrance.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "allauth/layouts/base.html" %} -{% load i18n allauth %} -{% block body %} -
    -
    -
    -
    - {% if messages %} - {% for message in messages %} - {% element alert level=message.tags %} - {% slot message %} - {{ message }} - {% endslot %} - {% endelement %} - {% endfor %} - {% endif %} -
    -
    - {% block content %}{% endblock %} -
    -
    -
    -
    -
    -
    -{% endblock %} diff --git a/kursy/templates/allauth/layouts/manage.html b/kursy/templates/allauth/layouts/manage.html deleted file mode 100644 index f8cc372..0000000 --- a/kursy/templates/allauth/layouts/manage.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends "allauth/layouts/base.html" %} -{% load allauth %} -{% block body %} -
    - -
    -
    - {% if messages %} -
    - {% for message in messages %} - {% element alert level=message.tags %} - {% slot message %} - {{ message }} - {% endslot %} - {% endelement %} - {% endfor %} -
    - {% endif %} - {% block content %}{% endblock %} -
    -
    -
    -{% endblock %} diff --git a/kursy/templates/base.html b/kursy/templates/base.html index e967d44..10695c2 100644 --- a/kursy/templates/base.html +++ b/kursy/templates/base.html @@ -1,7 +1,7 @@ -{% load static i18n wagtailcore_tags wagtailuserbar tailwind_tags %} +{% load static i18n wagtailcore_tags wagtailuserbar tailwind_tags allauth_ui %} - + @@ -16,7 +16,8 @@ {% if page.search_description %} <meta name="description" content="{{ page.search_description }}" /> {% endif %} - <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> {# Force all links in the live preview panel to be opened in a new tab #} {% if request.in_preview_panel %} @@ -25,6 +26,7 @@ {# Global stylesheets #} <link rel="stylesheet" type="text/css" href="{% static 'css/kursy.css' %}"> + <link rel="stylesheet" href="{% static 'allauth_ui/output.css' %}"> {% tailwind_css %} {% block extra_css %} @@ -35,9 +37,8 @@ {% endblock extra_head %} </head> - <body class="flex grow flex-col h-screen {% block body_class %}{% endblock %}"> + <body class="flex grow flex-col min-h-screen {% block body_class %}{% endblock %}"> {% include "header.html" %} - {% wagtailuserbar %} {% block body %} {% block content %} @@ -52,5 +53,6 @@ {% block extra_js %} {# Override this in templates to add extra javascript #} {% endblock %} + {% wagtailuserbar %} </body> </html> diff --git a/kursy/templates/profile.html b/kursy/templates/profile.html index d25d9da..e6f9d72 100644 --- a/kursy/templates/profile.html +++ b/kursy/templates/profile.html @@ -4,5 +4,19 @@ {% block content %} <div class="container mx-auto px-4 py-8"> <h1 class="text-3xl font-bold mb-6">{% trans "Witaj, " %}{{ user.first_name }}!</h1> + <p class="text-xl">Twoje kursy:</p> + <ul class="list-disc list-inside mt-4"> + <!-- courses as cards --> + {% for course in courses %} + <li class="mb-4"> + <a href="{{ course.url }}" class="block p-4 bg-white rounded-lg shadow hover:bg-gray-50 transition"> + <h2 class="text-2xl font-semibold">{{ course.title }}</h2> + <p class="text-gray-600">{{ course.description }}</p> + </a> + </li> + {% empty %} + <li class="text-gray-600">Nie masz jeszcze żadnych kursów. <a href="/coursesTODO" class="text-blue-500 hover:underline">Znajdź kursy</a> dla siebie!</li> + {% endfor %} + </ul> </div> {% endblock %}