feat(likes): row list layout with real screenshots #6
No files matched your search
+51
-15
@@ -1,35 +1,71 @@
|
|||||||
import projectsData from '@/data/likesData'
|
import likesData from '@/data/likesData'
|
||||||
import Card from '@/components/Card'
|
import Image from '@/components/Image'
|
||||||
|
import Link from '@/components/Link'
|
||||||
import { genPageMetadata } from 'app/seo'
|
import { genPageMetadata } from 'app/seo'
|
||||||
|
|
||||||
export const metadata = genPageMetadata({ title: 'Likes' })
|
export const metadata = genPageMetadata({ title: 'Likes' })
|
||||||
|
|
||||||
export default function Likes() {
|
export default function Likes() {
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||||
<div className="space-y-2 pb-8 pt-6 md:space-y-5">
|
<div className="space-y-2 pb-8 pt-6 md:space-y-5">
|
||||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||||
Likes
|
Likes
|
||||||
|
<span className="ml-3 inline-block rounded-full border border-primary-500/40 px-2.5 py-0.5 align-middle text-xs font-semibold uppercase tracking-wide text-primary-500">
|
||||||
|
{likesData.length} things
|
||||||
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
|
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
|
||||||
These things are pretty cool, check 'em out.
|
These things are pretty cool, check 'em out.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="container py-12">
|
<ul className="py-2">
|
||||||
<div className="-m-4 flex flex-wrap">
|
{likesData.map((d) => (
|
||||||
{projectsData.map((d) => (
|
<li key={d.title} className="border-b border-gray-200 last:border-0 dark:border-gray-700">
|
||||||
<Card
|
<Link
|
||||||
key={d.title}
|
|
||||||
title={d.title}
|
|
||||||
description={d.description}
|
|
||||||
imgSrc={d.imgSrc}
|
|
||||||
href={d.href}
|
href={d.href}
|
||||||
|
aria-label={`Link to ${d.title}`}
|
||||||
|
className="group flex items-center gap-5 rounded-lg px-4 py-5 transition-colors hover:bg-gray-100 dark:hover:bg-gray-900"
|
||||||
|
>
|
||||||
|
<span className="h-[135px] w-[240px] flex-none overflow-hidden rounded-lg border border-gray-200 bg-gray-200 dark:border-gray-700 dark:bg-gray-800">
|
||||||
|
<Image
|
||||||
|
src={d.imgSrc}
|
||||||
|
alt={d.title}
|
||||||
|
width={480}
|
||||||
|
height={270}
|
||||||
|
className="h-full w-full object-cover object-center"
|
||||||
/>
|
/>
|
||||||
|
</span>
|
||||||
|
<span className="min-w-0 flex-1">
|
||||||
|
<span className="block text-xl font-semibold tracking-tight text-gray-900 dark:text-gray-100">
|
||||||
|
{d.title}
|
||||||
|
</span>
|
||||||
|
<span className="mt-1.5 block max-w-[46ch] text-[15px] text-gray-500 dark:text-gray-400">
|
||||||
|
{d.description}
|
||||||
|
</span>
|
||||||
|
{d.host && (
|
||||||
|
<span className="mt-2.5 block font-mono text-xs text-gray-500 dark:text-gray-400">
|
||||||
|
{d.host}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
<svg
|
||||||
|
className="h-5 w-5 flex-none text-primary-500 opacity-60 transition group-hover:opacity-100"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<path d="M7 17 17 7" />
|
||||||
|
<path d="M8 7h9v9" />
|
||||||
|
</svg>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
))}
|
))}
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
+9
-5
@@ -1,8 +1,9 @@
|
|||||||
interface Likes {
|
interface Likes {
|
||||||
title: string
|
title: string
|
||||||
description: string
|
description: string
|
||||||
href?: string
|
href: string
|
||||||
imgSrc?: string
|
imgSrc: string
|
||||||
|
host: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const likesData: Likes[] = [
|
const likesData: Likes[] = [
|
||||||
@@ -10,19 +11,22 @@ const likesData: Likes[] = [
|
|||||||
title: 'Gitea',
|
title: 'Gitea',
|
||||||
description: `My git server. Where all of the development happens.`,
|
description: `My git server. Where all of the development happens.`,
|
||||||
href: 'https://git.jonb.io/',
|
href: 'https://git.jonb.io/',
|
||||||
imgSrc: 'https://s3.jonb.io/cdn/likes/gitea.jpeg',
|
imgSrc: 'https://s3.jonb.io/cdn/likes/gitea.jpg',
|
||||||
|
host: 'git.jonb.io',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Castlemine Map',
|
title: 'Castlemine Map',
|
||||||
description: `Minecraft map for the castlemine.jonb.io server.`,
|
description: `Minecraft map for the castlemine.jonb.io server.`,
|
||||||
href: 'https://castlemine-map.jonb.io/',
|
href: 'https://castlemine-map.jonb.io/',
|
||||||
imgSrc: 'https://s3.jonb.io/cdn/likes/minecraft.jpeg',
|
imgSrc: 'https://s3.jonb.io/cdn/likes/castlemine.jpg',
|
||||||
|
host: 'castlemine-map.jonb.io',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Uptime Kuma',
|
title: 'Uptime Kuma',
|
||||||
description: `App that monitors the kingdom.`,
|
description: `App that monitors the kingdom.`,
|
||||||
href: 'https://up.jonb.io/status/default',
|
href: 'https://up.jonb.io/status/default',
|
||||||
imgSrc: 'https://s3.jonb.io/cdn/likes/uptime-kuma.jpeg',
|
imgSrc: 'https://s3.jonb.io/cdn/likes/uptime-kuma.jpg',
|
||||||
|
host: 'up.jonb.io',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user