[#168] Use static resources from static.vega.xyz (#205)

This commit is contained in:
Bartłomiej Głownia 2022-04-06 12:36:36 +02:00 committed by GitHub
parent 814589fd1e
commit 6cbc701384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 56 additions and 34 deletions

View File

@ -15,7 +15,7 @@
"main": "apps/explorer/src/main.tsx",
"polyfills": "apps/explorer/src/polyfills.ts",
"tsConfig": "apps/explorer/tsconfig.app.json",
"assets": ["apps/explorer/src/favicon.ico", "apps/explorer/src/assets"],
"assets": ["apps/explorer/src/assets"],
"styles": ["apps/explorer/src/styles.css"],
"scripts": [],
"webpackConfig": "apps/explorer/webpack.config.js"
@ -70,12 +70,8 @@
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "cp apps/explorer/netlify.toml netlify.toml"
},
{
"command": "nx build explorer"
}
"cp apps/explorer/netlify.toml netlify.toml",
"nx build explorer"
]
}
}

View File

@ -4,9 +4,20 @@
<meta charset="utf-8" />
<title>Explorer</title>
<base href="/" />
<link
rel="preload"
href="https://static.vega.xyz/AlphaLyrae-Medium.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link
rel="icon"
type="image/x-icon"
href="https://static.vega.xyz/favicon.ico"
/>
<link rel="stylesheet" href="https://static.vega.xyz/fonts.css" />
</head>
<body>
<div id="root"></div>

View File

@ -1,10 +1,4 @@
/* You can add global styles to this file, and also import other style files */
@tailwind base;
@tailwind components;
@font-face {
font-family: 'AlphaLyrae-Medium';
src: url('./AlphaLyrae-Medium.woff');
}
@tailwind utilities;

4
apps/static/netlify.toml Normal file
View File

@ -0,0 +1,4 @@
[[headers]]
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"

View File

@ -45,6 +45,16 @@
"buildTarget": "static:build:production"
}
}
},
"build-netlify": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
"cp apps/static/netlify.toml netlify.toml",
"nx build static"
]
}
}
}
}

View File

@ -14,10 +14,7 @@
"main": "apps/stats/src/main.tsx",
"polyfills": "apps/stats/src/polyfills.ts",
"tsConfig": "apps/stats/tsconfig.app.json",
"assets": [
"apps/stats/src/assets/favicon.ico",
"apps/stats/src/assets"
],
"assets": ["apps/stats/src/assets"],
"styles": ["apps/stats/src/styles/styles.css"],
"scripts": [],
"webpackConfig": "@nrwl/react/plugins/webpack"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -2,7 +2,18 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="assets/favicon.ico" />
<link
rel="preload"
href="https://static.vega.xyz/AlphaLyrae-Medium.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="icon"
type="image/x-icon"
href="https://static.vega.xyz/favicon.ico"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Health check for Vega" />
@ -22,6 +33,7 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Vega Network Stats</title>
<link rel="stylesheet" href="https://static.vega.xyz/fonts.css" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>

View File

@ -1,11 +1,6 @@
@tailwind base;
@tailwind components;
@font-face {
font-family: 'AlphaLyrae-Medium';
src: url('./AlphaLyrae-Medium.woff');
}
.layout-grid {
display: grid;
grid-template-columns: 1fr;

View File

@ -30,12 +30,20 @@ function VegaTradingApp({ Component, pageProps }: AppProps) {
<VegaWalletProvider>
<AppLoader>
<Head>
<link
rel="preload"
href="https://static.vega.xyz/AlphaLyrae-Medium.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
/>
<title>{t('Welcome to Vega trading!')}</title>
<link
rel="icon"
href="https://vega.xyz/favicon-32x32.png"
type="image/png"
type="image/x-icon"
href="https://static.vega.xyz/favicon.ico"
/>
<link rel="stylesheet" href="https://static.vega.xyz/fonts.css" />
</Head>
<div className="h-full dark:bg-black dark:text-white-60 bg-white text-black-60 grid grid-rows-[min-content,1fr]">
<div className="flex items-stretch border-b-[7px] border-vega-yellow">

View File

@ -124,7 +124,7 @@ module.exports = {
'"Noto Color Emoji"',
],
alpha: [
'AlphaLyrae-Medium',
'AlphaLyrae',
'"Helvetica Neue"',
'-apple-system',
'BlinkMacSystemFont',

View File

@ -0,0 +1 @@
<link rel="stylesheet" href="https://static.vega.xyz/fonts.css" />

View File

@ -1,9 +1,3 @@
@tailwind base;
@tailwind components;
@font-face {
font-family: 'AlphaLyrae-Medium';
src: url('./fonts/AlphaLyrae-Medium.woff');
}
@tailwind utilities;