Django templatetags for GitHub's Octicons.
Project description
# django-octicons
[![Build Status](https://travis-ci.org/sanketsaurav/django-octicons.svg?branch=master)](https://travis-ci.org/sanketsaurav/django-octicons)
Template tags for Django to use [GitHub Octicons](https://octicons.github.com/).
## Installation
Grab it from PyPI using pipenv (or pip):
```sh
$ pipenv install django-octicons
```
Install the app in your project:
```python
# settings.py
INSTALLED_APPS = [
# other apps
'octicons.apps.OcticonsConfig'
]
```
## Usage
Load the tag library in your HTML template:
```html
{% load octicons %}
```
And then, you can use the icons like this:
```html
<a class="btn btn-sm" href="#url" role="button">
{% octicon "eye" %}
Watch
</a>
```
You can also pass any required attributes:
```html
<a class="btn btn-sm" href="#url" role="button">
{% octicon "thumbsup" height="60" class="large" %}
Confirm Purchase
</a>
```
All attributes passed will be added as HTML attributes to the SVG element
of the icon.
### Styling
You should add the following in your styles:
```css
.octicon {
display: inline-block;
vertical-align: text-top;
fill: currentColor;
}
```
The class `octicon` will be present in all icons. You are free to style it however you want.
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
django-octicons-1.0.0.tar.gz
(29.5 kB
view details)
Built Distribution
File details
Details for the file django-octicons-1.0.0.tar.gz
.
File metadata
- Download URL: django-octicons-1.0.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdfa6101389cd82a1a5b18fba0478248651831023eee5ab4d625e4dfd446b70a |
|
MD5 | 4d93d2df496f3de65d8ce852285824da |
|
BLAKE2b-256 | b8d8452d0ebc78dc6eb9eaf89969db61850711eff76068a89491db120e82f854 |
File details
Details for the file django_octicons-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_octicons-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd2382bc6daaaffbaa57e09ae6f1ff4179217a20e0ee5f5f3ced30d3c44e7c1 |
|
MD5 | e225bcc49c16d1d814d42a560bd96bdf |
|
BLAKE2b-256 | 38191a2f7c83a542255f71687e63da4a467a9201cfa2d4be0782ac53c1e32d04 |