mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
chore: maintenance
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { GetStaticProps, GetStaticPaths } from 'next'
|
||||
import { GetStaticProps, GetStaticPaths, NextPage } from 'next'
|
||||
import { MDXRemote } from 'next-mdx-remote'
|
||||
import date from 'date-and-time'
|
||||
import 'prism-themes/themes/prism-one-dark.css'
|
||||
@ -12,7 +12,7 @@ interface BlogPostPageProps extends FooterProps {
|
||||
post: Post
|
||||
}
|
||||
|
||||
const BlogPostPage: React.FC<BlogPostPageProps> = (props) => {
|
||||
const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
|
||||
const { version, post } = props
|
||||
|
||||
return (
|
||||
@ -23,8 +23,8 @@ const BlogPostPage: React.FC<BlogPostPageProps> = (props) => {
|
||||
/>
|
||||
|
||||
<Header />
|
||||
<main className='flex flex-col flex-wrap flex-1 items-center'>
|
||||
<div className='flex flex-col items-center my-10'>
|
||||
<main className='flex flex-1 flex-col flex-wrap items-center'>
|
||||
<div className='my-10 flex flex-col items-center'>
|
||||
<h1 className='text-3xl font-semibold'>{post.frontmatter.title}</h1>
|
||||
<p className='mt-2' data-cy='blog-post-date'>
|
||||
{date.format(new Date(post.frontmatter.publishedOn), 'DD/MM/YYYY')}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { GetStaticProps } from 'next'
|
||||
import { GetStaticProps, NextPage } from 'next'
|
||||
import Link from 'next/link'
|
||||
import date from 'date-and-time'
|
||||
|
||||
@ -15,7 +15,7 @@ interface BlogPageProps extends FooterProps {
|
||||
posts: PostMetadata[]
|
||||
}
|
||||
|
||||
const BlogPage: React.FC<BlogPageProps> = (props) => {
|
||||
const BlogPage: NextPage<BlogPageProps> = (props) => {
|
||||
const { version, posts } = props
|
||||
|
||||
return (
|
||||
@ -23,14 +23,14 @@ const BlogPage: React.FC<BlogPageProps> = (props) => {
|
||||
<Head title='Blog | Divlo' description={blogDescription} />
|
||||
|
||||
<Header />
|
||||
<main className='flex flex-col flex-wrap flex-1 items-center'>
|
||||
<div className='flex flex-col items-center mt-10'>
|
||||
<main className='flex flex-1 flex-col flex-wrap items-center'>
|
||||
<div className='mt-10 flex flex-col items-center'>
|
||||
<h1 className='text-4xl font-semibold'>Blog</h1>
|
||||
<p className='mt-6' data-cy='blog-post-date'>
|
||||
{blogDescription}
|
||||
</p>
|
||||
</div>
|
||||
<div className='w-full flex items-center justify-center p-8'>
|
||||
<div className='flex w-full items-center justify-center p-8'>
|
||||
<div className='w-[1600px]' data-cy='blog-posts'>
|
||||
{posts.map((post, index) => {
|
||||
const postPublishedOn = date.format(
|
||||
@ -40,7 +40,7 @@ const BlogPage: React.FC<BlogPageProps> = (props) => {
|
||||
return (
|
||||
<Link href={`/blog/${post.slug}`} key={index}>
|
||||
<a data-cy='blog-post'>
|
||||
<ShadowContainer className='p-6 cursor-pointer transition duration-200 ease-in-out hover:-translate-y-2'>
|
||||
<ShadowContainer className='cursor-pointer p-6 transition duration-200 ease-in-out hover:-translate-y-2'>
|
||||
<h2
|
||||
data-cy='blog-post-title'
|
||||
className='text-xl font-semibold'
|
||||
|
Reference in New Issue
Block a user