Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[recnet-web] Adjust og and metadata desc #343

Merged
merged 3 commits into from
Oct 28, 2024
Merged
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
18 changes: 10 additions & 8 deletions apps/recnet/src/app/[handle]/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { cn } from "@recnet/recnet-web/utils/cn";
// Image metadata
export const alt = "User Profile";
export const size = {
width: 1200,
height: 630,
width: 1600,
height: 900,
};

export const contentType = "image/png";
Expand Down Expand Up @@ -40,7 +40,7 @@ export default async function Image({
"flex flex-col justify-start bg-white w-full h-full",
"p-8",
"gap-y-2",
"text-[32px]"
"text-[48px]"
)}
>
<div tw="flex flex-row items-center">
Expand All @@ -50,13 +50,15 @@ export default async function Image({
tw="w-10 h-10 mr-4"
alt={"recnet-logo"}
/>
<p tw={cn("text-[24px] text-[#0090FF]")}> RecNet </p>
<p tw={cn("text-[32px] text-[#0090FF]")}> RecNet </p>
</div>
<div tw={cn("flex flex-row justify-between")}>
<div tw={cn("flex flex-col gap-y-2", "w-[65%]")}>
<p>
<p tw="inline-block align-bottom">
{user?.displayName}{" "}
<span tw="text-gray-600 mx-1 text-[32px]">(@{user.handle})</span>
<span tw="text-gray-600 mx-3 text-[36px] my-auto">
(@{user.handle})
</span>
</p>
<div tw="whitespace-pre-line text-[24px] text-gray-600">
{user.bio}
Expand All @@ -65,11 +67,11 @@ export default async function Image({
{/* eslint-disable-next-line */}
<img
src={user?.photoUrl ?? "https://imgur.com/jVp1pG1.png"}
tw="w-[120px] h-[120px] rounded-full mx-8"
tw="w-[150px] h-[150px] rounded-full mx-8"
alt={"User Profile Picture"}
/>
</div>
<p tw="text-[18px] text-gray-500">
<p tw="text-[24px] text-gray-500">
<span>
{user.numFollowers} follower{user.numFollowers > 1 ? "s" : ""}
</span>
Expand Down
4 changes: 2 additions & 2 deletions apps/recnet/src/app/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { cn } from "@recnet/recnet-web/utils/cn";
// Image metadata
export const alt = "RecNet";
export const size = {
width: 1200,
height: 630,
width: 1600,
height: 900,
};

export const contentType = "image/png";
Expand Down
10 changes: 5 additions & 5 deletions apps/recnet/src/app/rec/[id]/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { formatDate } from "@recnet/recnet-date-fns";
// Image metadata
export const alt = "RecNet Recommendation";
export const size = {
width: 1200,
height: 630,
width: 1600,
height: 900,
};

export const contentType = "image/png";
Expand Down Expand Up @@ -44,11 +44,11 @@ export default async function Image({ params }: { params: { id: string } }) {
tw="w-10 h-10 mr-4"
alt={"recnet-logo"}
/>
<p tw={cn("text-[24px] text-[#0090FF]")}> RecNet </p>
<p tw={cn("text-[32px] text-[#0090FF]")}> RecNet </p>
</div>
<div tw="font-medium">{rec.article.title}</div>
<p tw="text-[24px] text-gray-700">{rec.description} </p>
<p tw={cn("text-[18px] text-gray-600")}>{rec.article.author} </p>
<p tw="text-[28px] text-gray-700">{rec.description} </p>
<p tw={cn("text-[24px] text-gray-600")}>{rec.article.author} </p>
<div
tw={cn(
"flex flex-row items-center",
Expand Down
2 changes: 1 addition & 1 deletion apps/recnet/src/app/rec/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function generateMetadata({

return {
title: rec.article.title,
description: rec.description,
description: `${rec.user.displayName} recommends: ${rec.description}`,
};
}

Expand Down
Loading