Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: add Quote component to blog slug page

Jonathan Summers-Muirc8180b88c7fd
diff --git a/www/components/Quote.tsx b/www/components/Quote.tsx
new file mode 100644
index 00000000000..85a5bb60655
--- /dev/null
+++ b/www/components/Quote.tsx
@@ -0,0 +1,32 @@
+import { Space, Typography } from '@supabase/ui'
+import React from 'react'
+
+interface Props {
+ children: React.ReactNode
+ caption: string
+ img: string
+}
+
+export default function Quote(props: Props) {
+ const { children, caption, img } = props
+
+ return (
+ <figure className="border border-gray-300 dark:border-gray-600 p-8">
+ <Space direction="vertical" size={5}>
+ <blockquote className="border-none mb-4" style={{ margin: 0, padding: 0 }}>
+ "{children}"
+ </blockquote>
+ <Space size={4} className="align-center">
+ <img
+ src={'/new/images/blog/avatars/' + img}
+ className="rounded-full w-16 h-16 object-cover text-center"
+ style={{ margin: 0 }}
+ />
+ <figcaption style={{ marginTop: 0 }}>
+ <Typography.Text>{caption}</Typography.Text>
+ </figcaption>
+ </Space>
+ </Space>
+ </figure>
+ )
+}
diff --git a/www/pages/blog/[slug].tsx b/www/pages/blog/[slug].tsx
index fdb5765fd53..305a9ba2bf9 100644
--- a/www/pages/blog/[slug].tsx
+++ b/www/pages/blog/[slug].tsx
@@ -14,13 +14,14 @@ import hydrate from 'next-mdx-remote/hydrate'
import { IconFile, Space, Typography, Badge, Divider } from '@supabase/ui'
import CodeBlock from '~/components/CodeBlock/CodeBlock'
+import Quote from '~/components/Quote'
import blogStyles from './[slug].module.css'
import Link from 'next/link'
// import all components used in blog articles here
// for instance, if you use a button, you must add `Button` in the components object below.
-const components = { CodeBlock }
+const components = { CodeBlock, Quote }
// plugins for next-mdx-remote
const gfm = require('remark-gfm')
@@ -68,7 +69,7 @@ function BlogPostPage(props: any) {
}}
/>
<DefaultLayout>
- <div className="bg-white dark:bg-dark-700 overflow-hidden py-12">
+ <div className="bg-white dark:bg-dark-800 overflow-hidden py-12">
<div className="container px-8 sm:px-16 xl:px-20 mt-16 mx-auto">
<div className="max-w-6xl mx-auto">
<div className="py-12 grid grid-cols-12 gap-16">
@@ -117,7 +118,7 @@ function BlogPostPage(props: any) {
{props.blog.thumb && (
<img
src={'/new/images/blog/' + props.blog.thumb}
- className="object-cover -mt-32 mb-8"
+ className="object-cover -mt-32 mb-8 border dark:border-gray-600"
style={{ maxHeight: '520px', width: '100%' }}
/>
)}