From f9b1313990b65b3cb49a098712ef12b5d5c05ba2 Mon Sep 17 00:00:00 2001 From: dev-phantom Date: Mon, 9 Sep 2024 21:22:49 +0100 Subject: [PATCH 1/6] fix: fixed changelog Entries that aren't clickable on mobile --- components/sections/changelog/Changelog.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/components/sections/changelog/Changelog.tsx b/components/sections/changelog/Changelog.tsx index c4b9edb42..588a0ace8 100644 --- a/components/sections/changelog/Changelog.tsx +++ b/components/sections/changelog/Changelog.tsx @@ -92,7 +92,12 @@ const Changelog: FC = ({ - {title} + + {title} + {moment(date).format('DD MMM YYYY')} @@ -114,9 +119,8 @@ const Changelog: FC = ({
- - {changelogContent || ""} + + {changelogContent || ''}
From c2950c8b75fd33856d1ca72ab044a105c5d4e78b Mon Sep 17 00:00:00 2001 From: dev-phantom Date: Mon, 9 Sep 2024 21:34:41 +0100 Subject: [PATCH 2/6] fix: made changelog subtext accessible --- pages/changelog/[slug].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/changelog/[slug].tsx b/pages/changelog/[slug].tsx index f8998b6ab..e183bd04b 100644 --- a/pages/changelog/[slug].tsx +++ b/pages/changelog/[slug].tsx @@ -51,7 +51,7 @@ export default function ChangelogPage({ changelog, commonData, latestChanges } : url={`https://opensauced.pizza/changelog/${changelog.slug?.current}`} /> {changelog.changelogContent || ""} From 0f91190766d3f3b0b1f8594b73409fd1e9bd1325 Mon Sep 17 00:00:00 2001 From: dev-phantom Date: Tue, 10 Sep 2024 00:01:40 +0100 Subject: [PATCH 3/6] fix: fixed featured post img --- components/sections/blog/FeaturedPost.tsx | 6 +++--- components/sections/blog/components/Post.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/sections/blog/FeaturedPost.tsx b/components/sections/blog/FeaturedPost.tsx index c591d39d8..238ca0a3d 100644 --- a/components/sections/blog/FeaturedPost.tsx +++ b/components/sections/blog/FeaturedPost.tsx @@ -17,9 +17,9 @@ const FeaturedPost: FC = ({ data }): ReactElement => {
-
- Post cover -
+
+ Cover +
diff --git a/components/sections/blog/components/Post.tsx b/components/sections/blog/components/Post.tsx index 963502878..e9e092c2e 100644 --- a/components/sections/blog/components/Post.tsx +++ b/components/sections/blog/components/Post.tsx @@ -57,12 +57,12 @@ const Post: FC = ({ data, featured }): ReactElement => {
- Cover + Cover
-
+
{topics?.map((item) => (
{`#${item}`} @@ -79,7 +79,7 @@ const Post: FC = ({ data, featured }): ReactElement => {
-
+
Author
From fbbe8b4e266810f3ce459f9b3f73f8fa1c91fa0a Mon Sep 17 00:00:00 2001 From: zeudev Date: Mon, 16 Sep 2024 10:29:48 -0700 Subject: [PATCH 4/6] fix code + cta display (#366) --- pages/cli/index.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pages/cli/index.tsx b/pages/cli/index.tsx index 7a6bdd40a..c812c0f04 100644 --- a/pages/cli/index.tsx +++ b/pages/cli/index.tsx @@ -5,7 +5,7 @@ import { getCommonData } from '../../lib/sanity'; import Footer from '../../components/sections/Footer'; import { Heading, Typography } from '../../components/common/text'; import { Button } from '../../components/common'; -import { TbArrowNarrowRight, TbCopy } from "react-icons/tb"; +import { TbArrowNarrowRight } from "react-icons/tb"; import Image from 'next/image'; export async function getStaticProps() { @@ -40,12 +40,11 @@ export default function CliPage({ commonData }: CliPageProps) { Try the pizza CLI and access OpenSauced features right from your terminal. Autogenerate your CODEOWNERS and contributor insights in seconds. -
- +
+ brew install open-sauced/tap/pizza -

or

- +
From ac1e170dc8ff7cd98f1dc3472ec3b7fd5c74a4ee Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Mon, 16 Sep 2024 14:19:24 -0400 Subject: [PATCH 5/6] chore: updated pizza action (#367) --- .github/workflows/pizza.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pizza.yml b/.github/workflows/pizza.yml index 7a768d83e..565104edd 100644 --- a/.github/workflows/pizza.yml +++ b/.github/workflows/pizza.yml @@ -11,6 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Pizza Action - uses: open-sauced/pizza-action@v2.1.0 + uses: open-sauced/pizza-action@v2.2.0 with: + cli-version: 'v2.1.0' commit-and-pr: 'true' + pr-title: 'chore: update repository codeowners' From e4d4c3f2e8fb17caa558f79b892cfc1094091e96 Mon Sep 17 00:00:00 2001 From: dev-phantom Date: Thu, 19 Sep 2024 12:08:41 +0100 Subject: [PATCH 6/6] fixed the blog image height --- components/sections/blog/FeaturedPost.tsx | 2 +- .../sections/blog/[slug]/PageContent.tsx | 89 +++++++++++++------ components/sections/blog/components/Post.tsx | 2 +- 3 files changed, 64 insertions(+), 29 deletions(-) diff --git a/components/sections/blog/FeaturedPost.tsx b/components/sections/blog/FeaturedPost.tsx index 238ca0a3d..2a5a2b5eb 100644 --- a/components/sections/blog/FeaturedPost.tsx +++ b/components/sections/blog/FeaturedPost.tsx @@ -18,7 +18,7 @@ const FeaturedPost: FC = ({ data }): ReactElement => {
- Cover + Cover
diff --git a/components/sections/blog/[slug]/PageContent.tsx b/components/sections/blog/[slug]/PageContent.tsx index df6876b4d..aed039a6b 100644 --- a/components/sections/blog/[slug]/PageContent.tsx +++ b/components/sections/blog/[slug]/PageContent.tsx @@ -1,5 +1,8 @@ -import React, { FC, ReactElement } from 'react' -import { Author as SanityAuthor, Blog as SanityBlog } from '../../../../sanity.types' +import React, { FC, ReactElement, useEffect, useState } from 'react' +import { + Author as SanityAuthor, + Blog as SanityBlog, +} from '../../../../sanity.types' import getReadTime from '../../../../utils/getReadTime' // Components @@ -21,8 +24,8 @@ import { BiCalendarAlt } from 'react-icons/bi' import AuthorBio from '../components/AuthorBio' interface PageContentProps { - pageContent: Omit & { author: SanityAuthor } - blogs: (Omit & { author: SanityAuthor })[] + pageContent: Omit & { author: SanityAuthor } + blogs: (Omit & { author: SanityAuthor })[] featuredPost?: boolean } @@ -32,21 +35,53 @@ const PageContent: FC = ({ featuredPost, }): ReactElement => { const { query } = useRouter() - const { topics, title, author, published_date, coverImage, blogContent, blogUrl, ogImage, summary, slug } = - pageContent + const { + topics, + title, + author, + published_date, + coverImage, + blogContent, + blogUrl, + ogImage, + summary, + slug, + } = pageContent const src = coverImage || '' const displayBlogs = blogs.filter((item) => item.slug?.current != query.slug) || [] - const absoluteURL = "https://opensauced.pizza/blog/"+slug?.current + const absoluteURL = 'https://opensauced.pizza/blog/' + slug?.current + const [height, setHeight] = useState('30rem'); + + useEffect(() => { + const handleResize = () => { + if (window.innerWidth < 640) { + setHeight('14rem'); // Small screens + } else if (window.innerWidth < 1024) { + setHeight('25rem'); // Medium screens + } else { + setHeight('30rem'); // Large screens + } + }; + + window.addEventListener('resize', handleResize); + + // Call the function once to set the initial size + handleResize(); + + // Cleanup the event listener on unmount + return () => window.removeEventListener('resize', handleResize); + }, []); + return ( <>
@@ -69,15 +104,16 @@ const PageContent: FC = ({ Clock
- {`${getReadTime(blogContent || "")} ${ - getReadTime(blogContent || "") === 1 ? 'min' : 'mins' - } read`} + + {`${getReadTime(blogContent || '')} ${ + getReadTime(blogContent || '') === 1 ? 'min' : 'mins' + } read`} - - { published_date && ( + + {published_date && ( <>
- +
@@ -88,16 +124,20 @@ const PageContent: FC = ({
- -
+ +
Cover
+ @@ -108,12 +148,7 @@ const PageContent: FC = ({
)} {!featuredPost && !!blogUrl && ( -
+

diff --git a/components/sections/blog/components/Post.tsx b/components/sections/blog/components/Post.tsx index e9e092c2e..9a0aea79a 100644 --- a/components/sections/blog/components/Post.tsx +++ b/components/sections/blog/components/Post.tsx @@ -57,7 +57,7 @@ const Post: FC = ({ data, featured }): ReactElement => {
- Cover + Cover