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.
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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b525feb4b447c16340dcf8965b37f411b2e14e12d97d5dcc516f9fb7459f1c1 |
|
MD5 | 08e1ba07006d829ed60c975cb77692b0 |
|
BLAKE2b-256 | 466e15b49a8c5b6828e780365a20f604aa169d2f0284f7c5fa7bbac49de7c511 |