Skip to content

Commit 07bbece

Browse files
committed
Serves font locally
1 parent 62a708b commit 07bbece

14 files changed

+54
-3
lines changed

frontend/fonts

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/fonts/feather

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../node_modules/tabler-ui/dist/assets/fonts/feather
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

frontend/html/partials/header.ejs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<meta name="msapplication-TileColor" content="#333333">
2121
<meta name="msapplication-config" content="/images/favicons/browserconfig.xml">
2222
<meta name="theme-color" content="#ffffff">
23-
<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">
2423
<link href="/css/main.css?v=<%= version %>" rel="stylesheet">
2524
</head>
2625
<body>

frontend/scss/fonts.scss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* source-sans-pro-regular - latin-ext_latin */
2+
@font-face {
3+
font-family: 'Source Sans Pro';
4+
font-style: normal;
5+
font-weight: 400;
6+
src: local(''),
7+
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
8+
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+ */
9+
}
10+
11+
/* source-sans-pro-italic - latin-ext_latin */
12+
@font-face {
13+
font-family: 'Source Sans Pro';
14+
font-style: italic;
15+
font-weight: 400;
16+
src: local(''),
17+
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
18+
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+ */
19+
}
20+
21+
/* source-sans-pro-700italic - latin-ext_latin */
22+
@font-face {
23+
font-family: 'Source Sans Pro';
24+
font-style: italic;
25+
font-weight: 700;
26+
src: local(''),
27+
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
28+
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+ */
29+
}
30+
31+
/* source-sans-pro-700 - latin-ext_latin */
32+
@font-face {
33+
font-family: 'Source Sans Pro';
34+
font-style: normal;
35+
font-weight: 700;
36+
src: local(''),
37+
url('../fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
38+
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+ */
39+
}

frontend/scss/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@import "~tabler-ui/dist/assets/css/dashboard";
22
@import "tabler-extra";
3+
@import "fonts";
34
@import "selectize";
45
@import "custom";
56

frontend/webpack.config.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,19 @@ module.exports = {
9090
}
9191
}
9292
]
93-
}
93+
},
94+
{
95+
test: /source-sans-pro.*\.(woff(2)?)(\?v=\d+\.\d+\.\d+)?$/,
96+
use: [
97+
{
98+
loader: 'file-loader',
99+
options: {
100+
name: '[name].[ext]',
101+
outputPath: 'assets/'
102+
}
103+
}
104+
]
105+
}
94106
]
95107
},
96108
plugins: [

0 commit comments

Comments
 (0)