* [packages][m]: mv @flowershow/core package here * [packages/core][xs]: rename to @portaljs/core * [package.json][xs]: setup npm workspaces * [packages/core][xs]:replace deprecated rollup executor * [core/package.json][s]: fix mermaid versions * [core/tsconfig][xs]: rm extends * [core/jest.config][xs]: rm coverageDirectory * [core/package.json][xs]: install core-js * [packages.json][s]:use same version for all nrwl packages * [core/.eslintrc][xs]: adjust ignorePatterns * [core/project.json][xs]: rm publish targets * [packages][m]: mv @flowershow/remark-wiki-link here * [packages][m]: mv @flowershow/remark-wiki-link here * [packages][m]: mv @flowershow/remark-embed here * [remark-callouts/project.json][xs]: adjst test pattern * [package.json][s]: install missing deps * [remark-callouts][xs]: adjst fields in package.json * [remark-callouts][s]: rm pubish targets and adjst build executor * [remark-embed/jest.config][xs]: rm unknown option coverageDirectory * [remark-embed][xs]: rm publish targets * [remark-embed][s]: rename to @portaljs/remark-embed * [remark-wiki-link/eslintrc][xs]:adjst ignorePatterns * [package.json][xs]: install missing deps * [remark-wiki-link/test][xs]:specify format - also temporarily force any type on htmlExtension * [remark-wiki-link/README][xs]: replace @flowershow with @portaljs * [remark-wiki-link][xs]:rm old changelog * [remark-wiki-link][xs]: adjst package.json * [remark-wiki-link/project.json][xs]: rm publish targets * [core][s]: rm old changelog * [core/README][xs]:correct scope name * [remark-callouts/README][xs]: add @portaljs to pckg name * [remark-embed/README][xs]: add @portaljs to pckg name * [package-lock.json][xs]: refresh after rebasing on main
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { Card } from "../Card";
|
|
import { formatDate } from "../../utils/formatDate";
|
|
import { Blog } from "../types";
|
|
|
|
interface Props {
|
|
blog: Blog;
|
|
}
|
|
|
|
export const BlogItem: React.FC<Props> = ({ blog }) => {
|
|
return (
|
|
<article className="blogitem md:grid md:grid-cols-4 md:items-baseline">
|
|
<Card className="blogitem-card md:col-span-3">
|
|
<Card.Title className="blogitem-title" href={`${blog.urlPath}`}>
|
|
{blog.title}
|
|
</Card.Title>
|
|
<Card.Eyebrow
|
|
as="time"
|
|
dateTime={blog.date}
|
|
className="blogitem-date md:hidden"
|
|
decorate
|
|
>
|
|
{formatDate(blog.date)}
|
|
</Card.Eyebrow>
|
|
{blog.description && (
|
|
<Card.Description className="blogitem-descr">
|
|
{blog.description}
|
|
</Card.Description>
|
|
)}
|
|
<Card.Cta className="blogitem-cta">Read article</Card.Cta>
|
|
</Card>
|
|
<Card.Eyebrow
|
|
as="time"
|
|
dateTime={blog.date}
|
|
className="blogitem-date mt-1 hidden md:block"
|
|
>
|
|
{formatDate(blog.date)}
|
|
</Card.Eyebrow>
|
|
</article>
|
|
);
|
|
};
|