Skip to main content

A Python port of GitHub's Octicons, with Django support

Project description

A Python port of GitHub's Octicons for Django.

Octicons version: v8.0.0

To use, add 'octicons' to your INSTALLED_APPS list; then in your templates:

{% load octicons %}

{% octicon 'check' %}
<br />
{% octicon 'like' width=100 color="blue" class="facebook-like" %}
<br />
{% octicon 'gift' height="10" aria_label='This is a gift for you <3' %}

The first argument is the icon name, or an alias, the remaining arguments must be keyword arguments and they are added as-is(with some exceptions) to the output SVG. The exceptions are:

  • All values are conditionally escaped using Django's built-in conditional_escape function.
  • Any '_'s in the name of a keyword argument will be replaced unconditionally with '-'s
  • Specifying only one of the width or height will fill the other value in maintaining the aspect ratio.
  • Specifying class will cause the classes defined to be added to the two default classes(octicon and octicon-<name> where <name> is the name listed in the data-file; not necessarily the name given).
  • Adding aria-label(keyword argument aria_label) will remove the aria-hidden attribute and set role="img".

Project details

Download files

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

Files for octicons, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size octicons-0.1.tar.gz (29.6 kB) File type Source Python version None Upload date Hashes View
Filename, size octicons-0.1-py2.py3-none-any.whl (29.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page