changeset 2c392eaf9454 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset;node=2c392eaf9454
description:
        Keep redirect for static font

        otherwise preload is useless because of the timestamp parameter which 
is not
        in the CSS.
diffstat:

 app.py          |  11 +++++++----
 sass/_font.scss |  30 +++++++++++++++---------------
 2 files changed, 22 insertions(+), 19 deletions(-)

diffs (79 lines):

diff -r 699071b74405 -r 2c392eaf9454 app.py
--- a/app.py    Sat Jul 27 10:29:13 2019 +0200
+++ b/app.py    Sat Jul 27 10:52:44 2019 +0200
@@ -102,16 +102,19 @@
         'static', [], {'filename': 'css/screen.min.css'}, {
             'rel': 'preload', 'as': 'style', 'nopush': True}),
     LinkHeader(
-        'static', [], {'filename': 'fonts/RobotoCondensed-Light.woff'}, {
+        'fonts', [], {'name': 'RobotoCondensed-Light.woff'}, {
+            'rel': 'preload', 'as': 'font', 'nopush': True}),
+    LinkHeader(
+        'fonts', [], {'name': 'RobotoCondensed-Regular.woff'}, {
             'rel': 'preload', 'as': 'font', 'nopush': True}),
     LinkHeader(
-        'static', [], {'filename': 'fonts/RobotoCondensed-Regular.woff'}, {
+        'fonts', [], {'name': 'RobotoCondensed-Bold.woff'}, {
             'rel': 'preload', 'as': 'font', 'nopush': True}),
     LinkHeader(
-        'static', [], {'filename': 'fonts/RobotoCondensed-Bold.woff'}, {
+        'fonts', [], {'name': 'MaterialIcons-Regular.woff2'}, {
             'rel': 'preload', 'as': 'font', 'nopush': True}),
     LinkHeader(
-        'static', [], {'filename': 'fonts/MaterialIcons-Regular.woff2'}, {
+        'fonts', [], {'name': 'Icons.woff2'}, {
             'rel': 'preload', 'as': 'font', 'nopush': True}),
     ]
 
diff -r 699071b74405 -r 2c392eaf9454 sass/_font.scss
--- a/sass/_font.scss   Sat Jul 27 10:29:13 2019 +0200
+++ b/sass/_font.scss   Sat Jul 27 10:52:44 2019 +0200
@@ -3,11 +3,11 @@
   font-family: 'Roboto Condensed';
   font-style: normal;
   font-weight: 300;
-  src: url('/static/fonts/RobotoCondensed-Light.eot'); /* For IE6-8 */
-  src: url('/static/fonts/RobotoCondensed-Light.eot?#iefix') 
format('embedded-opentype'),
-  url('/static/fonts/RobotoCondensed-Light.woff') format('woff'),
-  url('/static/fonts/RobotoCondensed-Light.otf') format('truetype'),
-  url('/static/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('/static/fonts/RobotoCondensed-Regular.eot'); /* For IE6-8 */
-  src: url('/static/fonts/RobotoCondensed-Regular.eot?#iefix') 
format('embedded-opentype'),
-  url('/static/fonts/RobotoCondensed-Regular.woff') format('woff'),
-  url('/static/fonts/RobotoCondensed-Regular.otf') format('truetype'),
-  url('/static/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('/static/fonts/RobotoCondensed-Bold.eot'); /* For IE6-8 */
-  src: url('/static/fonts/RobotoCondensed-Bold.eot?#iefix') 
format('embedded-opentype'),
-  url('/static/fonts/RobotoCondensed-Bold.woff') format('woff'),
-  url('/static/fonts/RobotoCondensed-Bold.otf') format('truetype'),
-  url('/static/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');
 }

Reply via email to