From f89a1d4a7e971ee2492eb1b31053f59f17e4601a Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 12 Feb 2021 03:46:43 -0800 Subject: [PATCH 1/4] perf: update github fetcher --- .husky/pre-commit | 2 +- src/lib/github.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index ef597c48..a599e8fa 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -3,4 +3,4 @@ [ -n "$CI" ] && exit 0 -exec Date: Fri, 12 Feb 2021 04:46:42 -0800 Subject: [PATCH 2/4] feat: ini core section --- next.config.js | 9 +-- src/components/Core/Core.tsx | 39 +++++++++++ src/components/Core/CoreCard/CoreCard.tsx | 64 +++++++++++++++++++ src/components/Core/CoreCard/index.ts | 1 + src/components/Core/index.ts | 1 + src/components/Product/Product.tsx | 9 +++ .../Product/ProductCard/ProductCard.tsx | 4 +- src/icons/Hero/Airplane.tsx | 12 ++++ src/icons/Hero/Scale.tsx | 16 +++++ src/icons/Hero/Variable.tsx | 16 +++++ src/icons/Hero/index.ts | 3 + src/screens/AboutScreen/AboutScreen.tsx | 2 + src/screens/LandingScreen/LandingScreen.tsx | 2 - 13 files changed, 167 insertions(+), 11 deletions(-) create mode 100644 src/components/Core/Core.tsx create mode 100644 src/components/Core/CoreCard/CoreCard.tsx create mode 100644 src/components/Core/CoreCard/index.ts create mode 100644 src/components/Core/index.ts create mode 100644 src/icons/Hero/Airplane.tsx create mode 100644 src/icons/Hero/Scale.tsx create mode 100644 src/icons/Hero/Variable.tsx diff --git a/next.config.js b/next.config.js index 814dd842..d529f4e9 100644 --- a/next.config.js +++ b/next.config.js @@ -24,7 +24,7 @@ module.exports = nextTranslate({ }, { source: "/what", - destination: "/credits", + destination: "/values", permanent: true, }, { @@ -32,11 +32,6 @@ module.exports = nextTranslate({ destination: "/history", permanent: true, }, - { - source: "/where", - destination: "https://zen.ly/shunkakinoki", - permanent: true, - }, { source: "/who", destination: "/about", @@ -44,7 +39,7 @@ module.exports = nextTranslate({ }, { source: "/why", - destination: "/value", + destination: "/cause", permanent: true, }, { diff --git a/src/components/Core/Core.tsx b/src/components/Core/Core.tsx new file mode 100644 index 00000000..b54a17d0 --- /dev/null +++ b/src/components/Core/Core.tsx @@ -0,0 +1,39 @@ +import clsx from "clsx"; + +import { SwitchButton } from "@/common/Button"; +import { SectionText } from "@/common/Text"; +import CoreCard from "@/components/Core/CoreCard"; +import { Airplane, Scale, Variable } from "@/icons"; + +interface Props { + isPartial?: boolean; +} + +export default function Core({ isPartial = false }: Props): JSX.Element { + return ( +
+
+ Core +
+
+ + + + + + + + + +
+
+
+ +
+
+
+ ); +} diff --git a/src/components/Core/CoreCard/CoreCard.tsx b/src/components/Core/CoreCard/CoreCard.tsx new file mode 100644 index 00000000..56b39e7a --- /dev/null +++ b/src/components/Core/CoreCard/CoreCard.tsx @@ -0,0 +1,64 @@ +import clsx from "clsx"; +import Link from "next/link"; + +interface Props { + children: JSX.Element; + color: + | "blue" + | "gray" + | "green" + | "indigo" + | "pink" + | "purple" + | "red" + | "yellow"; + name: string; + hidden?: boolean; + href: string; +} + +export default function CoreCard({ + children, + color, + name, + hidden = false, + href, +}: Props): JSX.Element { + return ( + + ); +} diff --git a/src/components/Core/CoreCard/index.ts b/src/components/Core/CoreCard/index.ts new file mode 100644 index 00000000..eb230427 --- /dev/null +++ b/src/components/Core/CoreCard/index.ts @@ -0,0 +1 @@ +export { default } from "./CoreCard"; diff --git a/src/components/Core/index.ts b/src/components/Core/index.ts new file mode 100644 index 00000000..c2cbd0f2 --- /dev/null +++ b/src/components/Core/index.ts @@ -0,0 +1 @@ +export { default } from "./Core"; diff --git a/src/components/Product/Product.tsx b/src/components/Product/Product.tsx index e184ccbe..2dcc6ca6 100644 --- a/src/components/Product/Product.tsx +++ b/src/components/Product/Product.tsx @@ -1,6 +1,7 @@ import clsx from "clsx"; import Image from "next/image"; +import { SwitchButton } from "@/common/Button"; import { SectionText } from "@/common/Text"; import ProductCard from "@/components/Product/ProductCard"; import { ProductLinks } from "@/const"; @@ -39,6 +40,14 @@ export default function Product({ isPartial = false }: Props): JSX.Element { +
+
+ +
+
); } diff --git a/src/components/Product/ProductCard/ProductCard.tsx b/src/components/Product/ProductCard/ProductCard.tsx index 3b99265b..cc93359e 100644 --- a/src/components/Product/ProductCard/ProductCard.tsx +++ b/src/components/Product/ProductCard/ProductCard.tsx @@ -14,7 +14,7 @@ export default function ProductCard({ href, }: Props): JSX.Element { return ( -
  • +
  • {name} -

    +

    {description}

    diff --git a/src/icons/Hero/Airplane.tsx b/src/icons/Hero/Airplane.tsx new file mode 100644 index 00000000..ea823cf6 --- /dev/null +++ b/src/icons/Hero/Airplane.tsx @@ -0,0 +1,12 @@ +export default function Airplane(): JSX.Element { + return ( + + ); +} diff --git a/src/icons/Hero/Scale.tsx b/src/icons/Hero/Scale.tsx new file mode 100644 index 00000000..45eb9a56 --- /dev/null +++ b/src/icons/Hero/Scale.tsx @@ -0,0 +1,16 @@ +export default function Scale(): JSX.Element { + return ( + + ); +} diff --git a/src/icons/Hero/Variable.tsx b/src/icons/Hero/Variable.tsx new file mode 100644 index 00000000..63b03410 --- /dev/null +++ b/src/icons/Hero/Variable.tsx @@ -0,0 +1,16 @@ +export default function Variable(): JSX.Element { + return ( + + ); +} diff --git a/src/icons/Hero/index.ts b/src/icons/Hero/index.ts index 604f1e12..132629bc 100644 --- a/src/icons/Hero/index.ts +++ b/src/icons/Hero/index.ts @@ -1,4 +1,5 @@ export { default as Action } from "./Action"; +export { default as Airplane } from "./Airplane"; export { default as Badge } from "./Badge"; export { default as Bible } from "./Bible"; export { default as Cake } from "./Cake"; @@ -21,8 +22,10 @@ export { default as Notebook } from "./Notebook"; export { default as Resource } from "./Resource"; export { default as Perseverance } from "./Perseverance"; export { default as Right } from "./Right"; +export { default as Scale } from "./Scale"; export { default as School } from "./School"; export { default as Switch } from "./Switch"; export { default as Tag } from "./Tag"; export { default as User } from "./User"; +export { default as Variable } from "./Variable"; export { default as Work } from "./Work"; diff --git a/src/screens/AboutScreen/AboutScreen.tsx b/src/screens/AboutScreen/AboutScreen.tsx index f9cefeb8..e30d3055 100644 --- a/src/screens/AboutScreen/AboutScreen.tsx +++ b/src/screens/AboutScreen/AboutScreen.tsx @@ -1,4 +1,5 @@ import About, { Props as AboutProps } from "@/components/About"; +import Core from "@/components/Core"; import Footer from "@/components/Footer"; import Header from "@/components/Header"; import Life from "@/components/Life"; @@ -11,6 +12,7 @@ export default function AboutScreen({ source }: Props): JSX.Element {
    +