include webfont

This commit is contained in:
2020-12-01 22:13:14 +01:00
parent 62f252130e
commit c4746d2306
2 changed files with 16 additions and 4 deletions

View File

@ -28,6 +28,20 @@ def css(req, resp, file):
resp.content = fin.read()
@api.route("/js-cardgame/font/{file}")
def css(req, resp, file):
resp.headers['Content-Type'] = 'application/octet-stream'
full_file = os.path.join(
os.path.dirname(__file__),
'..',
'js-cardgame',
file
)
with open(full_file, 'rb') as fin:
resp.content = fin.read()
@api.route("/js-cardgame/js/{file}")
def css(req, resp, file):
resp.headers['Content-Type'] = 'application/javascript'