load fonts from html head
This commit is contained in:
parent
bb53e6bec0
commit
f3c5f03fa9
14 changed files with 54 additions and 61 deletions
|
@ -68,6 +68,10 @@ const webConfig = {
|
||||||
from: `${STATIC_ROOT}/img/og.png`,
|
from: `${STATIC_ROOT}/img/og.png`,
|
||||||
to: `${DIST_ROOT}/og.png`,
|
to: `${DIST_ROOT}/og.png`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
from: `${STATIC_ROOT}/font/`,
|
||||||
|
to: `${DIST_ROOT}/font/`,
|
||||||
|
},
|
||||||
]),
|
]),
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
IS_WEB: JSON.stringify(true),
|
IS_WEB: JSON.stringify(true),
|
||||||
|
|
47
static/font/font.css
Normal file
47
static/font/font.css
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 300;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('/font/inter/300.woff') format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 300;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('/font/inter/300i.woff') format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('/font/inter/400.woff') format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('/font/inter/400i.woff') format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('/font/inter/700.woff') format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 700;
|
||||||
|
font-display: swap;
|
||||||
|
src: url('/font/inter/700i.woff') format('woff');
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<script src="ui.js" async></script>
|
<script src="ui.js" async></script>
|
||||||
|
<link rel="stylesheet" href="font/font.css" />
|
||||||
<title>LBRY</title>
|
<title>LBRY</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<script src="/ui.js" async></script>
|
<script src="/ui.js" async></script>
|
||||||
<link rel="icon" type="image/png" href="favicon.png" />
|
<link rel="icon" type="image/png" href="favicon.png" />
|
||||||
|
<link rel="stylesheet" href="/font/font.css" />
|
||||||
|
|
||||||
<!-- VARIABLE_HEAD_BEGIN -->
|
<!-- VARIABLE_HEAD_BEGIN -->
|
||||||
<title>lbry.tv</title>
|
<title>lbry.tv</title>
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@import 'themes/dark.scss';
|
@import 'themes/dark.scss';
|
||||||
@import 'init/vars';
|
@import 'init/vars';
|
||||||
@import 'init/mixins';
|
@import 'init/mixins';
|
||||||
@import 'init/type';
|
|
||||||
@import 'init/gui';
|
@import 'init/gui';
|
||||||
@import 'component/animation';
|
@import 'component/animation';
|
||||||
@import 'component/button';
|
@import 'component/button';
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
@font-face {
|
|
||||||
font-family: 'Inter';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 300;
|
|
||||||
font-display: swap;
|
|
||||||
src: url('../../static/font/inter/300.woff2') format('woff2'), url('../../static/font/inter/300.woff') format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Inter';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 300;
|
|
||||||
font-display: swap;
|
|
||||||
src: url('../../static/font/inter/300i.woff2') format('woff2'),
|
|
||||||
url('../../static/font/inter/300i.woff') format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Inter';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: url('../../static/font/inter/400.woff2') format('woff2'), url('../../static/font/inter/400.woff') format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Inter';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: url('../../static/font/inter/400i.woff2') format('woff2'),
|
|
||||||
url('../../static/font/inter/400i.woff') format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Inter';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: url('../../static/font/inter/700.woff2') format('woff2'), url('../../static/font/inter/700i.woff') format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Inter';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: url('../../static/font/inter/700i.woff2') format('woff2'),
|
|
||||||
url('../../static/font/inter/700i.woff') format('woff');
|
|
||||||
}
|
|
|
@ -52,15 +52,6 @@ let baseConfig = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
test: /\.(woff|woff2)$/,
|
|
||||||
use: {
|
|
||||||
loader: 'file-loader',
|
|
||||||
options: {
|
|
||||||
outputPath: 'static/font',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
test: /\.(vert|frag|glsl)$/,
|
test: /\.(vert|frag|glsl)$/,
|
||||||
use: {
|
use: {
|
||||||
|
|
|
@ -46,7 +46,7 @@ let mainConfig = {
|
||||||
{
|
{
|
||||||
from: `${STATIC_ROOT}/`,
|
from: `${STATIC_ROOT}/`,
|
||||||
to: `${DIST_ROOT}/electron/static/`,
|
to: `${DIST_ROOT}/electron/static/`,
|
||||||
ignore: ['font/**/*', 'index-web.html'],
|
ignore: ['index-web.html', 'index-electron.html'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
from: `${STATIC_ROOT}/index-electron.html`,
|
from: `${STATIC_ROOT}/index-electron.html`,
|
||||||
|
|
Loading…
Reference in a new issue