Skip to main content

A Django template tag for easy use of SVG sprites in templates.

Project description

django-svg-sprite

A Django template tag for easy use of SVG sprites in templates.

Quick start

  1. Add django_svg_sprite to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...,
        'django_svg_sprite',
    ]
    
  2. Set the SVG_SPRITE setting to the SVG sprite file in your static files to be used, e.g.:

    SVG_SPRITE = 'bootstrap-icons.svg'
    
  3. 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.

License

This project is licensed under the MIT license.

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

django_svg_sprite-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

django_svg_sprite-0.2.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file django_svg_sprite-0.2.0.tar.gz.

File metadata

  • Download URL: django_svg_sprite-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Windows/11

File hashes

Hashes for django_svg_sprite-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e044e3b17cc8ad607388d094d76c878b137845a93855612a680ce714a6a2ec92
MD5 dd642358039b8cafe281df8a58788eff
BLAKE2b-256 3c750f309e4bb3fa2f3d6c1e38166b3ffff24cf70d5564960cbfa2f6642b7b04

See more details on using hashes here.

File details

Details for the file django_svg_sprite-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: django_svg_sprite-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Windows/11

File hashes

Hashes for django_svg_sprite-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3d9c0c0e2bd3f18285e6c439ddb2d7d095bf20e350fc083f7534b5957423532
MD5 0fc9fb5b45e964d41f0bbdde9056b9f3
BLAKE2b-256 439f63898171b647abdc0d3e6e84eed17a13a923712127c4fb6155e7e44b66ed

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