diff --git a/packages/frontpage/app/(app)/layout.tsx b/packages/frontpage/app/(app)/layout.tsx index 232502d..8340a9f 100644 --- a/packages/frontpage/app/(app)/layout.tsx +++ b/packages/frontpage/app/(app)/layout.tsx @@ -31,7 +31,8 @@ export default async function Layout({ }) { const session = await getSession(); return ( - <div className="container mx-auto px-4 md:px-6 pt-4 pb-8 md:py-12 max-w-3xl"> + <div className="container mx-auto px-4 md:px-6 pt-4 pb-8 md:py-12"> + {/* <div className="container mx-auto px-4 md:px-6 pt-4 pb-8 md:py-12 max-w-3xl"> */} <div className="flex place-content-between items-center mb-8"> <Link href="/"> {/* eslint-disable-next-line @next/next/no-img-element */} @@ -52,6 +53,8 @@ export default async function Layout({ <main className="mb-6">{children}</main> + <footer> <span className="flex flex-row-reverse"><a href="https://github.com/likeandscribe/frontpage/" className="text-blue-600"><img src="https://raw.githubusercontent.com/likeandscribe/frontpage/refs/heads/main/packages/frontpage/public/frontpage-logo.svg" alt="Frontpage | MIT License | https://github.com/likeandscribe/frontpage/blob/main/LICENSE" className="h-10" /></a></span> <span className="flex justify-center items-center text-gray-500 dark:text-gray-400"> <a href={`https://bsky.app/profile/${FRONTPAGE_ATPROTO_HANDLE}`} className="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300" > @syui.ai </a> </span> </footer> + {/* <footer className="flex justify-between items-center text-gray-500 dark:text-gray-400"> <p> Made by{" "} @@ -59,10 +62,11 @@ export default async function Layout({ href={`https://bsky.app/profile/${FRONTPAGE_ATPROTO_HANDLE}`} className="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300" > - @frontpage.fyi <OpenInNewWindowIcon className="inline" /> + @o.syui.ai <OpenInNewWindowIcon className="inline" /> </a> </p> </footer> + */} </div> ); } @@ -141,8 +145,8 @@ async function LoginOrLogout() { } return ( - <Button variant="outline" asChild> - <Link href="/login">Login</Link> + <Button asChild> + <Link href="/login">@</Link> </Button> ); } diff --git a/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/_lib/comment-client.tsx b/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/_lib/comment-client.tsx index 71dd664..46ab83a 100644 --- a/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/_lib/comment-client.tsx +++ b/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/_lib/comment-client.tsx @@ -283,16 +283,16 @@ export function NewComment({ ref={textAreaRef} placeholder="Write a comment..." disabled={isPending} - className="resize-y flex-1" + className="" /> <div className="w-full flex justify-between"> <InputLengthIndicator length={input.length} maxLength={MAX_COMMENT_LENGTH} /> - <div className="flex gap-2"> + <div className="w-full"> {extraButton} - <Button type="submit" disabled={isPending}> + <Button type="submit" disabled={isPending} className="w-full"> {isPending ? <Spinner /> : "Post"} </Button> </div> diff --git a/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/layout.tsx b/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/layout.tsx index 517c871..ef73ecb 100644 --- a/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/layout.tsx +++ b/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/layout.tsx @@ -29,7 +29,7 @@ export default async function Post(props: { } return ( - <main className="mx-auto max-w-4xl space-y-6"> + <main className="mx-auto space-y-1"> <PostCard author={post.authorDid} createdAt={post.createdAt} diff --git a/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/page.tsx b/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/page.tsx index a83f810..11003f9 100644 --- a/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/page.tsx +++ b/packages/frontpage/app/(app)/post/[postAuthor]/[postRkey]/page.tsx @@ -20,7 +20,7 @@ export async function generateMetadata(props: { title: post.title, description: "Discuss this post on Frontpage.", alternates: { - canonical: `https://frontpage.fyi${path}`, + canonical: `https://o.syui.ai${path}`, }, openGraph: { title: post.title, @@ -28,7 +28,7 @@ export async function generateMetadata(props: { type: "article", publishedTime: post.createdAt.toISOString(), authors: [`@${handle}`], - url: `https://frontpage.fyi${path}`, + url: `https://o.syui.ai${path}`, images: [ { url: `${path}/og-image`, @@ -45,6 +45,8 @@ export default async function Post(props: { params: Promise<PostPageParams> }) { return ( <> + + {/* <LinkAlternateAtUri authority={authorDid} collection={PostCollection} @@ -65,6 +67,71 @@ export default async function Post(props: { params: Promise<PostPageParams> }) { /> ))} </div> + */} + + {params.postAuthor === "syui.ai" && (post.title.includes("live") || post.title.includes("video")) && ( + <div className="flex py-10 max-h-[720px] md:h-screen space-x-8"> + <iframe className="w-full h-[300px] sm:h-[450px] md:h-[630px] + [&::-webkit-scrollbar]:w-2 + [&::-webkit-scrollbar-track]:bg-gray-100 + [&::-webkit-scrollbar-thumb]:bg-gray-300 + dark:[&::-webkit-scrollbar-track]:bg-neutral-700 + dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" + title="stream" src={post.url}> + </iframe> + <div className="hidden w-64 hidden-scrollbar md:block md:overflow-y-scroll + max-h-[600px] + [&::-webkit-scrollbar]:w-2 + [&::-webkit-scrollbar-track]:bg-gray-100 + [&::-webkit-scrollbar-thumb]:bg-gray-300 + dark:[&::-webkit-scrollbar-track]:bg-neutral-700 + dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"> + <LinkAlternateAtUri + authority={authorDid} + collection={PostCollection} + rkey={post.rkey} + /> + <NewComment postRkey={post.rkey} postAuthorDid={authorDid} /> + {comments.map((comment) => ( + <Comment + key={comment.id} + comment={comment} + level={0} + postAuthorParam={params.postAuthor} + postRkey={post.rkey} + /> + ))} + </div> + </div> + )} + <LinkAlternateAtUri + authority={authorDid} + collection={PostCollection} + rkey={post.rkey} + /> + {post.status === "live" ? ( + <NewComment postRkey={post.rkey} postAuthorDid={authorDid} /> + ) : ( + <Alert> + <AlertTitle>This post has been deleted</AlertTitle> + <AlertDescription> + Deleted posts cannot receive new comments. + </AlertDescription> + </Alert> + )} + <div className="flex flex-col gap-6 bg-white"> + {comments.map((comment) => ( + <Comment + key={comment.id} + comment={comment} + level={0} + postAuthorParam={params.postAuthor} + postRkey={post.rkey} + /> + ))} + + </div> + </> ); } diff --git a/packages/frontpage/app/(auth)/login/page.tsx b/packages/frontpage/app/(auth)/login/page.tsx index e3165f9..4d661ce 100644 --- a/packages/frontpage/app/(auth)/login/page.tsx +++ b/packages/frontpage/app/(auth)/login/page.tsx @@ -14,17 +14,15 @@ export default async function LoginPage() { <div className="w-full max-w-md space-y-6"> <div className="text-center"> <h2 className="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100"> - Sign in to Frontpage + Login with <span className="text-blue-600">at</span>proto </h2> <p className="mt-2 text-sm text-gray-600 dark:text-gray-400"> - Don't have an account?{" "} <a href="https://bsky.app/" className="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300" > - Sign up on Bluesky - </a> - , then return here to login. + Bluesky + </a> oauth login </p> </div> <LoginForm /> diff --git a/packages/frontpage/app/globals.css b/packages/frontpage/app/globals.css index 9abc86b..464377c 100644 --- a/packages/frontpage/app/globals.css +++ b/packages/frontpage/app/globals.css @@ -13,8 +13,12 @@ --popover: 0 0% 100%; --popover-foreground: 222.2 84% 4.9%; + /* --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; + --primary-foreground: 210 40% 98%; */ + + --primary: 210 100% 50%; /* HSLカラーで青色を定義 */ + --primary-foreground: 0 0% 100%; /* 白色のテキスト */ --secondary: 210 40% 96.1%; --secondary-foreground: 222.2 47.4% 11.2%; @@ -67,8 +71,12 @@ --popover: 222.2 84% 4.9%; --popover-foreground: 210 40% 98%; - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; + /*--primary: 210 40% 98%; + *--primary-foreground: 222.2 47.4% 11.2%;*/ + + /* ダークモード用に少し明るい青 */ + --primary: 210 100% 60%; + --primary-foreground: 0 0% 100%; --secondary: 217.2 32.6% 17.5%; --secondary-foreground: 210 40% 98%; @@ -89,3 +97,7 @@ --input: 217.2 32.6% 17.5%; --ring: 215.4 16.3% 46.9%; } diff --git a/packages/frontpage/app/layout.tsx b/packages/frontpage/app/layout.tsx index e8b5a39..a9fa945 100644 --- a/packages/frontpage/app/layout.tsx +++ b/packages/frontpage/app/layout.tsx @@ -22,13 +22,13 @@ const sourceSans = Source_Sans_3({ }); export const metadata: Metadata = { - title: "Frontpage", + title: "o.syui.ai", description: "A federated link aggregator. Your frontpage to the internet.", openGraph: { title: "Frontpage", description: "Your frontpage to the internet.", type: "website", - siteName: "frontpage.fyi", + siteName: "o.syui.ai", }, }; @@ -53,11 +53,7 @@ export default function Layout({ children }: { children: React.ReactNode }) { <SpeedInsights /> <Analytics /> </ThemeProvider> - <script - defer - src="https://static.cloudflareinsights.com/beacon.min.js" - data-cf-beacon='{"token": "5e64b32c70b34b1583d863032b03d9ad"}' - /> + {/* <script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon='{"token": "5e64b32c70b34b1583d863032b03d9ad"}' /> */} </body> </html> ); diff --git a/packages/frontpage/app/(app)/_components/post-card.tsx b/packages/frontpage/app/(app)/_components/post-card.tsx index c0720e5..e619a5f 100644 --- a/packages/frontpage/app/(app)/_components/post-card.tsx +++ b/packages/frontpage/app/(app)/_components/post-card.tsx @@ -83,7 +83,7 @@ export async function PostCard({ votes={votes} /> </div> - <div className="w-full"> + <div className="w-full overflow-hidden"> <h2 className="mb-1 text-xl"> <a href={url}