diff --git a/next.config.js b/next.config.js index e61ca03..4b6b76e 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,9 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true + reactStrictMode: true, + images: { + domains: ['images.pexels.com', 'fonts.googleapis.com'], + }, } module.exports = nextConfig diff --git a/src/components/Card.tsx b/src/components/Card.tsx new file mode 100644 index 0000000..e1003c9 --- /dev/null +++ b/src/components/Card.tsx @@ -0,0 +1,63 @@ +import { FC, ReactElement } from 'react' +import Image from 'next/image' + +interface CardProps { + title: string + date: string + imgSrc: string + children: ReactElement | ReactElement[] + order?: Number + bgClass?: string + textClass?: string + colSpan?: Number + rowSpan?: Number +} + +const Card: FC = ({ + title, + date, + imgSrc, + order = 1, + children, + bgClass = 'bg-indigo-600', + textClass = 'text-white', + colSpan = 1, + rowSpan = 1, +}) => ( +
+
+
+ {title} +
+ +

+ 5 min read +

+

+ {date} +

+
+
+

+ {title} +

+
+
+ {children} +
+
+
+) + +export default Card diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 4444c54..abdddce 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -15,11 +15,11 @@ const Layout: FC = ({ children }) => { -
+
-
{children}
+
{children}
diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 4e2b386..483650d 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -2,7 +2,7 @@ import { FC } from 'react' import Link from 'next/link' const Navbar: FC = () => ( -