From b4dd38c0678368566d805ef26a3ba553f0e0660b Mon Sep 17 00:00:00 2001
From: taga3s
Date: Thu, 5 Sep 2024 17:19:18 +0900
Subject: [PATCH] feat: update post styling
---
.../posts/detail/PostDetailHeader.css.ts | 23 +++++++++++++++++++
.../posts/detail/PostDetailHeader.tsx | 22 ++++++++++++++++++
app/global.d.ts | 2 +-
app/routes/_renderer.tsx | 6 ++---
app/routes/posts/_renderer.tsx | 2 ++
app/routes/posts/md_test.mdx | 6 ++---
6 files changed, 54 insertions(+), 7 deletions(-)
create mode 100644 app/components/posts/detail/PostDetailHeader.css.ts
create mode 100644 app/components/posts/detail/PostDetailHeader.tsx
diff --git a/app/components/posts/detail/PostDetailHeader.css.ts b/app/components/posts/detail/PostDetailHeader.css.ts
new file mode 100644
index 0000000..f0b95fa
--- /dev/null
+++ b/app/components/posts/detail/PostDetailHeader.css.ts
@@ -0,0 +1,23 @@
+import { css } from "hono/css";
+
+const postDetailHeaderWrapper = css`
+ margin-bottom: 32px;
+`;
+
+const postDetailHeaderTitle = css`
+ font-size: 32px;
+ font-weight: bold;
+`;
+
+const postDetailHeaderDivider = css`
+ margin-top: 16px;
+ margin-bottom: 12px;
+ background: transparent;
+ border-bottom: 1px solid #d0d7de;
+ height: 1px;
+ padding: 0;
+ background-color: #d0d7de;
+ border: 0;
+`;
+
+export { postDetailHeaderWrapper, postDetailHeaderTitle, postDetailHeaderDivider };
diff --git a/app/components/posts/detail/PostDetailHeader.tsx b/app/components/posts/detail/PostDetailHeader.tsx
new file mode 100644
index 0000000..2069c94
--- /dev/null
+++ b/app/components/posts/detail/PostDetailHeader.tsx
@@ -0,0 +1,22 @@
+import type { FC } from "hono/jsx";
+import { postDetailHeaderDivider, postDetailHeaderTitle, postDetailHeaderWrapper } from "./PostDetailHeader.css";
+
+type Props = {
+ title: string;
+ publishedAt: string;
+};
+
+const PostDetailHeader: FC = ({ title, publishedAt }) => {
+ return (
+
+ );
+};
+
+export { PostDetailHeader };
diff --git a/app/global.d.ts b/app/global.d.ts
index 6d6eb25..b1db101 100644
--- a/app/global.d.ts
+++ b/app/global.d.ts
@@ -2,7 +2,7 @@ import {} from "hono";
type Head = {
title?: string;
- description?: string;
+ publishedAt?: string;
};
declare module "hono" {
diff --git a/app/routes/_renderer.tsx b/app/routes/_renderer.tsx
index aad8073..3c239df 100644
--- a/app/routes/_renderer.tsx
+++ b/app/routes/_renderer.tsx
@@ -52,11 +52,11 @@ export default jsxRenderer(({ children, title }) => {
{_title}
- Sorry, Out of Service.
}>
-
+
+ Sorry, something wrong with this page.}>
{children}
-
+