diff --git a/Reskreen/settings.py b/Reskreen/settings.py index 3b1d559..892beaa 100644 --- a/Reskreen/settings.py +++ b/Reskreen/settings.py @@ -201,7 +201,10 @@ USE_L10N = False # https://docs.djangoproject.com/en/4.0/howto/static-files/ STATIC_URL = 'static/' -STATIC_ROOT = os.path.join(BASE_DIR, "static") + +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), +] # Default primary key field type @@ -220,7 +223,7 @@ JAZZMIN_SETTINGS = { "site_brand": "ClercNet", # Logo to use for your site, must be present in static files, used for brand on top left - "site_logo": None, + "site_logo": "img/logo_clerc_200.png", # CSS classes that are applied to the logo above "site_logo_classes": "img-circle", @@ -229,7 +232,7 @@ JAZZMIN_SETTINGS = { "site_icon": None, # Welcome text on the login screen - "welcome_sign": "Welcome to the ClercNet admin", + "welcome_sign": "Bienvenue sur le ClercNet", # Copyright on the footer "copyright": "Ambulance Clerc & Resk-U", @@ -320,7 +323,7 @@ JAZZMIN_SETTINGS = { # UI Tweaks # ############# # Relative paths to custom CSS/JS scripts (must be present in static files) - "custom_css": None, + "custom_css": "css/global.css", "custom_js": None, # Whether to show the UI customizer on the sidebar "show_ui_builder": True, diff --git a/static/css/global.css b/static/css/global.css new file mode 100644 index 0000000..aba1df5 --- /dev/null +++ b/static/css/global.css @@ -0,0 +1,10 @@ + + .cascading-right { + margin-right: -50px; + } + + @media (max-width: 991.98px) { + .cascading-right { + margin-right: 0; + } + } \ No newline at end of file diff --git a/static/img/login_bg.jpg b/static/img/login_bg.jpg new file mode 100644 index 0000000..2878259 Binary files /dev/null and b/static/img/login_bg.jpg differ diff --git a/static/img/login_bg_43.jpg b/static/img/login_bg_43.jpg new file mode 100644 index 0000000..f0170d6 Binary files /dev/null and b/static/img/login_bg_43.jpg differ diff --git a/Reskreen/static/img/logo.png b/static/img/logo.png similarity index 100% rename from Reskreen/static/img/logo.png rename to static/img/logo.png diff --git a/static/img/logo_clerc_200.png b/static/img/logo_clerc_200.png new file mode 100644 index 0000000..990b17a Binary files /dev/null and b/static/img/logo_clerc_200.png differ diff --git a/templates/admin/login.html b/templates/admin/login.html new file mode 100644 index 0000000..5c41ffc --- /dev/null +++ b/templates/admin/login.html @@ -0,0 +1,76 @@ +{% extends "registration/base.html" %} + +{% load i18n jazzmin %} +{% get_jazzmin_settings request as jazzmin_settings %} +{% get_jazzmin_ui_tweaks as jazzmin_ui %} + +{% block content %} +

{{ jazzmin_settings.welcome_sign }}

+
+ {% csrf_token %} + {% if user.is_authenticated %} +

+

+

+ {% blocktrans trimmed %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? + {% endblocktrans %} +

+
+

+ {% endif %} + {% if form.errors %} + {% if form.username.errors %} +
+

{{ form.username.label }}: {{ form.username.errors|join:', ' }}

+
+ {% endif %} + {% if form.password.errors %} +
+

{{ form.password.label }}: {{ form.password.errors|join:', ' }}

+
+ {% endif %} + {% if form.non_field_errors %} +
+ {% for error in form.non_field_errors %} +

{{ error }}

+ {% endfor %} +
+ {% endif %} + {% endif %} +
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ {% url 'admin_password_reset' as password_reset_url %} + {% if password_reset_url %} +
+ +
+ {% endif %} +
+
+ +
+
+
+{% endblock %} diff --git a/templates/admin/login_jazzmin.html b/templates/admin/login_jazzmin.html new file mode 100644 index 0000000..4bf19eb --- /dev/null +++ b/templates/admin/login_jazzmin.html @@ -0,0 +1,79 @@ +{% extends "registration/base.html" %} + +{% load i18n jazzmin %} +{% get_jazzmin_settings request as jazzmin_settings %} +{% get_jazzmin_ui_tweaks as jazzmin_ui %} + +{% block content %} +

{{ jazzmin_settings.welcome_sign }}

+
+ {% csrf_token %} + {% if user.is_authenticated %} +

+

+

+ {% blocktrans trimmed %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? + {% endblocktrans %} +

+
+

+ {% endif %} + {% if form.errors %} + {% if form.username.errors %} +
+

{{ form.username.label }}: {{ form.username.errors|join:', ' }}

+
+ {% endif %} + {% if form.password.errors %} +
+

{{ form.password.label }}: {{ form.password.errors|join:', ' }}

+
+ {% endif %} + {% if form.non_field_errors %} +
+ {% for error in form.non_field_errors %} +

{{ error }}

+ {% endfor %} +
+ {% endif %} + {% endif %} +
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ {% url 'admin_password_reset' as password_reset_url %} + {% if password_reset_url %} +
+ +
+ {% endif %} +
+
+ +
+
+
+{% endblock %} + + + diff --git a/templates/registration/base.html b/templates/registration/base.html new file mode 100644 index 0000000..805a178 --- /dev/null +++ b/templates/registration/base.html @@ -0,0 +1,104 @@ +{% load i18n static jazzmin admin_urls %} +{% get_current_language as LANGUAGE_CODE %} +{% get_current_language_bidi as LANGUAGE_BIDI %} +{% get_jazzmin_settings request as jazzmin_settings %} +{% get_jazzmin_ui_tweaks as jazzmin_ui %} + + + + + + + + + {% block title %}{{ title }} | {{ jazzmin_settings.site_title }}{% endblock %} + + + + + + + + + {% if jazzmin_ui.theme.name != 'default' %} + + {% endif %} + + {% if jazzmin_ui.dark_mode_theme %} + + {% endif %} + + + + + {% if jazzmin_settings.custom_css %} + + + {% endif %} + + + + + + {% if jazzmin_settings.use_google_fonts_cdn %} + + + {% endif %} + + {% block extrastyle %} {% endblock %} + {% block extrahead %} {% endblock %} + + + +
+ + + +
+
+
+
+ {% block content %} {% endblock %} +
+
+ +
+ +
+
+
+ +
+ + + + + + + + + +{% if jazzmin_settings.custom_js %} + +{% endif %} + + + + +