Skip to content

Commit

Permalink
Merge pull request #22 from berachain/updateToLatest
Browse files Browse the repository at this point in the history
add draft env
  • Loading branch information
garrettparris authored May 7, 2024
2 parents 7aad764 + 2b2c7c6 commit 35c4078
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 10 deletions.
13 changes: 5 additions & 8 deletions app/(marketing)/blog/blogCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export default function BlogCard({ post }: BlogCardProps) {
<Link href={`/blog/${post.slug}`}>
<article
key={post.id}
className="group relative flex flex-col space-y-2 overflow-hidden"
className="card-hover group relative flex flex-col space-y-2 overflow-hidden"
>
{post.feature_image && (
<Image
src={post.feature_image}
alt={post.title}
width={804}
height={452}
className="rounded-md border bg-muted transition-colors"
className="image-zoom bg-muted rounded-md border transition-colors"
/>
)}
<div className="text-3xl font-extrabold xl:text-4xl">
Expand All @@ -36,15 +36,15 @@ export default function BlogCard({ post }: BlogCardProps) {
author ? (
<div
key={author.id}
className="flex items-center space-x-2 text-sm gap-4"
className=" flex items-center gap-4 space-x-2 text-sm"
>
{author?.profile_image ? (
<Image
src={author?.profile_image ?? "/avatar.png"}
alt={author?.name}
width={36}
height={36}
className="rounded-full bg-white"
className="rounded-full bg-white "
/>
) : (
<Icons.user className="h-8 w-8 rounded-full bg-white" />
Expand All @@ -59,11 +59,8 @@ export default function BlogCard({ post }: BlogCardProps) {
)}
</div>
) : null}
{/* {post.excerpt && (
<p className="text-muted-foreground">{post.excerpt}</p>
)} */}
{post.published_at && (
<div className="text-sm text-muted-foreground">
<div className="text-muted-foreground text-sm">
{formatDate(post.published_at)}
</div>
)}
Expand Down
3 changes: 2 additions & 1 deletion app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const metadata = {
}

export default async function BlogPage() {
const isProd = process.env.VERCEL_ENV === "production"
const posts = await getPosts().then((res) => {
try {
const jsonString = JSON.stringify(res)
Expand All @@ -28,7 +29,7 @@ export default async function BlogPage() {
console.log("error : ", error)
}
return res
.filter((post) => post.visibility === "public")
.filter((post) => (isProd ? post.visibility === "public" : true))
.sort((a, b) => {
return compareDesc(new Date(a.published_at), new Date(b.published_at))
})
Expand Down
115 changes: 114 additions & 1 deletion data/search.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,8 @@
font-feature-settings: "rlig" 1, "calt" 1;
}
}

.card-hover:hover .image-zoom {
transform: scale(1.05);
transition: transform 0.3s ease-in-out;
}

0 comments on commit 35c4078

Please sign in to comment.