Themes for Django-Allauth
Project description
Django Allauth Themes
Themes for django-allauth
Install
pip install django-allauth-themes
Settings
Add allauth_themes.bootstrap
before allauth
:
INSTALLED_APPS = [
...,
"allauth_themes.bootstrap",
"allauth",
...,
]
Customization
Bootswatch
You can achieve drastic changes with little effort using Bootswatch themes. Simply create a file in your templates directory to override the allauth/layouts/css.html
file, with the following CDN link
<link href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.3/dist/cerulean/bootstrap.min.css" rel="stylesheet">
You can change cerulean
to any of the available themes available on Bootswatch.com.
Custom CSS
Alternatively, you can customize Bootstrap as you like and use that:
<link rel="stylesheet" href="{% static 'css/custom_bootstrap.css' %}">
Layout Customization
The layouts work with all Bootswatch themes, but you may want to customize them. As an example, these minor tweaks to the layouts may help the content stand out more. However, it doesn't work well with all Bootswatch themes (like quartz and vapor), so it's not included in the default layouts:
<div class="d-flex flex-grow-1 flex-shrink-0 py-5 bg-body-secondary">
<div class="m-auto p-4 border shadow-lg bg-white">
{% block content %}{% endblock %}
</div>
</div>
To apply these or other customizations, override the HTML files in your templates directory: templates/allauth/layouts/entrance.html
. See it in action within the example project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_allauth_themes-0.1.2.tar.gz
.
File metadata
- Download URL: django_allauth_themes-0.1.2.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeff49b05daab816a7f3bde0524b83ac53fb8e34a93f6d6fd264c91b2d399518 |
|
MD5 | d31b9d59e2312fdf1fe9b89106315b2a |
|
BLAKE2b-256 | 37f315ae95519077e12911050500427d4c08565b644e8571f7d84541d02db50a |
File details
Details for the file django_allauth_themes-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: django_allauth_themes-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a915876d2c072995d895716b0379b1cdbf1b30dba9ff9a945dbda588c039b3ae |
|
MD5 | a99eb98f7bdbe145a86fa6334d35f38d |
|
BLAKE2b-256 | 285bc3f04bffa7569c6084ce7de2bcf57d776fbb38db8d5b40b5ae297e9bf27b |