Skip to content

neon-jungle/wagtail-icomoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A convenience package for adding IcoMoon icons to the Wagtail admin. At the moment only includes the general purpose icons, but could be extended.

Installation

pip install wagtail-icomoon

Then add the following to your settings.py:

INSTALLED_APPS = (
    ...
    'wagtail_icomoon',
    ...
)

Usage

Icons are prefixed with im- to avoid clashes with existing icons.

e.g. for a streamfield block

from wagtail.core import blocks

class DemoBlock(blocks.CharBlock):
    class Meta:
        icon = 'im-camera'


# or as part of the initialisation of a StreamField
body = StreamField([
    ('demo', blocks.CharBlock(icon='im-star')),
])

In a template

{% load wagtailadmin_tags %}
{% icon name="im-wrench" classname="..." title="Fix" %}

For a complete list of icons, see the IcoMoon website, or check the templates/icons directory of this project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages