From 6f390ac000d4fce9fea2ccfd02e50749b69a9501 Mon Sep 17 00:00:00 2001 From: Rong Mantle Bao Date: Tue, 30 May 2023 21:20:07 +0800 Subject: [PATCH] chore: apply gesture and font optim --- package.json | 1 - src/pages/about.tsx | 19 ++++++------------- src/pages/game.tsx | 6 +++--- src/pages/index.tsx | 8 +------- yarn.lock | 8 -------- 5 files changed, 10 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index b993362..e8908a6 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "@emotion/react": "^11.11.0", "@emotion/styled": "^11.11.0", "@fontsource-variable/roboto-flex": "^5.0.0", - "@fontsource-variable/roboto-mono": "^5.0.2", "@mui/icons-material": "^5.11.16", "@mui/material": "^5.13.2", "@mui/system": "^5.13.2", diff --git a/src/pages/about.tsx b/src/pages/about.tsx index f7e7bfe..e025712 100644 --- a/src/pages/about.tsx +++ b/src/pages/about.tsx @@ -15,8 +15,6 @@ * along with this program. If not, see https://www.gnu.org/licenses/ . */ -import "@fontsource-variable/roboto-mono" - import { graphql, PageProps } from "gatsby" import React from "react" @@ -28,11 +26,6 @@ import Typography from "@mui/material/Typography" import { CommonHead } from "../components" -const codeStyle = { - fontFamily: ["'Roboto Mono Variable'", "Consolas", "monospace"].join(","), - color: "darkgray", -} - const App = ({ data, }: PageProps): React.ReactElement => { @@ -47,14 +40,14 @@ const App = ({ > About Periotris.js - - Version {data.package?.version} + + Version: {data.package?.version} - - Revision {data.gitCommit?.hash?.slice(0, 8)}@{data.gitBranch?.name} + + Revision: {data.gitCommit?.hash?.slice(0, 8)}@{data.gitBranch?.name} - - License {data.package?.license} + + License: {data.package?.license} diff --git a/src/pages/game.tsx b/src/pages/game.tsx index 717ceff..e5f0f9b 100644 --- a/src/pages/game.tsx +++ b/src/pages/game.tsx @@ -58,8 +58,8 @@ const App = (): React.ReactElement => { filterTaps: true, swipe: { /* TODO: Add these to customization settings! */ - distance: [30, 30], - duration: 1500, + distance: [15, 15], + duration: 500, }, } ) @@ -78,7 +78,7 @@ const App = (): React.ReactElement => { width: "100%", minWidth: "0px", boxSizing: "border-box", - flex: "1 1 auto" /* For CommonLayout.tsx headers */, + flex: "1 1 auto" /* For common layout */, /* element-specific props */ }} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 85e9db7..32541f0 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -15,8 +15,6 @@ * along with this program. If not, see https://www.gnu.org/licenses/ . */ -import "@fontsource-variable/roboto-mono" - import { graphql, Link, PageProps } from "gatsby" import { useI18next } from "gatsby-plugin-react-i18next" import React from "react" @@ -36,10 +34,6 @@ import Typography from "@mui/material/Typography" import { CommonHead } from "../components" import PageLocation from "../json/PageLocation.json" -const codeStyle = { - fontFamily: ["'Roboto Mono Variable'", "Consolas", "monospace"].join(","), -} - const App = ({ data, }: PageProps): React.ReactElement => { @@ -72,7 +66,7 @@ const App = ({ mt={3} > Periotris.js - + {t("typ_version", { version: data.package?.version })} diff --git a/yarn.lock b/yarn.lock index 5cc37fb..5574dc2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1720,13 +1720,6 @@ __metadata: languageName: node linkType: hard -"@fontsource-variable/roboto-mono@npm:^5.0.2": - version: 5.0.2 - resolution: "@fontsource-variable/roboto-mono@npm:5.0.2" - checksum: 02f68aef3c332e1a349427e169d39ebd9e642ecf07c282a775b65a7a82dd0b8d22f5055cf1615b2ab05b209975bf9eeefaec41e5d37ad2a9db1fbd220cd35af3 - languageName: node - linkType: hard - "@gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -12874,7 +12867,6 @@ __metadata: "@emotion/react": ^11.11.0 "@emotion/styled": ^11.11.0 "@fontsource-variable/roboto-flex": ^5.0.0 - "@fontsource-variable/roboto-mono": ^5.0.2 "@mui/icons-material": ^5.11.16 "@mui/material": ^5.13.2 "@mui/system": ^5.13.2