Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

close 制作物 Products #11 #62

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion blogs
Submodule blogs deleted from 120ee7
Binary file added src/assets/fookeys.mp4
Binary file not shown.
Binary file added src/assets/my-monthly-mix.mp4
Binary file not shown.
20 changes: 0 additions & 20 deletions src/components/Article.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/sections/Hobbies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export default function Hobbies(): ReactElement {

return (
<p.div
bg={colorScheme === "light" ? "gray.400" : "gray.800"}
fontFamily="sans"
fontSize={30}
pb={20}
Expand Down
147 changes: 147 additions & 0 deletions src/components/sections/Products.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
import { type ReactElement } from "react";
import { Icon } from "@iconify/react";
import { useStore } from "@nanostores/react";
import {
Text,
Center,
Group,
Flex,
em,
Card,
Spoiler,
Button,
} from "@mantine/core";
import { useMediaQuery } from "@mantine/hooks";
import { styled as p } from "@panda/jsx";
import { $colorScheme, $isMobile } from "../../stores/option";

import fookeys from "@/assets/fookeys.mp4";
import m3 from "@/assets/my-monthly-mix.mp4";

type ProductsData = {
name: string;
image: string;
url?: string;
github?: string;
youtube?: string;
preview?: string;
description: string;
};

const products: ProductsData[] = [
{
name: "fookeys",
image: "https://fookeys.com/images/logo.png",
url: "https://fookeys.vercel.app/",
youtube: "https://youtu.be/-RsJv_yJDFc",
preview: "fookeys",
github: "https://github.com/nasubi916/fookeys",
description:
`fookeysはブラウザで動作する1対1の対戦型カードゲームです。
Vue + firebaseで作成しました。`,
},
{
name: "my-monthly-mix",
image: "https://my-monthly-mix.vercel.app/logo.png",
preview: "m3",
github: "https://github.com/wappon28dev/my-monthly-mix", // ?
description: `my-monthly-mixは。はサークル内ハッカソンにて友人と二人で、約2週間の短期開発を行いました。
私はフロントエンドを担当し、vite + Reactで制作しました。
my-monthly-mixは今月聴いた曲で共有したい3曲を選び、投稿するサービスです。
YouTubeとSpotifyに対応しています。`,
},
];

function Product({
name,
icon,
description,
youtube,
url,
}: {
name: string;
icon: string;
description: string;
url: string;
youtube?: string;
}): ReactElement {
$isMobile.set(useMediaQuery(`(max-width: ${em(750)})`) ?? false);
const isMobile = $isMobile.value ?? false;
return (
<Card h="auto" radius="lg" shadow="xl" w={isMobile ? 370 : 400}>
<Flex align="center" direction="column" gap={10}>
<Flex align="center" direction="row" gap={5}>
<Icon height={30} icon={icon} width={30} />
<Text inherit>{name}</Text>
</Flex>
<video controls src={name === "fookeys" ? fookeys : m3} />
<p.div fontSize={16}>
<Spoiler hideLabel="" maxHeight={200} showLabel="もっとみせる">
<Text inherit>{description}</Text>
</Spoiler>
</p.div>
<p.div w={isMobile ? 300 : 350}>
{url !== "" && (
<Button
component="a"
href={url}
size="xs"
target="_blank"
variant="outline"
>
Link : {url}
</Button>
)}
{youtube !== "" && (
<div>
<Button
component="a"
href={youtube}
size="xs"
target="_blank"
variant="outline"
>
YouTube : {youtube}
</Button>
</div>
)}
</p.div>
</Flex>
</Card>
);
}

export default function Products(): ReactElement {
$isMobile.set(useMediaQuery(`(max-width: ${em(750)})`) ?? false);
const colorScheme = useStore($colorScheme);

return (
<p.div
bg={colorScheme === "light" ? "gray.400" : "gray.800"}
fontFamily="sans"
fontSize={30}
pb={20}
w="100%"
>
<Center my={20}>
<Text ff="Noto serif jp" inherit mx={20}>
Products
</Text>
</Center>
<Center>
<Group align="start" gap={40} justify="center" m={3} wrap="wrap">
{products.map((product) => (
<Product
key={product.name}
description={product.description}
icon={product.image}
name={product.name}
url={product.url ?? ""}
youtube={product.youtube ?? ""}
/>
))}
</Group>
</Center>
</p.div>
);
}
17 changes: 0 additions & 17 deletions src/pages/blogs/+Page.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/pages/index/+Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Skills from "@/components/sections/Skills";
import Experiences from "@/components/sections/Experiences";
import Hobbies from "@/components/sections/Hobbies";
import { $colorScheme } from "@/stores/option";
// import Products from "@/components/sections/Products";
import Products from "@/components/sections/Products";
// import Blogs from "@/components/sections/Blogs";

export default function Home(): ReactElement {
Expand Down Expand Up @@ -110,9 +110,9 @@ export default function Home(): ReactElement {
<Profile />
<Skills />
<Experiences />
<Products />
<Hobbies />
{/*
<Products />
<Blogs />
*/}
</Flex>
Expand Down