Cleanup font caching and requesting
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
// Cache assets
|
||||
workbox.routing.registerRoute(
|
||||
// This regexp matches all files in precache-manifest
|
||||
new RegExp('.+\\.(css|json|js|eot|svg|ttf|woff|woff2|png|html|txt)$'),
|
||||
new RegExp('.+\\.(css|json|js|svg|woff2|png|html|txt)$'),
|
||||
new workbox.strategies.StaleWhileRevalidate(),
|
||||
)
|
||||
|
||||
@ -74,7 +74,7 @@ self.addEventListener('notificationclick', function (event) {
|
||||
switch (event.action) {
|
||||
case 'mark-as-done':
|
||||
// FIXME: Ugly as hell, but no other way of doing this, since we can't use modules
|
||||
// in service workersfor now.
|
||||
// in service workers for now.
|
||||
fetch('/config.json')
|
||||
.then(r => r.json())
|
||||
.then(config => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
$font-files-path: '../../public/fonts/';
|
||||
$font-files-path: '/fonts/';
|
||||
|
||||
/* quicksand-300 - latin */
|
||||
@font-face {
|
||||
@ -6,13 +6,10 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'quicksand-v7-latin-300.eot'); /* IE9 Compat Modes */
|
||||
src: local('Quicksand Light'), local('Quicksand-Light'),
|
||||
url($font-files-path + 'quicksand-v7-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'quicksand-v7-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-300.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-300.svg#Quicksand') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-300.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
||||
/* quicksand-regular - latin */
|
||||
@ -21,13 +18,10 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'quicksand-v7-latin-regular.eot'); /* IE9 Compat Modes */
|
||||
src: local('Quicksand Regular'), local('Quicksand-Regular'),
|
||||
url($font-files-path + 'quicksand-v7-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'quicksand-v7-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-regular.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-regular.svg#Quicksand') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-regular.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
||||
/* quicksand-500 - latin */
|
||||
@ -36,13 +30,10 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'quicksand-v7-latin-500.eot'); /* IE9 Compat Modes */
|
||||
src: local('Quicksand Medium'), local('Quicksand-Medium'),
|
||||
url($font-files-path + 'quicksand-v7-latin-500.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'quicksand-v7-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-500.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-500.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-500.svg#Quicksand') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-500.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
||||
/* quicksand-700 - latin */
|
||||
@ -51,13 +42,10 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'quicksand-v7-latin-700.eot'); /* IE9 Compat Modes */
|
||||
src: local('Quicksand Bold'), local('Quicksand-Bold'),
|
||||
url($font-files-path + 'quicksand-v7-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'quicksand-v7-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-700.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'quicksand-v7-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-700.svg#Quicksand') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'quicksand-v7-latin-700.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
||||
/* open-sans-regular - latin */
|
||||
@ -66,13 +54,10 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'open-sans-v15-latin-regular.eot'); /* IE9 Compat Modes */
|
||||
src: local('Open Sans Regular'), local('OpenSans-Regular'),
|
||||
url($font-files-path + 'open-sans-v15-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'open-sans-v15-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-regular.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-regular.svg#OpenSans') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-regular.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
||||
/* open-sans-italic - latin */
|
||||
@ -81,13 +66,10 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'open-sans-v15-latin-italic.eot'); /* IE9 Compat Modes */
|
||||
src: local('Open Sans Italic'), local('OpenSans-Italic'),
|
||||
url($font-files-path + 'open-sans-v15-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'open-sans-v15-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-italic.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-italic.svg#OpenSans') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-italic.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
||||
/* open-sans-700 - latin */
|
||||
@ -96,13 +78,10 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'open-sans-v15-latin-700.eot'); /* IE9 Compat Modes */
|
||||
src: local('Open Sans Bold'), local('OpenSans-Bold'),
|
||||
url($font-files-path + 'open-sans-v15-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'open-sans-v15-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-700.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-700.svg#OpenSans') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-700.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
||||
/* open-sans-700italic - latin */
|
||||
@ -111,11 +90,8 @@ $font-files-path: '../../public/fonts/';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url($font-files-path + 'open-sans-v15-latin-700italic.eot'); /* IE9 Compat Modes */
|
||||
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'),
|
||||
url($font-files-path + 'open-sans-v15-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url($font-files-path + 'open-sans-v15-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-700italic.woff') format('woff'), /* Modern Browsers */
|
||||
url($font-files-path + 'open-sans-v15-latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-700italic.svg#OpenSans') format('svg'); /* Legacy iOS */
|
||||
url($font-files-path + 'open-sans-v15-latin-700italic.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
|
Reference in New Issue
Block a user