Skip to content
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
4 changes: 2 additions & 2 deletions app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ async function BlogContent({ slug }: { slug: string }) {
{blogs
.filter((b) => blog !== b)
.slice(0, 2)
.map((blog) => (
<BlogCard key={blog.metadata.title} blog={blog} />
.map((blog, i) => (
<BlogCard key={blog.metadata.title} blog={blog} index={i} />
))}
</div>
</div>
Expand Down
23 changes: 15 additions & 8 deletions app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Link from "next/link";
import { ArrowRightUp, Calendar, Edit } from "reicon-react";
import { type BlogData, getBlogs } from "./loader";

export function BlogCard({ blog }: { blog: BlogData }) {
export function BlogCard({ blog, index }: { blog: BlogData; index: number }) {
const isFeatured = blog.metadata.featured;

return (
Expand All @@ -25,11 +25,18 @@ export function BlogCard({ blog }: { blog: BlogData }) {
</div>
)}

{isFeatured && (
<span className="bg-accent-muted text-text-primary px-xs py-xxs rounded-md text-xs">
Featured
</span>
)}
<div className="flex items-center gap-xxs">
{index === 0 && (
<span className="bg-accent-muted text-text-primary px-xs py-xxs rounded-md text-xs">
Latest
</span>
)}
{isFeatured && (
<span className="bg-accent-muted text-text-primary px-xs py-xxs rounded-md text-xs">
Featured
</span>
)}
</div>
</div>

<h2 className="text-2xl">
Expand Down Expand Up @@ -108,8 +115,8 @@ export default async function Blog() {

<div className="max-w-7xl w-full px-md py-lg">
<div className="grid grid-cols-1 md:grid-cols-3 gap-md grid-flow-dense">
{blogs.map((blog) => (
<BlogCard key={blog.metadata.title} blog={blog} />
{blogs.map((blog, i) => (
<BlogCard key={blog.metadata.title} blog={blog} index={i} />
))}
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/partners/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ export default function Partners() {
<h1 className="text-2xl">{partner.name}</h1>
<span className="text-text-secondary">{partner.description}</span>
<Link
href={partner.url}
href={`${partner.url}?utm_source=devhub&utm_medium=partner&ref=devhub`}
target="_blank"
rel="noopener noreferrer"
className="w-fit"
>
<Button icon={ArrowRight} className="text-sm px-sm py-xs">
See more
Expand Down
1 change: 0 additions & 1 deletion content/blog/what-happens-when-you-type-google.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,4 +779,3 @@ And finally, **you see a webpage.**
All from six characters. That's the web. And that's what happens when you type `google.com`.

> **The Internet feels simple because billions of complicated decisions happen underneath the surface.**

2 changes: 1 addition & 1 deletion content/data/authors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export const authors: Author[] = [
social: "https://github.com/spideythedev",
avatar: "https://avatars.githubusercontent.com/u/221688867?s=64&v=4",
},
];
];
Loading