Skip to main content

Bootstrap 5 theme for Alliance Auth 5

Project description

Alliance Auth Zima Theme

PyPI version Python versions License: GPL-3.0-or-later

A theme for Alliance Auth 5 (Django 5.2 LTS, Bootstrap 5). It ships a self-contained Bootstrap 5 build with the Zima brand palette and restyles the public/login pages, delivered as a standard Python package.

Русская версия: README.ru.md.

Features

  • Dashboard theme via the AA5 theme selector. Registers two ThemeHooks — Zima Dark and Zima Light — that appear in the user's theme picker. Both share one stylesheet and switch through Bootstrap 5.3 colour modes (data-bs-theme).
  • Self-contained assets. Each theme serves its own Bootstrap 5 CSS and JS bundle from this package's static files; nothing is loaded from a CDN.
  • Restyled public pages. The login chain and the django-esi character-pick page are overridden with Bootstrap 5 layouts that match the theme.
  • Operator-configurable strings via an optional AA_THEME_ZIMA settings dict — no template forking required (see Configuration).
  • English and Russian translation catalogues.

Requirements

  • Alliance Auth >=5,<6
  • Python >=3.10,<3.15

Installation

pip install aa-theme-zima

To install the latest unreleased changes straight from the repository instead:

pip install git+https://gitlab.com/zima-corp/aa-theme-zima.git

Open your local.py and add the following right below your INSTALLED_APPS:

# Zima Theme - https://gitlab.com/zima-corp/aa-theme-zima
INSTALLED_APPS.insert(0, "aa_theme_zima")

Then collect the static files:

python manage.py collectstatic

Once installed, each user can pick Zima Dark or Zima Light from the theme selector in their Alliance Auth profile.

Configuration

The theme works without any configuration. To override a few operator-facing strings without forking the templates, add an optional AA_THEME_ZIMA dict to your local.py:

AA_THEME_ZIMA = {
    "OG_TITLE": "My Corp Auth",
    "OG_DESCRIPTION": "Authentication for My Corp.",
}
Key Default Description
OG_TITLE the AA SITE_NAME Open Graph title for social-card previews.
OG_DESCRIPTION Alliance Auth's default blurb Open Graph description for social-card previews.

Any key left unset keeps the theme's built-in default, so an out-of-the-box install renders exactly as shipped.

Default theme

Each user selects Zima Dark or Zima Light from their profile. Until a user makes a choice, Alliance Auth renders the theme named by its core DEFAULT_THEME setting (shipped as allianceauth.theme.flatly.auth_hooks.FlatlyThemeHook). To make a Zima variant the default for everyone who has not picked one yet, set DEFAULT_THEME in your local.py:

# Make Zima Dark the default for users who have not chosen a theme
DEFAULT_THEME = "aa_theme_zima.auth_hooks.ZimaDarkThemeHook"
Value Theme
aa_theme_zima.auth_hooks.ZimaDarkThemeHook Zima Dark
aa_theme_zima.auth_hooks.ZimaLightThemeHook Zima Light

DEFAULT_THEME is an Alliance Auth core setting, not a Zima one — it only sets the fallback; users can still switch to any installed theme from their profile. The public login pages are always Zima-styled regardless of this setting.

Upgrade

pip install --upgrade aa-theme-zima
python manage.py collectstatic

Using aa-gdpr

If you are using aa-gdpr, this theme's entry needs to come after the aa-gdpr entry:

# GDPR Compliance
INSTALLED_APPS.insert(0, "aagdpr")
AVOID_CDN = True

# Zima Theme - https://gitlab.com/zima-corp/aa-theme-zima
INSTALLED_APPS.insert(0, "aa_theme_zima")

Building from source

The CSS is not edited directly — it is compiled from sass/ with a gulp + dart-sass + PostCSS toolchain:

npm install          # one-time: gulp, postcss, bootstrap (SCSS source)
npm run compile      # compiles sass/ -> static CSS and vendors the Bootstrap JS bundle

The Python package is built with the uv build backend:

uv build             # produces a wheel and sdist in dist/

The package version is single-sourced in pyproject.toml; __version__ is derived at runtime from the installed distribution metadata.

Limitations

  • Alliance Auth 5 only. The templates target the AA5 / Bootstrap-5 theme-hook era; Alliance Auth 4 is not supported.
  • Run collectstatic after every install or upgrade — the theme serves its Bootstrap bundle and compiled CSS from this package's static files.
  • This is a presentation layer only: it adds no models, views, or URLs.

License

Distributed under the GPL-3.0-or-later license.

Changelog

See CHANGELOG.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aa_theme_zima-0.3.1.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aa_theme_zima-0.3.1-py3-none-any.whl (3.3 MB view details)

Uploaded Python 3

File details

Details for the file aa_theme_zima-0.3.1.tar.gz.

File metadata

  • Download URL: aa_theme_zima-0.3.1.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aa_theme_zima-0.3.1.tar.gz
Algorithm Hash digest
SHA256 d881dba3400df92d6443989f4592c6c9eb8d5de0ebdb214acbde48b5260642f5
MD5 b6ee435bd9d7737266d079178a60d728
BLAKE2b-256 4f5fac425cb96e9c6302a878c731a0d17a749002626997395b61757d124db755

See more details on using hashes here.

File details

Details for the file aa_theme_zima-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: aa_theme_zima-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aa_theme_zima-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 940c0eefcb867dca59d9dfef4d1ebb25ae771514a5c1fac28065b5fb40cee1a7
MD5 01eda3c83ffd0c0bb173427a1fdfc8a3
BLAKE2b-256 41ae4dbc44049cc55173724a08c557eea22eae0201c3a083ad2a48dc72938bfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page