UI module for Icon

This commit is contained in:
Andrew Croce
2018-07-17 14:42:05 -04:00
parent e2799f8458
commit 0de6322801
2 changed files with 9 additions and 2 deletions

7
atst/ui_modules.py Normal file
View File

@@ -0,0 +1,7 @@
from tornado.web import UIModule
class Icon(UIModule):
def render(self, name, classes=''):
with open('static/icons/%s.svg' % name) as svg:
return self.render_string(
"components/icon.html.to", svg=svg.read(), name=name, classes=classes)