Skip to main content

Add extra icons to your Wagtail project.

Project description

Wagtail Extra Icons

Add extra icons to your Wagtail project.

Install

pip install wagtailextraicons

Then add wagtailextraicons to your installed apps:

INSTALLED_APPS = [
    ...
    'wagtailextraicons'
]

Usage

The full list of icons is available at docs/icons.md. All icons are namespaced as extraicons-- to avoid clashing with existing Wagtail icons. You can add the extra icons to your StreamField blocks like any other:

content = StreamField([
    (
        'paragraph',
        blocks.RichTextBlock(icon='extraicons--paragraph')
    ),
])

You can also add the extra icons to your own custom StructBlock classes:

class PersonBlock(blocks.StructBlock):
    person = SnippetChooserBlock('app.Person')
    text = blocks.RichTextBlock()

    class Meta:
        icon = 'extraicons--person'

Reference the Wagtail docs for all the ways to include icons.

Authors

Contributing

The icon fonts are compiled from the list of SVG files in static_src/wagtailextraicons/extraicons. This makes it very easy to add new icons. All that's needed is an appropriate SVG file, so pull requests with new icons are always welcome. There are a few constraints on the icons however:

  • The icons must fit within their view box. Icons which don't will cause the fonts view box to have negative values, which results in invalid .ttf and .woff files.
  • Try to avoid using strokes, rects, etc. in your SVG. Some of these may work, but plain paths will always work, so prefer paths where possible.
  • Don't set colours on your SVG.

Code pull requests are also welcome.

License

This project is licensed under the BSD License - see the LICENSE.md file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtailextraicons-0.1.3.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

wagtailextraicons-0.1.3-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file wagtailextraicons-0.1.3.tar.gz.

File metadata

  • Download URL: wagtailextraicons-0.1.3.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3

File hashes

Hashes for wagtailextraicons-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ad4c05f79e980ea066b7b5b8b3bbe7dd509181db9dca1a34e42ebaaa5838c6a4
MD5 6cc8ed2e55093050b0c7dc081615358a
BLAKE2b-256 13c2a15ff5a872fb6fcdef4a4123a0f00d1d00bfaccbaf3bfcdfa0e171241f37

See more details on using hashes here.

File details

Details for the file wagtailextraicons-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: wagtailextraicons-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3

File hashes

Hashes for wagtailextraicons-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 84998767b5a9142b48e05be00cfb15402e9ea5d239bd7ca730d9c72d36e2bf1c
MD5 e21ef3cff09bd34a1a12e4828799f516
BLAKE2b-256 9b7ba0a3bc278626a802f132562f7ad6089fbb351a8e8ed66369d957fc30598d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page