A Django template tag for easy use of SVG sprites in templates.
https://tmb.codeberg.page/django-svg-sprite/
All checks were successful
Update Docs / docs (push) Successful in 32s
See #13. Reviewed-on: #17 Co-authored-by: Tobias Bölz <tobias@boelz.eu> Co-committed-by: Tobias Bölz <tobias@boelz.eu> |
||
---|---|---|
.forgejo/workflows | ||
.githooks | ||
django_svg_sprite | ||
docs | ||
example | ||
.flake8 | ||
.gitignore | ||
CHANGELOG.md | ||
LICENSE | ||
mkdocs.yml | ||
noxfile.py | ||
poetry.lock | ||
pyproject.toml | ||
README.md |
django-svg-sprite
A Django template tag for easy use of SVG sprites in templates.
Quick start
-
Add
django_svg_sprite
to yourINSTALLED_APPS
setting like this:INSTALLED_APPS = [ ..., 'django_svg_sprite', ]
-
Set the
SVG_SPRITE
setting to the SVG sprite file in your static files to be used, e.g.:SVG_SPRITE = 'bootstrap-icons.svg'
-
Use the tag in your template, e.g.:
{% load svg_sprite %} {% svg_sprite 'hand-thumbs-up' fill='yellow' class='bi' %}
See settings and template tags documentation for details.
Commercial support
Commercial support, including feature development, is available. Get in contact.
License
This project is licensed under the MIT license.