Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-octicons

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-octicons

Django templatetags for GitHub's Octicons.

  • 1.0.2
  • PyPI
  • Socket score

Maintainers
1

django-octicons

Build Status

Template tags for Django to use GitHub Octicons.

Installation

Grab it from PyPI using pipenv (or pip):

$ pipenv install django-octicons

Install the app in your project:

# settings.py

INSTALLED_APPS = [
    # other apps
    'octicons',
]

Usage

Load the tag library in your HTML template:

{% load octicons %}

And then, you can use the icons like this:

<a class="btn btn-sm" href="#url" role="button">
  {% octicon "eye" %}
  Watch
</a>

You can also pass any required attributes:

<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:

.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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc