diff --git a/GZCTF/ClientApp/index.html b/GZCTF/ClientApp/index.html index b6b966a11..56849357e 100644 --- a/GZCTF/ClientApp/index.html +++ b/GZCTF/ClientApp/index.html @@ -5,12 +5,6 @@ GZ::CTF - - -
diff --git a/GZCTF/ClientApp/package.json b/GZCTF/ClientApp/package.json index 735a0f12f..83868e675 100644 --- a/GZCTF/ClientApp/package.json +++ b/GZCTF/ClientApp/package.json @@ -63,6 +63,7 @@ "typescript": "4.7.4", "vite": "^3.1.0", "vite-plugin-pages": "^0.26.0", - "vite-plugin-prismjs": "^0.0.8" + "vite-plugin-prismjs": "^0.0.8", + "vite-plugin-webfont-dl": "^3.1.1" } } diff --git a/GZCTF/ClientApp/pnpm-lock.yaml b/GZCTF/ClientApp/pnpm-lock.yaml index 62e01283b..724af6305 100644 --- a/GZCTF/ClientApp/pnpm-lock.yaml +++ b/GZCTF/ClientApp/pnpm-lock.yaml @@ -52,6 +52,7 @@ specifiers: vite: ^3.1.0 vite-plugin-pages: ^0.26.0 vite-plugin-prismjs: ^0.0.8 + vite-plugin-webfont-dl: ^3.1.1 vite-tsconfig-paths: ^3.5.0 dependencies: @@ -106,6 +107,7 @@ devDependencies: vite: 3.1.0 vite-plugin-pages: 0.26.0_vite@3.1.0 vite-plugin-prismjs: 0.0.8_prismjs@1.29.0 + vite-plugin-webfont-dl: 3.1.1_vite@3.1.0 packages: @@ -1283,6 +1285,14 @@ packages: engines: {node: '>= 0.4'} dev: true + /axios/0.25.0: + resolution: {integrity: sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==} + dependencies: + follow-redirects: 1.15.1 + transitivePeerDependencies: + - debug + dev: true + /axios/0.27.2: resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} dependencies: @@ -1333,7 +1343,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001393 - electron-to-chromium: 1.4.244 + electron-to-chromium: 1.4.245 node-releases: 2.0.6 update-browserslist-db: 1.0.7_browserslist@4.21.3 @@ -1547,8 +1557,8 @@ packages: zrender: 5.3.2 dev: false - /electron-to-chromium/1.4.244: - resolution: {integrity: sha512-E21saXLt2eTDaTxgUtiJtBUqanF9A32wZasAwDZ8gvrqXoxrBrbwtDCx7c/PQTLp81wj4X0OLDeoGQg7eMo3+w==} + /electron-to-chromium/1.4.245: + resolution: {integrity: sha512-kUN8QXmqHAN8phxjF3QpHeX7CbXGXadSngx9r1O/S9jt+uC0O/vjPi/9+8/Mk3sKewLLMrjpBJZMfVpPCdkG3g==} /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -3400,6 +3410,17 @@ packages: - supports-color dev: true + /vite-plugin-webfont-dl/3.1.1_vite@3.1.0: + resolution: {integrity: sha512-TR7EQ0IRL0yauWs328qUG+w4PPhdmAGQFyH/8ODDI0xseHEcHAt1Bd5H8Y9MAqjhOiPz8odjxt24lUizIVCNAw==} + peerDependencies: + vite: ^2 || ^3 + dependencies: + axios: 0.25.0 + vite: 3.1.0 + transitivePeerDependencies: + - debug + dev: true + /vite-tsconfig-paths/3.5.0_vite@3.1.0: resolution: {integrity: sha512-NKIubr7gXgh/3uniQaOytSg+aKWPrjquP6anAy+zCWEn6h9fB8z2/qdlfQrTgZWaXJ2pHVlllrSdRZltHn9P4g==} peerDependencies: diff --git a/GZCTF/ClientApp/vite.config.ts b/GZCTF/ClientApp/vite.config.ts index 9bda2e89e..ca093425a 100644 --- a/GZCTF/ClientApp/vite.config.ts +++ b/GZCTF/ClientApp/vite.config.ts @@ -1,9 +1,10 @@ +import eslintPlugin from '@nabla/vite-plugin-eslint' import react from '@vitejs/plugin-react' import { defineConfig, loadEnv } from 'vite' import Pages from 'vite-plugin-pages' +import prismjs from 'vite-plugin-prismjs' +import webfontDownload from 'vite-plugin-webfont-dl' import tsconfigPaths from 'vite-tsconfig-paths' -import prismjs from 'vite-plugin-prismjs'; -import eslintPlugin from '@nabla/vite-plugin-eslint' export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()) @@ -39,6 +40,10 @@ export default defineConfig(({ mode }) => { plugins: [ react(), eslintPlugin(), // only for development + webfontDownload([ + 'https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap', + 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;1,400&display=swap', + ]), Pages({ dirs: [{ dir: 'src/pages', baseRoute: '' }], }), @@ -46,8 +51,8 @@ export default defineConfig(({ mode }) => { prismjs({ languages: 'all', plugins: ['line-numbers'], - css: true - }) + css: true, + }), ], } })