EmbedSVG
icons instead of icon fonts
#1776
Labels
area: backend
This issue involves Python, Django or dependency (eg. database)
area: frontend
This issue involves JavaScript, React.js and Node
new feature
New feature
Looks like I was mistaken about insisting to keep using icon font in Misago, with "better" practice being embedding SVG directly in the document.
Pros:
The plan
Create a new
misago.icons
app that will implementIconLoader
class that will load icons by name into memory and will return theirSVG
markup. Icons will be located inmisago/icons/tabler
directory, but plugins should be able to tell the loader "hey, also look for icons in my ownmaterialdesign
directory"Also implement
{% icon "tabler/name" %}
template tag that will call this icon loader and return desired icon's SVG or raise an error.{% icon "tabler/name" optional %}
shouldn't raise an error if icon could not be found.The text was updated successfully, but these errors were encountered: