diff --git a/src/DialogImage.tsx b/src/DialogImage.tsx new file mode 100644 index 0000000..849fe32 --- /dev/null +++ b/src/DialogImage.tsx @@ -0,0 +1,49 @@ +import { Dialog } from "@kobalte/core"; +import cn from "classnames"; +import { Component, JSX } from "solid-js"; + +interface Props { + children?: JSX.Element; + style?: JSX.CSSProperties; + class?: string; + image: Component; + thumbnail: Component; + alt: string; +} + +const DialogImage: Component = (props) => { + const { children, class: $class, alt, ...rest } = $destructure(props); + + return ( +
+ + + + + + +
+ + + + + +
+
+
+
+ ); +}; + +export default DialogImage; diff --git a/src/GallerySite.tsx b/src/GallerySite.tsx index a56fab2..15f2fb7 100644 --- a/src/GallerySite.tsx +++ b/src/GallerySite.tsx @@ -1,10 +1,10 @@ -import { Dialog } from "@kobalte/core"; import { css } from "@linaria/core"; import cn from "classnames"; -import { JSX } from "solid-js"; +import { JSX, Component } from "solid-js"; +import DialogImage from "~/DialogImage"; import { breakpoint, breakpointUntil } from "~/style/commonStyle"; -const images = Object.values( +const images: Component[] = Object.values( import.meta.glob("@assets/gallery/*.jpg", { query: "?lazy", import: "default", @@ -12,7 +12,7 @@ const images = Object.values( }) ); -const thumbnails = Object.values( +const thumbnails: Component[] = Object.values( import.meta.glob("@assets/gallery/*.jpg", { query: "?lazy&size=400x400", import: "default", @@ -29,47 +29,20 @@ const GallerySite: Component = (props) => {
- {(Image, idx) => } + {(image, idx) => ( + + )}
); }; -const Card: Component = (props: any) => { - // const { Image } = $destructure(props); - return ( -
- - - - - - -
- - - - - -
-
-
-
- ); -}; - const _GallerySite = css``; const Grid = css` diff --git a/src/about/ProjectsSection.tsx b/src/about/ProjectsSection.tsx index 0094cf1..80855e5 100644 --- a/src/about/ProjectsSection.tsx +++ b/src/about/ProjectsSection.tsx @@ -17,6 +17,7 @@ import ProjectImageFujipodWeb2 from "@assets/about/project-fujipod-web-2.jpg?laz import ProjectThumbnailFujipodWeb2 from "@assets/about/project-fujipod-web-2.jpg?lazy&size=300x"; import ProjectImageFujipodWeb3 from "@assets/about/project-fujipod-web-3.jpg?lazy"; import ProjectThumbnailFujipodWeb3 from "@assets/about/project-fujipod-web-3.jpg?lazy&size=300x"; +import DialogImage from "~/DialogImage"; interface Props { style?: JSX.CSSProperties; @@ -93,8 +94,15 @@ const Project: Component = (props: any) => {
- {(Image, idx) => ( - + {(image, idx) => ( + )}