From b78f7f393ee868950bee435de60a5b6e8d7979ea Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Tue, 4 Apr 2023 19:36:32 -0400 Subject: [PATCH] Add more home buttons & Add content disclaimer i added a place to add credits; will do next probs --- src/handbook/package.json | 1 + src/handbook/src/backend/icons.d.ts | 3 + src/handbook/src/css/views/Content.scss | 76 +++++++++++++++++++- src/handbook/src/css/widgets/HomeButton.scss | 2 + src/handbook/src/icons/discord.svg | 1 + src/handbook/src/ui/views/Content.tsx | 29 +++++++- src/handbook/vite.config.ts | 3 +- 7 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 src/handbook/src/backend/icons.d.ts create mode 100644 src/handbook/src/icons/discord.svg diff --git a/src/handbook/package.json b/src/handbook/package.json index 93a199de0..97869f8e7 100644 --- a/src/handbook/package.json +++ b/src/handbook/package.json @@ -21,6 +21,7 @@ "@types/react-dom": "^18.0.11", "vite": "^4.2.0", + "vite-plugin-svgr": "^2.4.0", "vite-tsconfig-paths": "^4.0.7", "vite-plugin-singlefile": "^0.13.5", "@vitejs/plugin-react-swc": "^3.0.0", diff --git a/src/handbook/src/backend/icons.d.ts b/src/handbook/src/backend/icons.d.ts new file mode 100644 index 000000000..fb004d0d2 --- /dev/null +++ b/src/handbook/src/backend/icons.d.ts @@ -0,0 +1,3 @@ +declare module "*.svg" { + export const ReactComponent: React.FunctionComponent>; +} diff --git a/src/handbook/src/css/views/Content.scss b/src/handbook/src/css/views/Content.scss index d70dd25e3..40e58460a 100644 --- a/src/handbook/src/css/views/Content.scss +++ b/src/handbook/src/css/views/Content.scss @@ -4,19 +4,24 @@ width: 100%; background-color: var(--background-color); + flex-direction: column; + justify-content: space-between; } .Content_Top { display: flex; width: 100%; + height: 80%; flex-direction: column; align-items: center; + + gap: 24px; } .Content_Title { margin-top: 31px; - margin-bottom: 39px; + margin-bottom: 15px; } .Content_Buttons { @@ -25,8 +30,77 @@ max-width: 1376px; max-height: 256px; + + gap: 24px; + justify-content: center; + flex-wrap: wrap; } .Content_Bottom { + display: flex; + + height: 50%; + max-height: 125px; + flex-direction: row; + justify-content: space-between; +} + +.Content_Box { + display: flex; + background-color: var(--secondary-color); +} + +.Content_Disclaimer { + display: flex; + flex-direction: row; + justify-content: space-between; + background-color: var(--secondary-color); + + width: 50%; + height: 100%; + max-width: 630px; + max-height: 93px; + + margin: 0 24px 0 60px; + border-radius: 10px; + + box-sizing: border-box; + padding: 11px; + + :nth-child(1) { + font-size: 24px; + max-height: 30px; + + display: flex; + flex-direction: column; + } + + p { + font-size: 18px; + max-height: 40px; + } +} + +.Content_Discord { + max-height: 40px; + max-width: 150px; + + gap: 8px; + align-self: center; + align-items: center; + + svg { + width: 100%; + height: 100%; + max-width: 44px; + max-height: 30px; + } + + p { + font-size: 16px; + } +} + +.Content_Credits { } diff --git a/src/handbook/src/css/widgets/HomeButton.scss b/src/handbook/src/css/widgets/HomeButton.scss index ec4c04f69..6f05ebe07 100644 --- a/src/handbook/src/css/widgets/HomeButton.scss +++ b/src/handbook/src/css/widgets/HomeButton.scss @@ -12,6 +12,8 @@ align-items: center; justify-content: center; gap: 20px; + + border-radius: 10px; } .HomeButton_Icon { diff --git a/src/handbook/src/icons/discord.svg b/src/handbook/src/icons/discord.svg new file mode 100644 index 000000000..22ee27ba2 --- /dev/null +++ b/src/handbook/src/icons/discord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/handbook/src/ui/views/Content.tsx b/src/handbook/src/ui/views/Content.tsx index a1b76e28f..4264fb03f 100644 --- a/src/handbook/src/ui/views/Content.tsx +++ b/src/handbook/src/ui/views/Content.tsx @@ -1,8 +1,11 @@ import React from "react"; -import "@css/views/Content.scss"; import HomeButton from "@app/ui/widgets/HomeButton"; +import { ReactComponent as DiscordLogo } from "@icons/discord.svg"; + +import "@css/views/Content.scss"; + class Content extends React.Component { constructor(props: any) { super(props); @@ -16,11 +19,35 @@ class Content extends React.Component {
+ + + + +
+ +
+ +
+
+
+

This tool is not affiliated with HoYoverse.

+

Genshin Impact, game content and materials are

+

trademarks and copyrights of HoYoverse.

+
+
+ +

Join the Community!

+
+
+ +
+ +
); diff --git a/src/handbook/vite.config.ts b/src/handbook/vite.config.ts index 9bd37677d..2e4f4a3a1 100644 --- a/src/handbook/vite.config.ts +++ b/src/handbook/vite.config.ts @@ -3,12 +3,13 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; +import viteSvgr from "vite-plugin-svgr"; import tsconfigPaths from "vite-tsconfig-paths"; import postcss from "./cfg/postcss.config.js"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ react(), tsconfigPaths() ], + plugins: [ react(), tsconfigPaths(), viteSvgr() ], css: { postcss } });