ad24a0c855
* Added most of the stuff * Updated pages * Removed unrequired deps * API fixes * Fixes fixes and updated readme * Updated og image * Added demo and links to example * Updated packages * update name. bump dependencies * Renamed .env.example to .env.local.example * Added node_modules to .gitignore * use recommended config * enable absolute import/alias support * remove jsconfig.json * allow HTML entities in post titles * add underline to content links * add basic ul & ol styles * add code block styles * add basic text alignment * add basic image alignment styles * adjust pre font-size and figcaption * indent ul,ol lists to line up with grid * add basic button styles * add basic file styles * add basic blockquote style * add basic audio styles * add h4 and enhance blockquote styles * add basic cover block styles * add basic verse styles * add basic two-column block styles * add tags * add categories * Only ignore .vercel The rest is injected by create-next-app * now → vercel * npm init → npx * Wordsmith * Wordsmith * Wordsmith * Wordsmith * Improve issue link * Wordsmith Co-authored-by: Greg Rickaby <greg@gregrickaby.com> Co-authored-by: Joe Haddad <joe.haddad@zeit.co> Co-authored-by: Shu Uesugi <shu@chibicode.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
37 lines
907 B
JavaScript
37 lines
907 B
JavaScript
import Avatar from '../components/avatar'
|
|
import Date from '../components/date'
|
|
import CoverImage from './cover-image'
|
|
import Link from 'next/link'
|
|
|
|
export default function PostPreview({
|
|
title,
|
|
coverImage,
|
|
date,
|
|
excerpt,
|
|
author,
|
|
slug,
|
|
}) {
|
|
return (
|
|
<div>
|
|
<div className="mb-5">
|
|
<CoverImage title={title} coverImage={coverImage} slug={slug} />
|
|
</div>
|
|
<h3 className="text-3xl mb-3 leading-snug">
|
|
<Link as={`/posts/${slug}`} href="/posts/[slug]">
|
|
<a
|
|
className="hover:underline"
|
|
dangerouslySetInnerHTML={{ __html: title }}
|
|
></a>
|
|
</Link>
|
|
</h3>
|
|
<div className="text-lg mb-4">
|
|
<Date dateString={date} />
|
|
</div>
|
|
<div
|
|
className="text-lg leading-relaxed mb-4"
|
|
dangerouslySetInnerHTML={{ __html: excerpt }}
|
|
/>
|
|
<Avatar author={author} />
|
|
</div>
|
|
)
|
|
}
|