Skip to content

Commit fc61515

Browse files
author
Alex Patterson
committed
Merge branch 'main' into dev
2 parents 9973d0b + 52eb1a5 commit fc61515

18 files changed

Lines changed: 118 additions & 155 deletions

File tree

‎app/(main)/(author)/author/[slug]/page.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ export default async function AuthorPage({ params }: Props) {
5858
<div className="container px-5 mx-auto">
5959
<BreadcrumbLinks
6060
links={[
61-
{ title: "Authors", href: "/authors/page/1" },
62-
{ title: author.title },
61+
{ title: "Authors", href: "/authors/page/1" }
6362
]}
6463
/>
6564
<div className="w-full flex flex-col gap-4 md:gap-8">

‎app/(main)/(course)/course/[courseSlug]/page.tsx‎

Lines changed: 30 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import Buy from "@/components/user-buy";
2020
import Link from "next/link";
2121
import ShowPro from "./show-pro";
2222
import UserGoProButton from "@/components/user-go-pro-button";
23+
import CarbonAdBanner from "@/components/carbon-ad-banner";
2324

2425
type Props = {
2526
params: { courseSlug: string };
@@ -67,65 +68,45 @@ export default async function CoursePage({ params }: Props) {
6768
<ShowPro />
6869
<BreadcrumbLinks
6970
links={[
70-
{ title: "Courses", href: "/courses/page/1" },
71-
{ title: course.title },
71+
{ title: "Courses", href: "/courses/page/1" }
7272
]}
7373
/>
7474
<article>
7575
<h1 className="mb-12 text-4xl font-bold leading-tight tracking-tighter text-balance md:text-7xl md:leading-none lg:text-8xl">
7676
{course.title}
7777
</h1>
78-
<div className="hidden md:mb-12 md:block">
79-
<div className="flex flex-col gap-8">
80-
{course?.author && (
81-
<div className="flex">
82-
{course.author.map((a) => (
83-
<Avatar
84-
key={a._id}
85-
href={`/author/${a?.slug}`}
86-
name={a.title}
87-
coverImage={a?.coverImage}
88-
/>
89-
))}
90-
</div>
91-
)}
92-
<div className="text-lg">
93-
<DateComponent dateString={course.date} />
94-
</div>
95-
</div>
96-
</div>
9778
<div className="mb-8 sm:mx-0 md:mb-16 flex flex-col gap-2 md:gap-8">
9879
<CoverMedia
9980
cloudinaryImage={course.coverImage}
10081
cloudinaryVideo={course.videoCloudinary}
10182
youtube={course.youtube}
10283
/>
103-
{course?.stripeProduct && course?.title && (
104-
<section className="flex gap-2">
105-
<Buy stripeProduct={course.stripeProduct} title={course.title} />
106-
<UserGoProButton />
107-
</section>
108-
)}
109-
</div>
110-
<div className="block md:hidden">
111-
<div className="max-w-2xl mx-auto">
112-
<div className="mb-6">
113-
{course.author && (
114-
<div className="flex">
115-
{course.author.map((a) => (
116-
<Avatar
117-
key={a._id}
118-
href={`/author/${a?.slug}`}
119-
name={a.title}
120-
coverImage={a?.coverImage}
121-
/>
122-
))}
123-
</div>
124-
)}
125-
</div>
126-
<div className="mb-4 text-lg">
127-
<DateComponent dateString={course.date} />
84+
<div className="flex justify-between">
85+
<div className="max-w-2xl">
86+
<div className="mb-6">
87+
{course.author && (
88+
<div className="flex">
89+
{course.author.map((a) => (
90+
<Avatar
91+
key={a._id}
92+
href={`/author/${a?.slug}`}
93+
name={a.title}
94+
coverImage={a?.coverImage}
95+
/>
96+
))}
97+
</div>
98+
)}
99+
</div>
100+
<div className="mb-4 text-lg">
101+
<DateComponent dateString={course.date} />
102+
</div>
128103
</div>
104+
{course?.stripeProduct && course?.title && (
105+
<section className="flex gap-2">
106+
<Buy stripeProduct={course.stripeProduct} title={course.title} />
107+
<UserGoProButton />
108+
</section>
109+
)}
129110
</div>
130111
</div>
131112
{course.content?.length && (
@@ -134,6 +115,9 @@ export default async function CoursePage({ params }: Props) {
134115
value={course.content as PortableTextBlock[]}
135116
/>
136117
)}
118+
<div className="p-8 flex justify-end">
119+
<CarbonAdBanner />
120+
</div>
137121
</article>
138122
<Suspense>
139123
<Lessons courseSlug={params.courseSlug} />

‎app/(main)/(course)/courses/page.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type { CoursesQueryResult } from "@/sanity.types";
1111
import { sanityFetch } from "@/sanity/lib/fetch";
1212
import { coursesQuery } from "@/sanity/lib/queries";
1313
import MoreHeader from "@/components/more-header";
14+
import CarbonAdBanner from "@/components/carbon-ad-banner";
1415

1516
function HeroCourse({
1617
title,
@@ -28,7 +29,7 @@ function HeroCourse({
2829
<Link className="block mb-8 group md:mb-16" href={`/course/${slug}`}>
2930
<CoverImage image={coverImage} priority />
3031
</Link>
31-
<div className="mb-20 md:mb-28 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8">
32+
<div className="mb-8 md:mb-16 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8">
3233
<div>
3334
<h3 className="mb-4 text-4xl leading-tight text-pretty lg:text-6xl">
3435
<Link href={`/course/${slug}`} className="hover:underline">
@@ -81,6 +82,7 @@ export default async function Page() {
8182
) : (
8283
<Onboarding />
8384
)}
85+
<CarbonAdBanner />
8486
{heroPost?._id && (
8587
<aside>
8688
<MoreHeader title="Latest Courses" href="/courses/page/1" />

‎app/(main)/(guest)/guest/[slug]/page.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ export default async function GuestPage({ params }: Props) {
5959
<div className="container px-5 mx-auto">
6060
<BreadcrumbLinks
6161
links={[
62-
{ title: "Guests", href: "/guests/page/1" },
63-
{ title: guest.title },
62+
{ title: "Guests", href: "/guests/page/1" }
6463
]}
6564
/>
6665
<div className="w-full flex flex-col gap-4 md:gap-8">

‎app/(main)/(podcast)/podcast/[slug]/page.tsx‎

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ export default async function PodcastPage({ params }: Props) {
7070
<div className="container px-5 mx-auto">
7171
<BreadcrumbLinks
7272
links={[
73-
{ title: "Podcasts", href: "/podcasts/page/1" },
74-
{ title: podcast.title },
73+
{ title: "Podcasts", href: "/podcasts/page/1" }
7574
]}
7675
/>
7776
<article>
@@ -86,32 +85,39 @@ export default async function PodcastPage({ params }: Props) {
8685
youtube={podcast?.youtube}
8786
/>
8887
</div>
88+
8989
<div className="max-w-2xl sm:max-w-none">
90-
<div className="mb-6">
91-
{(podcast?.author || podcast?.guest) && (
92-
<div className="flex flex-wrap gap-2">
93-
{podcast?.author?.map((a) => (
94-
<Avatar
95-
key={a._id}
96-
name={a.title}
97-
href={`/author/${a?.slug}`}
98-
coverImage={a?.coverImage}
99-
/>
100-
))}
101-
{podcast?.guest?.map((a) => (
102-
<Avatar
103-
key={a._id}
104-
name={a.title}
105-
href={`/guest/${a?.slug}`}
106-
coverImage={a?.coverImage}
107-
/>
108-
))}
90+
<div className="flex flex-wrap justify-between">
91+
<div className="flex-1">
92+
<div className="mb-6">
93+
{(podcast?.author || podcast?.guest) && (
94+
<div className="flex flex-wrap gap-2">
95+
{podcast?.author?.map((a) => (
96+
<Avatar
97+
key={a._id}
98+
name={a.title}
99+
href={`/author/${a?.slug}`}
100+
coverImage={a?.coverImage}
101+
/>
102+
))}
103+
{podcast?.guest?.map((a) => (
104+
<Avatar
105+
key={a._id}
106+
name={a.title}
107+
href={`/guest/${a?.slug}`}
108+
coverImage={a?.coverImage}
109+
/>
110+
))}
111+
</div>
112+
)}
109113
</div>
110-
)}
111-
</div>
112-
<div className="mb-4 text-lg">
113-
<DateComponent dateString={podcast.date} />
114+
<div className="mb-4 text-lg">
115+
<DateComponent dateString={podcast.date} />
116+
</div>
117+
</div>
118+
<CarbonAdBanner />
114119
</div>
120+
115121
{src && (
116122
<div className="flex flex-col sm:flex-row justify-start flex-wrap w-full p-2 sm:p-4 border border-foreground gap-2 sm:gap-4 items-center">
117123
<h2 className="text-xl font-bold w-full text-center sm:text-start">Listening Options</h2>
@@ -125,7 +131,7 @@ export default async function PodcastPage({ params }: Props) {
125131
</div>
126132
)}
127133
</div>
128-
{podcast?.sponsor?.length ? (
134+
{podcast?.sponsor?.length && (
129135
<section className="flex flex-col mt-10 mb-10">
130136
<h2 className="mb-4 text-2xl font-bold">Sponsors</h2>
131137
<hr className="border-accent-2" />
@@ -134,9 +140,8 @@ export default async function PodcastPage({ params }: Props) {
134140
</div>
135141
<hr className="border-accent-2" />
136142
</section>
137-
) : (
138-
<CarbonAdBanner />
139143
)}
144+
140145
{podcast?.content?.length && (
141146
<PortableText
142147
className="mx-auto prose-violet lg:prose-xl dark:prose-invert"

‎app/(main)/(podcast)/podcasts/page.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { podcastsQuery } from "@/sanity/lib/queries";
1313
import { Button } from "@/components/ui/button";
1414
import { Separator } from "@/components/ui/separator";
1515
import MoreHeader from "@/components/more-header";
16+
import CarbonAdBanner from "@/components/carbon-ad-banner";
1617

1718
function HeroPodcast({
1819
title,
@@ -31,7 +32,7 @@ function HeroPodcast({
3132
<Link className="block mb-8 group md:mb-16" href={`/podcast/${slug}`}>
3233
<CoverImage image={coverImage} priority />
3334
</Link>
34-
<div className="mb-20 md:mb-28 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8">
35+
<div className="mb-8 md:mb-16 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8">
3536
<div>
3637
<h3 className="mb-4 text-4xl leading-tight text-pretty lg:text-6xl">
3738
<Link href={`/podcast/${slug}`} className="hover:underline">
@@ -93,6 +94,7 @@ export default async function Page() {
9394
) : (
9495
<Onboarding />
9596
)}
97+
<CarbonAdBanner />
9698
{heroPost?._id && (
9799
<aside>
98100
<MoreHeader title="Latest Podcasts" href="/podcasts/page/1" />

‎app/(main)/(post)/blog/page.tsx‎

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import { sanityFetch } from "@/sanity/lib/fetch";
1212
import { blogQuery } from "@/sanity/lib/queries";
1313
import { Button, buttonVariants } from "@/components/ui/button";
1414
import { Separator } from "@/components/ui/separator";
15+
import CarbonAdBanner from "@/components/carbon-ad-banner";
16+
import MoreHeader from "@/components/more-header";
1517

1618
function HeroPost({
1719
title,
@@ -29,7 +31,7 @@ function HeroPost({
2931
<Link className="block mb-8 group md:mb-16" href={`/post/${slug}`}>
3032
<CoverImage image={coverImage} priority />
3133
</Link>
32-
<div className="mb-20 md:mb-28 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8">
34+
<div className="mb-8 md:mb-16 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8">
3335
<div>
3436
<h3 className="mb-4 text-4xl leading-tight text-pretty lg:text-6xl">
3537
<Link href={`/post/${slug}`} className="hover:underline">
@@ -82,33 +84,14 @@ export default async function Page() {
8284
) : (
8385
<Onboarding />
8486
)}
85-
87+
<CarbonAdBanner />
8688
{heroPost?._id && (
87-
<>
88-
<div className="mb-16">
89-
<Separator />
90-
</div>
91-
<aside>
92-
<div className="flex flex-col md:flex-row md:justify-between">
93-
<h2 className="mb-8 text-6xl font-bold leading-tight tracking-tighter md:text-7xl">
94-
Latest Posts
95-
</h2>
96-
<Button
97-
asChild
98-
className="mb-8 text-3xl font-bold md:text-4xl p-2 md:p-8"
99-
>
100-
<Link href="/blog/page/1">Read More</Link>
101-
</Button>
102-
</div>
103-
<Suspense fallback={<p>Loading feed...</p>}>
104-
<MoreContent
105-
type={heroPost._type}
106-
skip={heroPost._id}
107-
limit={4}
108-
/>
109-
</Suspense>
110-
</aside>
111-
</>
89+
<aside>
90+
<MoreHeader title="View More" href="/blog/page/1" />
91+
<Suspense fallback={<p>Loading feed...</p>}>
92+
<MoreContent type={heroPost._type} skip={heroPost._id} limit={4} />
93+
</Suspense>
94+
</aside>
11295
)}
11396
</div>
11497
);

‎app/(main)/(post)/post/[slug]/page.tsx‎

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default async function PostPage({ params }: Props) {
6868
return (
6969
<div className="container px-5 mx-auto">
7070
<BreadcrumbLinks
71-
links={[{ title: "Blog", href: "/blog/page/1" }, { title: post.title }]}
71+
links={[{ title: "Blog", href: "/blog/page/1" }]}
7272
/>
7373
<article>
7474
<h1 className="mb-12 text-4xl font-bold leading-tight tracking-tighter text-balance md:text-7xl md:leading-none lg:text-8xl">
@@ -81,26 +81,29 @@ export default async function PostPage({ params }: Props) {
8181
youtube={post?.youtube}
8282
/>
8383
</div>
84-
<div className="max-w-2xl sm:max-w-none">
85-
<div className="mb-6">
86-
{(post?.author) && (
87-
<div className="flex flex-wrap gap-2">
88-
{post?.author?.map((a) => (
89-
<Avatar
90-
key={a._id}
91-
name={a.title}
92-
href={`/author/${a?.slug}`}
93-
coverImage={a?.coverImage}
94-
/>
95-
))}
96-
</div>
97-
)}
98-
</div>
99-
<div className="mb-4 text-lg">
100-
<DateComponent dateString={post.date} />
84+
<div className="flex flex-wrap justify-between">
85+
<div className="max-w-2xl sm:max-w-none flex-1">
86+
<div className="mb-6">
87+
{(post?.author) && (
88+
<div className="flex flex-wrap gap-2">
89+
{post?.author?.map((a) => (
90+
<Avatar
91+
key={a._id}
92+
name={a.title}
93+
href={`/author/${a?.slug}`}
94+
coverImage={a?.coverImage}
95+
/>
96+
))}
97+
</div>
98+
)}
99+
</div>
100+
<div className="mb-4 text-lg">
101+
<DateComponent dateString={post.date} />
102+
</div>
101103
</div>
104+
<CarbonAdBanner />
102105
</div>
103-
{post?.sponsor?.length ? (
106+
{post?.sponsor?.length && (
104107
<section className="flex flex-col mt-10 mb-10">
105108
<h2 className="mb-4 text-2xl font-bold">Sponsors</h2>
106109
<hr className="border-accent-2" />
@@ -109,8 +112,6 @@ export default async function PostPage({ params }: Props) {
109112
</div>
110113
<hr className="border-accent-2" />
111114
</section>
112-
) : (
113-
<CarbonAdBanner />
114115
)}
115116
{post.content?.length && (
116117
<PortableText

0 commit comments

Comments
 (0)