diff --git a/app/components/Header.css.ts b/app/components/Header.css.ts index b30bcd5..20b79b8 100644 --- a/app/components/Header.css.ts +++ b/app/components/Header.css.ts @@ -4,11 +4,11 @@ const Layout = css` padding: 32px 20px; display: flex; justify-content: end; -` +`; const Links = css` display: flex; gap: 24px; -` +`; export { Layout, Links }; diff --git a/app/components/Header.tsx b/app/components/Header.tsx index 9639a8f..8e892c4 100644 --- a/app/components/Header.tsx +++ b/app/components/Header.tsx @@ -16,6 +16,6 @@ const Header = () => { ); -} +}; export { Header }; diff --git a/app/components/profile/common.css.ts b/app/components/layout/Section.css.ts similarity index 74% rename from app/components/profile/common.css.ts rename to app/components/layout/Section.css.ts index 68b0792..08ad1f6 100644 --- a/app/components/profile/common.css.ts +++ b/app/components/layout/Section.css.ts @@ -1,8 +1,6 @@ import { css } from "hono/css"; -const Layout = css` - margin-top: 48px; -`; +const Layout = css``; const Header = css` font-size: 24px; diff --git a/app/components/layout/Section.tsx b/app/components/layout/Section.tsx new file mode 100644 index 0000000..a2c588f --- /dev/null +++ b/app/components/layout/Section.tsx @@ -0,0 +1,20 @@ +import type { FC, JSX } from "hono/jsx"; +import { Header, Layout } from "./Section.css"; + +type Props = { + title: string; + children: JSX.HTMLAttributes; +}; + +const Section: FC = (props) => { + const { title, children } = props; + + return ( +
+

{title}

+ {children} +
+ ); +}; + +export { Section }; diff --git a/app/components/profile/ProfileLinks.tsx b/app/components/profile/ProfileLinks.tsx index 10300d6..a2cb3d2 100644 --- a/app/components/profile/ProfileLinks.tsx +++ b/app/components/profile/ProfileLinks.tsx @@ -1,5 +1,5 @@ import { CosenseIcon, GitHubIcon, QiitaIcon } from "../icons"; -import { Layout, Header } from "./common.css"; +import { Section } from "../layout/Section"; import { Cosense, GitHub, LinkCard_Container, Qiita } from "./ProfileLinks.css"; const links = [ @@ -25,8 +25,7 @@ const links = [ const ProfileLinks = () => { return ( -
-

Links

+
-
+
); }; diff --git a/app/components/profile/ProfileMain.tsx b/app/components/profile/ProfileMain.tsx index d4e274d..adf4035 100644 --- a/app/components/profile/ProfileMain.tsx +++ b/app/components/profile/ProfileMain.tsx @@ -7,7 +7,6 @@ const ProfileMain = () => {
Seiya Tagami / taga3s
diff --git a/app/components/profile/ProfilePhotos.tsx b/app/components/profile/ProfilePhotos.tsx index 649997b..29d3aaa 100644 --- a/app/components/profile/ProfilePhotos.tsx +++ b/app/components/profile/ProfilePhotos.tsx @@ -1,8 +1,8 @@ import type { FC } from "hono/jsx"; import type { Photo } from "../../api/photos"; -import { Header, Layout } from "./common.css"; import { Photo_Container, Photo_Image } from "./ProfilePhotos.css"; import PhotoClickWrapper from "../../islands/PhotoClickWrapper"; +import { Section } from "../layout/Section"; type Props = { photos: Photo[]; @@ -10,8 +10,7 @@ type Props = { const ProfilePhotos: FC = (props) => { return ( -
-

Favorites

+
    {props.photos.map((image) => (
  • @@ -21,7 +20,7 @@ const ProfilePhotos: FC = (props) => {
  • ))}
-
+
); }; diff --git a/app/components/profile/ProfilePresenter.css.ts b/app/components/profile/ProfilePresenter.css.ts new file mode 100644 index 0000000..eafb5dd --- /dev/null +++ b/app/components/profile/ProfilePresenter.css.ts @@ -0,0 +1,9 @@ +import { css } from "hono/css"; + +const Layout = css` + display: flex; + flex-direction: column; + gap: 48px; +`; + +export { Layout }; diff --git a/app/components/profile/ProfilePresenter.tsx b/app/components/profile/ProfilePresenter.tsx index 5c5cb08..fd03503 100644 --- a/app/components/profile/ProfilePresenter.tsx +++ b/app/components/profile/ProfilePresenter.tsx @@ -3,17 +3,18 @@ import { ProfileLinks } from "./ProfileLinks"; import { ProfileMain } from "./ProfileMain"; import type { Photo } from "../../api/photos/model"; import { ProfilePhotos } from "./ProfilePhotos"; +import { Layout } from "./ProfilePresenter.css"; type Props = { photos: Photo[]; }; const ProfilePresenter: FC = (props) => ( - <> +
- +
); export { ProfilePresenter }; diff --git a/app/routes/works.tsx b/app/routes/works.tsx index 463f182..686cb56 100644 --- a/app/routes/works.tsx +++ b/app/routes/works.tsx @@ -1,5 +1,5 @@ import { createRoute } from "honox/factory"; export default createRoute(async (c) => { - return c.render(
随時掲載...
) + return c.render(
随時掲載...
); });