Updates
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import EmptyContent from "@/components/lib/elements/EmptyContent";
|
||||
import Section from "@/components/lib/layout/Section";
|
||||
import { AppContext } from "@/pages/_app";
|
||||
import React from "react";
|
||||
import BlogPostsListCard from "./BlogPostsListCard";
|
||||
import Stack from "@/components/lib/layout/Stack";
|
||||
|
||||
export default function BlogPostsList() {
|
||||
const { pageProps } = React.useContext(AppContext);
|
||||
const { blogPosts } = pageProps;
|
||||
|
||||
if (!blogPosts?.[0]) {
|
||||
return <EmptyContent title={`No Blog Posts at this moment`} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Section className="!mt-0 !pt-0">
|
||||
<Stack className="w-full">
|
||||
{blogPosts.map((post, index) => {
|
||||
return <BlogPostsListCard post={post} key={index} />;
|
||||
})}
|
||||
</Stack>
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import Card from "@/components/lib/elements/Card";
|
||||
import H2 from "@/components/lib/layout/H2";
|
||||
import Row from "@/components/lib/layout/Row";
|
||||
import Span from "@/components/lib/layout/Span";
|
||||
import Stack from "@/components/lib/layout/Stack";
|
||||
import { DSQL_TBENME_BLOG_POSTS } from "@/types";
|
||||
import {
|
||||
ArrowRight,
|
||||
ArrowUpRight,
|
||||
CircleArrowOutUpRight,
|
||||
Clock,
|
||||
} from "lucide-react";
|
||||
import React from "react";
|
||||
|
||||
type Props = {
|
||||
post: DSQL_TBENME_BLOG_POSTS;
|
||||
};
|
||||
|
||||
export default function BlogPostsListCard({ post }: Props) {
|
||||
return (
|
||||
<Card
|
||||
href={`/blog/${post.slug}`}
|
||||
linkProps={{ className: "p-0 !text-white" }}
|
||||
>
|
||||
<Row className="w-full justify-between">
|
||||
<Stack className="gap-1">
|
||||
<H2>{post.title}</H2>
|
||||
<Span size="large" className="mb-2">
|
||||
{post.excerpt}
|
||||
</Span>
|
||||
<Row>
|
||||
<Clock size={13} opacity={0.4} />
|
||||
<Span size="smaller" variant="faded">
|
||||
{post.date_created?.substring(0, 24)}
|
||||
</Span>
|
||||
</Row>
|
||||
</Stack>
|
||||
<ArrowUpRight />
|
||||
</Row>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import EmptyContent from "@/components/lib/elements/EmptyContent";
|
||||
import H1 from "@/components/lib/layout/H1";
|
||||
import Section from "@/components/lib/layout/Section";
|
||||
import Span from "@/components/lib/layout/Span";
|
||||
import Stack from "@/components/lib/layout/Stack";
|
||||
import { AppContext } from "@/pages/_app";
|
||||
import React from "react";
|
||||
|
||||
export default function Hero() {
|
||||
const { pageProps } = React.useContext(AppContext);
|
||||
const { blogPosts } = pageProps;
|
||||
|
||||
return (
|
||||
<Section>
|
||||
<Stack className="w-full gap-0">
|
||||
<H1 className="leading-snug">Tech Musings</H1>
|
||||
<Span>
|
||||
A few takes and tips from my encyclopedia of knowledge in
|
||||
the tech industry
|
||||
</Span>
|
||||
</Stack>
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user