Skip to content
Snippets Groups Projects
Commit 0989278ead9a authored by Cédric Krier's avatar Cédric Krier :atom:
Browse files

Use redirect for font path

This allows to add timestamp parameter.
parent 6fbcdc6a5eba
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
make_response, abort)
from flask.logging import default_handler
from flask_caching import Cache
from flask_cdn import CDN
from flask_cdn import CDN, url_for as cdn_url_for
from flask_gravatar import Gravatar
from flask_sitemap import Sitemap
from icalendar import Calendar
......@@ -544,6 +544,11 @@
return render_template('service_providers_start.html')
@app.route('/fonts/<name>')
def fonts(name):
return redirect(cdn_url_for('static', filename='fonts/' + name))
@app.errorhandler(HTTPStatus.NOT_FOUND)
def not_found(error):
return render_template('not_found.html'), HTTPStatus.NOT_FOUND
......
......@@ -47,7 +47,7 @@
.pipe(iconfontCss({
fontName: fontName,
targetPath: '../../sass/iconfont/_icons.scss',
fontPath: '../../static/fonts/'
fontPath: '/fonts/'
}))
.pipe(iconfont({
fontName: fontName,
......
......@@ -3,11 +3,11 @@
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 300;
src: url('../fonts/RobotoCondensed-Light.eot'); /* For IE6-8 */
src: url('../fonts/RobotoCondensed-Light.eot?#iefix') format('embedded-opentype'),
url('../fonts/RobotoCondensed-Light.woff') format('woff'),
url('../fonts/RobotoCondensed-Light.otf') format('truetype'),
url('../fonts/RobotoCondensed-Light.ttf') format('truetype');
src: url('/fonts/RobotoCondensed-Light.eot'); /* For IE6-8 */
src: url('/fonts/RobotoCondensed-Light.eot?#iefix') format('embedded-opentype'),
url('/fonts/RobotoCondensed-Light.woff') format('woff'),
url('/fonts/RobotoCondensed-Light.otf') format('truetype'),
url('/fonts/RobotoCondensed-Light.ttf') format('truetype');
}
@font-face {
......@@ -15,11 +15,11 @@
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 400;
src: url('../fonts/RobotoCondensed-Regular.eot'); /* For IE6-8 */
src: url('../fonts/RobotoCondensed-Regular.eot?#iefix') format('embedded-opentype'),
url('../fonts/RobotoCondensed-Regular.woff') format('woff'),
url('../fonts/RobotoCondensed-Regular.otf') format('truetype'),
url('../fonts/RobotoCondensed-Regular.ttf') format('truetype');
src: url('/fonts/RobotoCondensed-Regular.eot'); /* For IE6-8 */
src: url('/fonts/RobotoCondensed-Regular.eot?#iefix') format('embedded-opentype'),
url('/fonts/RobotoCondensed-Regular.woff') format('woff'),
url('/fonts/RobotoCondensed-Regular.otf') format('truetype'),
url('/fonts/RobotoCondensed-Regular.ttf') format('truetype');
}
@font-face {
......@@ -27,9 +27,9 @@
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 700;
src: url('../fonts/RobotoCondensed-Bold.eot'); /* For IE6-8 */
src: url('../fonts/RobotoCondensed-Bold.eot?#iefix') format('embedded-opentype'),
url('../fonts/RobotoCondensed-Bold.woff') format('woff'),
url('../fonts/RobotoCondensed-Bold.otf') format('truetype'),
url('../fonts/RobotoCondensed-Bold.ttf') format('truetype');
src: url('/fonts/RobotoCondensed-Bold.eot'); /* For IE6-8 */
src: url('/fonts/RobotoCondensed-Bold.eot?#iefix') format('embedded-opentype'),
url('/fonts/RobotoCondensed-Bold.woff') format('woff'),
url('/fonts/RobotoCondensed-Bold.otf') format('truetype'),
url('/fonts/RobotoCondensed-Bold.ttf') format('truetype');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment