diff --git a/app.py b/app.py index 6fbcdc6a5ebaf2eea959bf74050641d503496291_YXBwLnB5..0989278ead9a808e9387e1e90f51538cdd73a85e_YXBwLnB5 100755 --- a/app.py +++ b/app.py @@ -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 diff --git a/gulpfile.js b/gulpfile.js index 6fbcdc6a5ebaf2eea959bf74050641d503496291_Z3VscGZpbGUuanM=..0989278ead9a808e9387e1e90f51538cdd73a85e_Z3VscGZpbGUuanM= 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -47,7 +47,7 @@ .pipe(iconfontCss({ fontName: fontName, targetPath: '../../sass/iconfont/_icons.scss', - fontPath: '../../static/fonts/' + fontPath: '/fonts/' })) .pipe(iconfont({ fontName: fontName, diff --git a/sass/_font.scss b/sass/_font.scss index 6fbcdc6a5ebaf2eea959bf74050641d503496291_c2Fzcy9fZm9udC5zY3Nz..0989278ead9a808e9387e1e90f51538cdd73a85e_c2Fzcy9fZm9udC5zY3Nz 100644 --- a/sass/_font.scss +++ b/sass/_font.scss @@ -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'); }