A wagtail package to add Twitter s Bootstrap Icons to administration
Project description
wagtailtwbsicons
A wagtail package to add Twitter's Bootstrap Icons to administration icons list.
Currently using Bootstrap Icons v1.11.3, works with Wagtail > 3 (use 1.0.0 for older wagtail versions)
Install
pip install wagtailtwbsicons
Usage
- Add wagtailtwbsicons to INSTALLED_APPS in your project settings
INSTALLED_APPS = [
...
'wagtailtwbsicons',
...
]
- Have a look to the available list of icons and use the last class provided for web font in the regular Wagtail way (ex: for person-square icon, the website provide to use "bi bi-person-square" class, so we need to use "bi-person-square")
class PersonBlock(blocks.StructBlock):
first_name = blocks.CharBlock()
...
class Meta:
icon = 'bi-person-square'
Using wagtailtwbsicons as an optionnal dependency
from django.apps import apps
class PersonBlock(blocks.StructBlock):
first_name = blocks.CharBlock()
...
class Meta:
if apps.is_installed('wagtailtwbsicons'):
icon = 'bi-person-square'
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
wagtailtwbsicons-1.0.1.tar.gz
(318.6 kB
view hashes)
Built Distribution
Close
Hashes for wagtailtwbsicons-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffae42b6439236a78363dae75f965088a4df6a75c0e403e5e9b906c944b3bed |
|
MD5 | 713157a3fd85a9b219e952b134ba46f0 |
|
BLAKE2b-256 | d7244c45f56357303a968f16bcd987526ba6ff61d9a2f28246178b3f025b33a0 |