Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/city-of-helsinki/wagtail-svgmap
ImageMap functionality for Wagtail through inline SVGs
https://github.com/city-of-helsinki/wagtail-svgmap
Last synced: about 2 months ago
JSON representation
ImageMap functionality for Wagtail through inline SVGs
- Host: GitHub
- URL: https://github.com/city-of-helsinki/wagtail-svgmap
- Owner: City-of-Helsinki
- License: bsd-3-clause
- Created: 2016-08-08T11:54:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-02T21:41:53.000Z (almost 7 years ago)
- Last Synced: 2024-11-02T17:36:30.699Z (2 months ago)
- Language: Python
- Size: 50.8 KB
- Stars: 13
- Watchers: 5
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wagtail-svgmap
> Image map functionality for Wagtail through inline SVGs
## Usage
### As a developer
* Add `wagtail_svgmap` to your `INSTALLED_APPS`
* Add a `wagtail_svgmap.blocks.ImageMapBlock()` to a `StreamField` in your page class#### Settings
* `WAGTAIL_SVGMAP_IE_COMPAT`: Whether or not to wrap the rendered SVGs in special markup
for compatibility with legacy Internet Explorers. Enabled
by default; disabling leads to slightly nicer markup.### As an end user
#### Using the Wagtail Admin
* If `wagtail.contrib.modeladmin` is enabled, `ImageMap` objects can be created
from the Wagtail admin (look for "Image Maps" in the menu).
Once you've selected an SVG file, you can create region objects to set which
pages/documents/external URLs each discovered ID should link to.#### Using the Django Admin
* Use the Django admin interface to create `ImageMap` objects.
Once you've selected an SVG file, you can then set which pages/documents/external URLs
each discovered ID should link to.#### In pages
* In a page that has an `ImageMapBlock`-enabled stream field, select the image map to use.
You can also additionally set a CSS class to wrap the field with. Ask your friendly
neighborhood designer for more information.## Development
* Use `py.test` for testing.