Add webfonts
This commit is contained in:
parent
d80eeb775a
commit
d435ea4620
10 changed files with 67242 additions and 1 deletions
|
@ -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')
|
||||
|
|
BIN
app/static/fonts/FiraSans-Bold.otf
Normal file
BIN
app/static/fonts/FiraSans-Bold.otf
Normal file
Binary file not shown.
33771
app/static/fonts/FiraSans-Bold.svg
Normal file
33771
app/static/fonts/FiraSans-Bold.svg
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 2.7 MiB |
BIN
app/static/fonts/FiraSans-Bold.woff
Normal file
BIN
app/static/fonts/FiraSans-Bold.woff
Normal file
Binary file not shown.
BIN
app/static/fonts/FiraSans-Bold.woff2
Normal file
BIN
app/static/fonts/FiraSans-Bold.woff2
Normal file
Binary file not shown.
BIN
app/static/fonts/FiraSans-Regular.otf
Normal file
BIN
app/static/fonts/FiraSans-Regular.otf
Normal file
Binary file not shown.
33448
app/static/fonts/FiraSans-Regular.svg
Normal file
33448
app/static/fonts/FiraSans-Regular.svg
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 2.6 MiB |
BIN
app/static/fonts/FiraSans-Regular.woff
Normal file
BIN
app/static/fonts/FiraSans-Regular.woff
Normal file
Binary file not shown.
BIN
app/static/fonts/FiraSans-Regular.woff2
Normal file
BIN
app/static/fonts/FiraSans-Regular.woff2
Normal file
Binary file not shown.
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue