Commit dd06fbae authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Added local ttf for icon-font. Fixes #1

parent b96335f7
#!/usr/bin/env python3
from flask import Flask, g, current_app, request, session, flash, redirect, url_for, abort
from flask import Flask, g, current_app, request, session, flash, redirect, url_for, abort, render_template, Response
from flask.ext.login import login_user, logout_user, login_required, current_user
from flask.ext.principal import Principal, Identity, AnonymousIdentity, identity_changed, identity_loaded, UserNeed, RoleNeed
from flask.ext.script import Manager
......@@ -116,6 +116,10 @@ def register():
return redirect(url_for(".login"))
return render_layout("register.html", form=form)
def icon_font():
return Response(render_template("icon-font.css"), mimetype="text/css")
def on_identity_loaded(sender, identity):
# Set the identity user object
......@@ -2,7 +2,7 @@
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: local('Material Icons'), local('MaterialIcons-Regular'), url( format('truetype');
src: local('Material Icons'), local('MaterialIcons-Regular'), url({{ url_for('static', filename='font/icon-font.ttf') }}) format('truetype');
.material-icons {
......@@ -7,7 +7,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="description" content="moderation tool for handling speaking order">
<link rel="stylesheet" href="{{ url_for('static', filename='css/') }}" />
<link rel="stylesheet" href="{{ url_for('static', filename='font/icon-font.css') }}">
<link rel="stylesheet" href="{{ url_for('icon_font') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" />
<script src="{{ url_for('static', filename='js/material.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/sorttable.js') }}"></script>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment