Django templatetags for GitHub Octicons v10.0.0.
Project description
django-octicons-v10
Django templatetags for GitHub Octicons v10.0.0.
This library aims to provide a similar interface to the official (Jekyll, Ruby, etc.) octicon libraries provided by GitHub, but as Django templatetags.
django-octicons is a library that already does this, but currently for an older version of octicons.
Installation
Upgrade pip:
pip install --upgrade pip
Install the latest version:
pip install django-octicons-v10
Place octicons_v10
into your installed apps:
INSTALLED_APPS = [
# blah, blah, other apps...
"octicons_v10",
]
Usage
Load the octicons
tag library in your Django template:
{% load octicons %}
Use template tags where you want to place an Octicon:
{% octicon "git-branch" %}
Classes
You can pass classes to your shiny new octicon:
<a class="btn">
{% octicon "git-branch" class="text-purple" %}
Branches
</a>
Note: The following classes are assigned to the octicon by default:
octicon
octicon-{ICON_NAME}
, for exampleocticon-git-branch
Sizing
You can pass width
or height
or both for your desired size:
<a href="#" class="Header-link">
{% octicon "mark-github" width="32" %}
GitHub
</a>
If only width
or height
is passed, then the other scales accordingly.
Note: The default size is 16px by 16px.
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
Hashes for django-octicons-v10-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3b40c7fad4e99228a1bf86c3c9d077652c7ea8658b097f2940a1f254b81db3c |
|
MD5 | 165dc2635e9440e4676e4b0bc9bde384 |
|
BLAKE2b-256 | 7eac474d46fb8b32593d6dd40a3c4e8c52f62605b66bcc33556c81a2f7f392a0 |