From 724d7fbc79c146c9979eda2264ddb4b32dde0995 Mon Sep 17 00:00:00 2001 From: Rem0o Date: Sun, 11 Aug 2024 11:53:18 -0400 Subject: [PATCH] GPU doc sections --- src/common/icons.ts | 8 +- src/layouts/footer.tsx | 6 +- .../demo/linearFanCurveCard.tsx | 8 +- src/reactComponents/demo/mixFanCurveCard.tsx | 4 +- src/reactComponents/docs/control.tsx | 6 +- src/reactComponents/docs/customSensors.tsx | 10 +-- src/reactComponents/docs/docSection.tsx | 4 +- src/reactComponents/docs/fanCurves.tsx | 26 +++--- src/reactComponents/docs/gpu.tsx | 86 +++++++++++++++++++ src/reactComponents/donationModal.tsx | 6 +- src/reactComponents/icon.tsx | 56 ++++++++---- src/reactComponents/niceHeader.tsx | 22 ++--- src/reactComponents/spinningLogo.tsx | 4 +- src/reactPages/docs.tsx | 22 ++++- src/reactPages/index.tsx | 32 +++---- 15 files changed, 212 insertions(+), 88 deletions(-) create mode 100644 src/reactComponents/docs/gpu.tsx diff --git a/src/common/icons.ts b/src/common/icons.ts index 54a26a8..70a7110 100644 --- a/src/common/icons.ts +++ b/src/common/icons.ts @@ -1,3 +1,5 @@ +type SvgIcon = string | { path: string; viewbox: string }; + const svgPaths = { mix: "M22,6.92L20.59,5.5L17.74,8.72C15.68,6.4 12.83,5 9.61,5C6.72,5 4.07,6.16 2,8L3.42,9.42C5.12,7.93 7.27,7 9.61,7C12.35,7 14.7,8.26 16.38,10.24L13.5,13.5L9.5,9.5L2,17L3.5,18.5L9.5,12.5L13.5,16.5L17.55,11.93C18.3,13.28 18.8,14.83 19,16.5H21C20.78,14.18 20.05,12.09 18.96,10.34L22,6.92Z", linear: @@ -39,7 +41,9 @@ const svgPaths = { auto: "M19,1L17.74,3.75L15,5L17.74,6.26L19,9L20.25,6.26L23,5L20.25,3.75M9,4L6.5,9.5L1,12L6.5,14.5L9,20L11.5,14.5L17,12L11.5,9.5M19,15L17.74,17.74L15,19L17.74,20.25L19,23L20.25,20.25L23,19L20.25,17.74", calibration: "M13,2.03V2.05L13,4.05C17.39,4.59 20.5,8.58 19.96,12.97C19.5,16.61 16.64,19.5 13,19.93V21.93C18.5,21.38 22.5,16.5 21.95,11C21.5,6.25 17.73,2.5 13,2.03M11,2.06C9.05,2.25 7.19,3 5.67,4.26L7.1,5.74C8.22,4.84 9.57,4.26 11,4.06V2.06M4.26,5.67C3,7.19 2.25,9.04 2.05,11H4.05C4.24,9.58 4.8,8.23 5.69,7.1L4.26,5.67M15.5,8.5L10.62,13.38L8.5,11.26L7.44,12.32L10.62,15.5L16.56,9.56L15.5,8.5M2.06,13C2.26,14.96 3.03,16.81 4.27,18.33L5.69,16.9C4.81,15.77 4.24,14.42 4.06,13H2.06M7.1,18.37L5.67,19.74C7.18,21 9.04,21.79 11,22V20C9.58,19.82 8.23,19.25 7.1,18.37Z", pairing: "M21,9L17,5V8H10V10H17V13M7,11L3,15L7,19V16H14V14H7V11Z", - threeDot: "M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z" + threeDot: "M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z", + nvidia: { path:"M101.3 53.6V37.4c1.6-.1 3.2-.2 4.8-.2 44.4-1.4 73.5 38.2 73.5 38.2S148.2 119 114.5 119c-4.5 0-8.9-.7-13.1-2.1V67.7c17.3 2.1 20.8 9.7 31.1 27l23.1-19.4s-16.9-22.1-45.3-22.1c-3-.1-6 .1-9 .4m0-53.6v24.2l4.8-.3c61.7-2.1 102 50.6 102 50.6s-46.2 56.2-94.3 56.2c-4.2 0-8.3-.4-12.4-1.1v15c3.4.4 6.9.7 10.3.7 44.8 0 77.2-22.9 108.6-49.9 5.2 4.2 26.5 14.3 30.9 18.7-29.8 25-99.3 45.1-138.7 45.1-3.8 0-7.4-.2-11-.6v21.1h170.2V0H101.3zm0 116.9v12.8c-41.4-7.4-52.9-50.5-52.9-50.5s19.9-22 52.9-25.6v14h-.1c-17.3-2.1-30.9 14.1-30.9 14.1s7.7 27.3 31 35.2M27.8 77.4s24.5-36.2 73.6-40V24.2C47 28.6 0 74.6 0 74.6s26.6 77 101.3 84v-14c-54.8-6.8-73.5-67.2-73.5-67.2z", viewbox: "0 0 271.7 179.7"}, + amd: { path: "M431.35 416.39L15.28 0L1530 0L1530 1515.66L1113.92 1099.32L1113.92 416.39L431.35 416.39ZM430.87 499.83L2.49 928.44L2.49 1528.41L602.04 1528.41L1030.39 1099.81L430.87 1099.81L430.87 499.83Z", viewbox: "0 0 1530 1530"} }; -export default { svgPaths }; +export { type SvgIcon, svgPaths as icons }; diff --git a/src/layouts/footer.tsx b/src/layouts/footer.tsx index 251f2e4..c295eaa 100644 --- a/src/layouts/footer.tsx +++ b/src/layouts/footer.tsx @@ -1,5 +1,5 @@ import consts from "../common/consts"; -import icons from "../common/icons"; +import { icons } from "../common/icons"; import { ExternalLink } from "../reactComponents/links"; import { SpinningLogo } from "../reactComponents/spinningLogo"; import { FooterButton } from "../reactComponents/footerButton"; @@ -25,12 +25,12 @@ export const DevInformation = () => {
+ setHoverAndFocus([true, focus])} diff --git a/src/reactComponents/demo/mixFanCurveCard.tsx b/src/reactComponents/demo/mixFanCurveCard.tsx index 85e5941..2ce88d1 100644 --- a/src/reactComponents/demo/mixFanCurveCard.tsx +++ b/src/reactComponents/demo/mixFanCurveCard.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { twMerge } from "tailwind-merge"; -import icons from "../../common/icons"; +import { icons } from "../../common/icons"; import Select from "../select"; import { createMixFanCurve, @@ -49,7 +49,7 @@ export default function MixFanCurveCard({ : selectedFunction.name; return ( - +