Serves font locally

This commit is contained in:
chaptergy 2021-05-12 18:03:10 +02:00
parent 62a708b416
commit 07bbece704
No known key found for this signature in database
GPG Key ID: 4AC3BC8E9F82CD91
14 changed files with 54 additions and 3 deletions

View File

@ -1 +0,0 @@
./node_modules/tabler-ui/dist/assets/fonts

1
frontend/fonts/feather Symbolic link
View File

@ -0,0 +1 @@
../node_modules/tabler-ui/dist/assets/fonts/feather

View File

@ -20,7 +20,6 @@
<meta name="msapplication-TileColor" content="#333333"> <meta name="msapplication-TileColor" content="#333333">
<meta name="msapplication-config" content="/images/favicons/browserconfig.xml"> <meta name="msapplication-config" content="/images/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,500,500i,600,600i,700,700i&amp;subset=latin-ext">
<link href="/css/main.css?v=<%= version %>" rel="stylesheet"> <link href="/css/main.css?v=<%= version %>" rel="stylesheet">
</head> </head>
<body> <body>

39
frontend/scss/fonts.scss Normal file
View File

@ -0,0 +1,39 @@
/* source-sans-pro-regular - latin-ext_latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local(''),
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-sans-pro-italic - latin-ext_latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local(''),
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-sans-pro-700italic - latin-ext_latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 700;
src: local(''),
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* source-sans-pro-700 - latin-ext_latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local(''),
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

View File

@ -1,5 +1,6 @@
@import "~tabler-ui/dist/assets/css/dashboard"; @import "~tabler-ui/dist/assets/css/dashboard";
@import "tabler-extra"; @import "tabler-extra";
@import "fonts";
@import "selectize"; @import "selectize";
@import "custom"; @import "custom";

View File

@ -90,7 +90,19 @@ module.exports = {
} }
} }
] ]
} },
{
test: /source-sans-pro.*\.(woff(2)?)(\?v=\d+\.\d+\.\d+)?$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets/'
}
}
]
}
] ]
}, },
plugins: [ plugins: [