commit
07d2f3a124
@ -57,6 +57,11 @@ def make_flask_callbacks(app):
|
|||||||
"atat_permissions": [],
|
"atat_permissions": [],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@app.template_filter('iconSvg')
|
||||||
|
def iconSvg(name):
|
||||||
|
with open('static/icons/'+name+'.svg') as contents:
|
||||||
|
return contents.read()
|
||||||
|
|
||||||
|
|
||||||
def map_config(config):
|
def map_config(config):
|
||||||
return {
|
return {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% macro Icon(name, classes="") -%}
|
{% macro Icon(name, classes="") -%}
|
||||||
{% autoescape false %}
|
{% autoescape false %}
|
||||||
<span class="icon icon--{{name}} {{classes}}" aria-hidden="true">{{ svg }}</span>
|
<span class="icon icon--{{name}} {{classes}}" aria-hidden="true">{{ name | iconSvg }}</span>
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user