allianceauth/docs/development/custom/custom-themes.md
2023-12-26 21:23:37 +10:00

20 lines
466 B
Markdown

# Theme Hooks
The theme hook allows custom themes to be loaded dynamically by AAs CSS/JS Bundles, as selected by Users.
To register a ThemeHook class you would do the following:
```python
@hooks.register('theme_hook')
def register_darkly_hook():
return ThemeHook()
```
The `ThemeHook` class specifies some parameters/instance variables required.
```{eval-rst}
.. autoclass:: allianceauth.theme.hooks.ThemeHook
:members: __init__
:undoc-members:
```