Commit d435ea46 authored by midgard's avatar midgard

Add webfonts

parent d80eeb77
......@@ -187,6 +187,14 @@ def get_robots():
return send_file('static/robots.txt')
@app.route('/fonts/<filename>', methods=['GET'])
def get_font(filename):
if not re.fullmatch(r'[a-zA-Z0-9][a-zA-Z0-9._-]*\.(?:otf|svg|woff2?)', filename):
return abort(404)
return send_file('static/fonts/' + filename)
@app.route('/quotes.css', methods=['GET'])
def get_quote_css():
return send_file('static/quotes.css')
......
This diff is collapsed.
This diff is collapsed.
@font-face {
font-family: "Fira Sans";
src: local("Fira Sans"), local("Fira Sans Regular"), url(FiraSans-Regular.otf);
font-weight: normal;
src: local("Fira Sans"), local("Fira Sans Regular"),
url(/fonts/FiraSans-Regular.otf) format("opentype"),
url(/fonts/FiraSans-Regular.woff2) format("woff2"),
url(/fonts/FiraSans-Regular.woff) format("woff"),
url(/fonts/FiraSans-Regular.svg) format("svg");
}
@font-face {
font-family: "Fira Sans";
font-weight: bold;
src: local("Fira Sans"), local("Fira Sans Bold"),
url(/fonts/FiraSans-Bold.otf) format("opentype"),
url(/fonts/FiraSans-Bold.woff2) format("woff2"),
url(/fonts/FiraSans-Bold.woff) format("woff"),
url(/fonts/FiraSans-Bold.svg) format("svg");
}
body {
......
Markdown is supported
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