Skip to content
Snippets Groups Projects
Commit dd06fbae authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Added local ttf for icon-font. Fixes #1

parent b96335f7
No related branches found
No related tags found
No related merge requests found
#!/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)
@app.route("/icon-font.css")
def icon_font():
return Response(render_template("icon-font.css"), mimetype="text/css")
@identity_loaded.connect_via(app)
def on_identity_loaded(sender, identity):
# Set the identity user object
......
File added
......@@ -2,7 +2,7 @@
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: local('Material Icons'), local('MaterialIcons-Regular'), url(https://fonts.gstatic.com/s/materialicons/v7/2fcrYFNaTjcS6g4U3t-Y5StnKWgpfO2iSkLzTz-AABg.ttf) 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/material.red-blue.min.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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment