Add webfonts

This commit is contained in:
Midgard 2019-03-28 01:33:23 +01:00
parent d80eeb775a
commit d435ea4620
10 changed files with 67242 additions and 1 deletions

View file

@ -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')

Binary file not shown.

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +1,20 @@
@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 {