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
orheight
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
andocticon-<name>
where<name>
is the name listed in the data-file; not necessarily the name given). - Adding
aria-label
(keyword argumentaria_label
) will remove thearia-hidden
attribute and setrole="img"
.
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
octicons-0.1.tar.gz
(29.6 kB
view hashes)
Built Distribution
octicons-0.1-py2.py3-none-any.whl
(29.9 kB
view hashes)
Close
Hashes for octicons-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a5be41ef2ab69e7a944a93c7d1760258d5023f5e0fed16ea3845d557132be4e |
|
MD5 | b628f6dc5d68c58a1e696088fed9f2c7 |
|
BLAKE2b-256 | 4f3a82fc0d7b93d0576f2a7810cac9bf45eb3dd8a9a8c7c0bd7e2df8b4d54a43 |