From c635052c0ff09346d93ec031917cb27106fc4eb7 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 18 Oct 2019 18:01:04 +0200 Subject: [PATCH] Improved font handling --- nginx.conf | 3 ++- public/fonts/fonts.css | 8 ++++++++ public/index.html | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index e0e517a4..71cc3e45 100644 --- a/nginx.conf +++ b/nginx.conf @@ -34,7 +34,7 @@ http { gzip_buffers 16 8k; gzip_http_version 1.1; gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml font/woff2 text/html image/x-icon; + gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml font/woff2 image/x-icon; # Expires map map $sent_http_content_type $expires { @@ -43,6 +43,7 @@ http { text/css max; application/javascript max; ~image/ max; + ~font/ max; } server { diff --git a/public/fonts/fonts.css b/public/fonts/fonts.css index 39429b2a..8b2f9c61 100644 --- a/public/fonts/fonts.css +++ b/public/fonts/fonts.css @@ -3,6 +3,7 @@ font-family: 'Quicksand'; font-style: normal; font-weight: 300; + font-display: swap; src: url('quicksand-v7-latin-300.eot'); /* IE9 Compat Modes */ src: local('Quicksand Light'), local('Quicksand-Light'), url('quicksand-v7-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ @@ -17,6 +18,7 @@ font-family: 'Quicksand'; font-style: normal; font-weight: 400; + font-display: swap; src: url('quicksand-v7-latin-regular.eot'); /* IE9 Compat Modes */ src: local('Quicksand Regular'), local('Quicksand-Regular'), url('quicksand-v7-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ @@ -31,6 +33,7 @@ font-family: 'Quicksand'; font-style: normal; font-weight: 500; + font-display: swap; src: url('quicksand-v7-latin-500.eot'); /* IE9 Compat Modes */ src: local('Quicksand Medium'), local('Quicksand-Medium'), url('quicksand-v7-latin-500.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ @@ -45,6 +48,7 @@ font-family: 'Quicksand'; font-style: normal; font-weight: 700; + font-display: swap; src: url('quicksand-v7-latin-700.eot'); /* IE9 Compat Modes */ src: local('Quicksand Bold'), local('Quicksand-Bold'), url('quicksand-v7-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ @@ -59,6 +63,7 @@ font-family: 'Open Sans'; font-style: normal; font-weight: 400; + font-display: swap; src: url('open-sans-v15-latin-regular.eot'); /* IE9 Compat Modes */ src: local('Open Sans Regular'), local('OpenSans-Regular'), url('open-sans-v15-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ @@ -73,6 +78,7 @@ font-family: 'Open Sans'; font-style: italic; font-weight: 400; + font-display: swap; src: url('open-sans-v15-latin-italic.eot'); /* IE9 Compat Modes */ src: local('Open Sans Italic'), local('OpenSans-Italic'), url('open-sans-v15-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ @@ -87,6 +93,7 @@ font-family: 'Open Sans'; font-style: normal; font-weight: 700; + font-display: swap; src: url('open-sans-v15-latin-700.eot'); /* IE9 Compat Modes */ src: local('Open Sans Bold'), local('OpenSans-Bold'), url('open-sans-v15-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ @@ -101,6 +108,7 @@ font-family: 'Open Sans'; font-style: italic; font-weight: 700; + font-display: swap; src: url('open-sans-v15-latin-700italic.eot'); /* IE9 Compat Modes */ src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url('open-sans-v15-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ diff --git a/public/index.html b/public/index.html index 651ef670..4c646994 100644 --- a/public/index.html +++ b/public/index.html @@ -5,6 +5,14 @@ + + + + + + + + Vikunja