Skip to content

Commit 9d0bd56

Browse files
committed
chore(explore): dark mode for explore pages
1 parent 53f97cb commit 9d0bd56

16 files changed

+100
-59
lines changed

src/app/(explore)/[...slug]/page.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const page = ({ params }: { params: { slug: string[] } }) => {
9090
<div className='flex items-start lg:gap-[50px]'>
9191
<div className='flex flex-col w-full gap-6 md:gap-8 2xl:gap-10 no-scrollbar'>
9292
<div
93-
className={`flex flex-col ${
93+
className={`flex flex-col dark:border-b-gray-custom-1800 ${
9494
isRoot ? "border-b border-b-[#9B9B9B] pb-6 md:border-b-0 md:pb-0" : "border-b border-b-[#9B9B9B] pb-6 lg:pb-10"
9595
} gap-5 2xl:gap-6`}
9696
>
@@ -150,7 +150,9 @@ const page = ({ params }: { params: { slug: string[] } }) => {
150150
<Link
151151
key={`${value.route}-${i}}`}
152152
href={`/${[...slug, value.route].join("/")}`}
153-
className='flex capitalize cursor-pointer border max-w-[100%] border-gray-custom-1200 rounded-[5px] justify-between items-center text-sm py-5 px-4 lg:py-7 2xl:px-6 2xl:text-lg font-semibold text-gray-custom-1100'
153+
className='flex capitalize cursor-pointer border max-w-[100%]
154+
border-gray-custom-1200 dark:border-gray-custom-1800 rounded-[5px] justify-between items-center
155+
text-sm py-5 px-4 lg:py-7 2xl:px-6 2xl:text-lg font-semibold text-gray-custom-1100 dark:text-gray-custom-100'
154156
>
155157
<span className='text-wrap break-words max-w-[80%]'>{value.title}</span>
156158
<span>{value.count}</span>

src/app/(explore)/categories/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import allCategoriesTopic from "@/public/topics-by-category-counts.json";
55
const CategoriesPage = () => {
66

77
return (
8-
<div className="flex flex-col text-black">
8+
<div className="flex flex-col text-black dark:text-gray-custom-100">
99
<TranscriptContentPage header="Categories" data={allCategoriesTopic} description="Explore the main areas of focus within the Bitcoin technical ecosystem." type="words" linkName="tags"/>
1010
</div>
1111
);

src/app/about/page.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import lowerLineIcon from "@/public/svgs/lower-line-icon.svg";
1212
const page = () => {
1313
return (
1414
<main className='flex flex-col items-center justify-center w-full'>
15-
<Wrapper className='text-black flex flex-col max-sm:px-3'>
15+
<Wrapper className='text-black flex flex-col max-sm:px-3 dark:text-gray-custom-100'>
1616
<div className='text-center py-10 md:py-[104px] flex flex-col items-center justify-center'>
1717
<h1 className='text-[40px] leading-[48px] font-medium md:text-6xl 2xl:text-7xl'>What Is Bitcoin Transcripts?</h1>
1818
<p className='text-base md:text-xl 2xl:text-2xl 2xl:leading-[33.84px] md:max-w-[1050px] max-w-[1195px] pt-10 md:pt-12 2xl:pt-14 text-center w-full'>
@@ -22,7 +22,7 @@ const page = () => {
2222
</div>
2323
</Wrapper>
2424

25-
<div className='bg-gray-custom-900 w-full'>
25+
<div className='bg-gray-custom-900 w-full dark:bg-dark-custom-200'>
2626
<Wrapper className='py-16 md:py-[104px] flex flex-col md:flex-row items-center justify-between gap-10 md:gap-8 lg:gap-[52px] max-sm:px-3'>
2727
<section className='max-w-full md:max-w-[50%]'>
2828
<h1 className='text-[40px] text-center md:text-start leading-[48px] font-medium md:text-5xl 2xl:text-6xl'>How We Got Here</h1>
@@ -152,9 +152,9 @@ const GroupedImageSection = ({
152152
alt={title}
153153
width={132}
154154
height={132}
155-
className='w-[100px] md:w-[132px] h-[100px] md:h-[132px] bg-black rounded-full border-[0.5px]'
155+
className='w-[100px] md:w-[132px] h-[100px] md:h-[132px] bg-black dark:bg-gray-custom-100 rounded-full border-[0.5px]'
156156
/>
157-
<p className='text-custom-black-custom-400 text-sm leading-[22.12px] font-medium md:text-base md:font-semibold md:leading-[25.28px] whitespace-nowrap max-w-full text-nowrap overflow-hidden text-ellipsis'>
157+
<p className='text-custom-black-custom-400 dark:text-gray-custom-100 text-sm leading-[22.12px] font-medium md:text-base md:font-semibold md:leading-[25.28px] whitespace-nowrap max-w-full text-nowrap overflow-hidden text-ellipsis'>
158158
{title}
159159
</p>
160160
</Link>

src/components/common/Pill.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const Pill = ({ name, slug }: { name: string; slug: string }) => {
55
<Link
66
key={name}
77
href={slug || ""}
8-
className="max-content py-1 px-4 rounded-[5px] bg-gray-custom-700 hover:bg-gray-custom-600 hover:text-gray-custom-100 max-md:px-3 max-md:py-[2px] text-xs md:text-sm 2xl:text-base max-md:border max-md:border-gray-custom-300 max-md:leading-[100%]"
8+
className="max-content py-1 px-4 rounded-[5px] bg-gray-custom-700 hover:bg-gray-custom-600
9+
hover:text-gray-custom-100 max-md:px-3 max-md:py-[2px] dark:bg-gray-custom-2100 dark:hover:bg-gray-custom-1800
10+
text-xs md:text-sm 2xl:text-base max-md:border max-md:border-gray-custom-300 max-md:leading-[100%]"
911
>
1012
{name}
1113
</Link>

src/components/common/TranscriptDetailsCard.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@ import Link from "next/link";
33
import Image from "next/image";
44
import { ContentTreeArray } from "@/utils/data";
55
import DateIcon from "/public/svgs/date-icon.svg";
6-
import TagsIcon from "/public/svgs/tags-icon.svg";
76
import { ContentData, createSlug, formatDate, unsluggify } from "@/utils";
87
import { MicIcon } from "@bitcoin-dev-project/bdp-ui/icons";
98
import Pill from "./Pill";
9+
import TagIcon from "../svgs/TagIcon";
1010

1111
const TranscriptDetailsCard = ({ data }: { data: ContentTreeArray; slug: string[] }) => {
1212
const { speakers, tagsDetailed, summary, date, title, body, languageURL } = data;
1313
const calculateRemaining = (data: ContentData[] | string[]) => (data?.length && data.length > 3 ? data.length - 3 : 0);
1414

1515
return (
16-
<div className='border border-gray-custom-1200 rounded-lg p-4 md:p-5 2xl:p-6 flex flex-col gap-3 md:gap-4'>
16+
<div className='border border-gray-custom-1200 dark:border-gray-custom-1800 rounded-lg p-4 md:p-5 2xl:p-6 flex flex-col gap-3 md:gap-4'>
1717
<section className='flex justify-between'>
1818
<div className='flex md:flex-row flex-col justify-between gap-2 w-full'>
1919
<Link
2020
href={`${languageURL}`}
21-
className='font-bold text-base leading-[21.86px] md:text-xl 2xl:text-[22.5px] md:leading-[30px] text-orange-custom-100 md:text-black'
21+
className='font-bold text-base leading-[21.86px] md:text-xl 2xl:text-[22.5px] md:leading-[30px] text-orange-custom-100 md:text-black dark:text-gray-custom-100'
2222
>
2323
{title}
2424
</Link>
2525
{date && (
2626
<div className='flex gap-2 items-center h-fit'>
27-
<Image src={DateIcon} alt='date icon' className='w-[18px] md:w-[20px]' />
28-
<p className='text-xs md:text-sm 2xl:text-base leading-[17.6px] font-medium text-gray-custom-800'>{formatDate(date!)}</p>
27+
<Image src={DateIcon} alt='date icon' className='w-[18px] md:w-[20px] dark:text-gray-custom-600' />
28+
<p className='text-xs md:text-sm 2xl:text-base leading-[17.6px] font-medium text-gray-custom-800 dark:text-gray-custom-600'>{formatDate(date!)}</p>
2929
</div>
3030
)}
3131
</div>
@@ -36,7 +36,7 @@ const TranscriptDetailsCard = ({ data }: { data: ContentTreeArray; slug: string[
3636
<section className='flex gap-2 items-center max-md:gap-1'>
3737
<>
3838
<span>
39-
<MicIcon className='w-5 md:w-6' />
39+
<MicIcon className='w-5 md:w-6 dark:text-gray-custom-100' />
4040
</span>
4141
<div className='flex gap-[9px] flex-wrap'>
4242
<div className='flex flex-wrap gap-[9px] max-md:gap-2'>
@@ -45,7 +45,7 @@ const TranscriptDetailsCard = ({ data }: { data: ContentTreeArray; slug: string[
4545
))}
4646

4747
{calculateRemaining(speakers) === 0 ? null : (
48-
<p className='py-[2px] px-5 rounded-[5px] bg-gray-custom-700 whitespace-nowrap text-nowrap max-md:px-3 lg:py-1 max-2xl:text-sm max-md:text-sm max-md:border max-md:border-gray-custom-300 max-md:leading-[100%]'>
48+
<p className='py-[2px] px-5 rounded-[5px] bg-gray-custom-700 dark:bg-gray-custom-2100 whitespace-nowrap text-nowrap max-md:px-3 lg:py-1 max-2xl:text-sm max-md:text-sm max-md:border max-md:border-gray-custom-300 max-md:leading-[100%]'>
4949
+ {calculateRemaining(speakers)} more
5050
</p>
5151
)}
@@ -59,7 +59,7 @@ const TranscriptDetailsCard = ({ data }: { data: ContentTreeArray; slug: string[
5959
{tagsDetailed?.length ? (
6060
<>
6161
<span>
62-
<Image src={TagsIcon} alt='date icon' className='w-5 md:w-6' />
62+
<TagIcon className='w-5 md:w-6 dark:text-gray-custom-100' />
6363
</span>
6464
<div className='flex gap-[9px] flex-wrap'>
6565
<div className='flex flex-wrap gap-[9px] max-md:gap-2'>
@@ -81,7 +81,7 @@ const TranscriptDetailsCard = ({ data }: { data: ContentTreeArray; slug: string[
8181

8282
{summary || body ? (
8383
<section>
84-
<p className='text-sm md:text 2xl:text-base text-custom-black-custom-300 2xl:leading-[25px] line-clamp-3'>{summary ? summary : body}</p>
84+
<p className='text-sm md:text 2xl:text-base text-custom-black-custom-300 dark:text-gray-custom-100 2xl:leading-[25px] line-clamp-3'>{summary ? summary : body}</p>
8585
</section>
8686
) : null}
8787
</div>

src/components/explore/AlphabetGrouping.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,26 @@ const AlphabetGrouping = ({ currentGroup, groupedData }: IAlphabetGrouping) => {
1414
return (
1515
<div
1616
className={
17-
"grid grid-cols-5 p-5 gap-4 lg:p-6 2xl:gap-6 border border-gray-custom-1200 rounded-md"
17+
"grid grid-cols-5 p-5 gap-4 lg:p-6 2xl:gap-6 border border-gray-custom-1200 dark:border-gray-custom-1800 rounded-md"
1818
}
1919
>
2020
{allCharacters.map((char) =>
2121
!char.isDisabled ? (
2222
<Link
2323
key={char.alp}
2424
href={`#${char.alp.toLowerCase()}`}
25-
className={` flex justify-center items-center w-8 h-8 text-base 2xl:h-10 2xl:w-10 2xl:text-lg
25+
className={` flex justify-center items-center w-8 h-8 text-base 2xl:h-10 2xl:w-10 2xl:text-lg dark:text-gray-custom-100
2626
${
2727
currentGroup === char.alp
28-
? "text-orange-custom-100 bg-orange-custom-900 rounded-[4px] font-semibold"
28+
? `text-orange-custom-100 dark:text-orange-custom-100 bg-orange-custom-900 dark:bg-brown-custom-100
29+
rounded-[4px] font-semibold dark:border dark:border-gray-custom-1800`
2930
: ""
3031
} `}
3132
>
3233
{char.alp}
3334
</Link>
3435
) : (
35-
<button key={char.alp} className="text-gray-custom-1400 cursor-not-allowed">
36+
<button key={char.alp} className="text-gray-custom-1400 dark:text-gray-custo-100 cursor-not-allowed">
3637
{char.alp}
3738
</button>
3839
)

src/components/explore/ContentGrouping.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const ContentGrouping = ({
2626
linkRef.current.click();
2727
}
2828
};
29-
29+
3030
useEffect(() => {
3131
if (currentGroup) {
3232
if (selectRef.current) {
@@ -40,18 +40,20 @@ const ContentGrouping = ({
4040
{screen === "desktop" && (
4141
<div
4242
className={twMerge(
43-
" flex-col p-5 hidden lg:flex gap-2.5 border max-h-[calc(95vh-var(--header-height))] overflow-auto scroller border-gray-custom-1200 rounded-md w-full min-w-[260px] 2xl:min-w-[354px] ",
43+
`flex-col p-5 hidden lg:flex gap-2.5 border max-h-[calc(95vh-var(--header-height))]
44+
overflow-auto scroller border-gray-custom-1200 dark:border-gray-custom-1800
45+
rounded-md w-full min-w-[260px] 2xl:min-w-[354px] `,
4446
className
4547
)}
4648
>
4749
{Object.keys(groupedData).map((char) => (
4850
<Link
4951
key={char}
5052
href={`#${createContentSlug(char)}`}
51-
className={`flex text-sm 2xl:text-lg leading-5 ${
53+
className={`flex text-sm 2xl:text-lg leading-5 ${
5254
createContentSlug(currentGroup) == createContentSlug(char)
53-
? "text-orange-custom-100 rounded-[4px] font-semibold"
54-
: ""
55+
? "text-orange-custom-100 rounded-[4px] font-semibold"
56+
: "dark:text-gray-custom-100"
5557
} `}
5658
>
5759
{char}

src/components/explore/ExploreNavigation.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { ArrowLinkUpRight } from "@bitcoin-dev-project/bdp-ui/icons";
88
const ExploreNavigation = () => {
99
return (
1010
<section className='hidden md:flex flex-shrink-0 sticky top-0 overflow-y-auto flex-col self-start gap-4 2xl:gap-6 w-full max-w-[240px] 2xl:max-w-[320px]'>
11-
<div className='flex flex-col gap-4 2xl:gap-6 rounded-lg px-5 py-[23px] border border-gray-custom-1200'>
11+
<div className='flex flex-col gap-4 2xl:gap-6 rounded-lg px-5 py-[23px] border border-gray-custom-1200 dark:border-gray-custom-1800'>
1212
{ExploreNavigationItems.map((item) => (
1313
<ExploreNavigationItem key={item.href} href={item.href} title={item.title} />
1414
))}
1515
</div>
16-
<div className='flex flex-col gap-4 rounded-lg p-4 border border-gray-custom-1200'>
16+
<div className='flex flex-col gap-4 rounded-lg p-4 border border-gray-custom-1200 dark:border-gray-custom-1800'>
1717
<p className='text-sm 2xl:text-lg font-semibold'>Review Transcripts</p>
1818
<Link
1919
href='https://review.btctranscripts.com'
@@ -55,8 +55,9 @@ const ExploreNavigationItem = ({ href, title }: { href: string; title: string })
5555
data-active={isActive}
5656
href={href}
5757
className={twMerge(
58-
"text-sm 2xl:text-lg leading-none px-4 py-4 rounded-lg 2xl:px-6 2xl:py-6 2xl:rounded-xl hover:bg-orange-custom-800 hover:text-orange-custom-100 transition-all",
59-
isActive ? "bg-orange-custom-800 text-orange-custom-100 font-semibold" : ""
58+
`text-sm 2xl:text-lg leading-none px-4 py-4 rounded-lg 2xl:px-6 2xl:py-6 2xl:rounded-xl hover:bg-orange-custom-800 hover:text-orange-custom-100
59+
transition-all dark:hover:bg-brown-custom-100 `,
60+
isActive ? "bg-orange-custom-800 text-orange-custom-100 font-semibold dark:bg-brown-custom-100" : ""
6061
)}
6162
>
6263
{title}

src/components/explore/GroupedTranscriptContent.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const GroupedTranscriptContent = ({
2121
inView: boolean,
2222
entry: IntersectionObserverEntry
2323
) => {
24-
24+
2525
if (inView) {
2626
setCurrentGroup(topicsByAlphabet[0]);
2727
}
@@ -37,7 +37,7 @@ const GroupedTranscriptContent = ({
3737
id={topicsByAlphabet[0].toLowerCase()}
3838
className="flex flex-col gap-7 "
3939
>
40-
<h4 className="font-bold text-2xl capitalize">{topicsByAlphabet[0]}</h4>
40+
<h4 className="font-bold text-2xl capitalize dark:text-gray-custom-100">{topicsByAlphabet[0]}</h4>
4141
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2.5">
4242
{topicsByAlphabet[1].map((topics, i) => (
4343
<SingleTranscriptContent
@@ -54,7 +54,7 @@ const GroupedTranscriptContent = ({
5454
id={createSlug(topicsByAlphabet[0])}
5555
className="flex flex-col gap-7"
5656
>
57-
<h4 className="font-bold text-2xl capitalize">{topicsByAlphabet[0]}</h4>
57+
<h4 className="font-bold text-2xl capitalize dark:text-gray-custom-100">{topicsByAlphabet[0]}</h4>
5858
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2.5">
5959
{topicsByAlphabet[1] &&
6060
topicsByAlphabet[1].map((data, i) => (
@@ -70,4 +70,4 @@ const GroupedTranscriptContent = ({
7070
);
7171
};
7272

73-
export default GroupedTranscriptContent;
73+
export default GroupedTranscriptContent;

src/components/explore/SingleTranscriptContent.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ const SingleTranscriptContent = ({ count, slug, name, linkName }: SingleContent)
1111
return (
1212
<Link
1313
href={url}
14-
className='flex capitalize cursor-pointer border max-w-[100%] border-gray-custom-1200 rounded-[5px] justify-between items-center text-sm py-5 px-4 lg:py-7 2xl:px-6 2xl:text-lg font-semibold text-gray-custom-1100'
14+
className='flex capitalize cursor-pointer border max-w-[100%] border-gray-custom-1200 dark:border-gray-custom-1800 rounded-[5px] justify-between items-center text-sm py-5 px-4 lg:py-7 2xl:px-6 2xl:text-lg font-semibold text-gray-custom-1100'
1515
>
16-
<span className='text-wrap break-words max-w-[80%]'>{name}</span>
17-
<span className='font-normal font-basis-mono'>{getDoubleDigits(count)}</span>
16+
<span className='text-wrap break-words max-w-[80%] dark:text-gray-custom-100'>{name}</span>
17+
<span className='font-normal font-basis-mono dark:text-gray-custom-100'>{getDoubleDigits(count)}</span>
1818
</Link>
1919
);
2020
};

src/components/explore/SourcesBreadCrumbs.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ export const SourcesBreadCrumbs = ({ slugPaths, current }: { slugPaths: string[]
7373
<div key={link.name} className='flex gap-1 items-center'>
7474
<Link
7575
className={`capitalize hover:underline font-medium text-sm 2xl:text-base text-nowrap ${
76-
isActive.name.toLowerCase() === link.name.toLowerCase() ? "text-orange-custom-100" : "text-black md:text-gray-custom-800"
76+
isActive.name.toLowerCase() === link.name.toLowerCase() ? "text-orange-custom-100" : "text-black md:text-gray-custom-800 dark:text-gray-custom-600"
7777
}`}
7878
href={link.link}
7979
>
8080
{link.name}
8181
</Link>
82-
{i !== allRoutes.length - 1 && <p className='text-custom-black-custom-200'>/</p>}
82+
{i !== allRoutes.length - 1 && <p className='text-custom-black-custom-200 dark:text-gray-custom-600'>/</p>}
8383
</div>
8484
))}
8585
</div>

src/components/explore/TranscriptContentPage.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ const TranscriptContentPage: FC<ITranscriptContentPage> = ({
7878
/>
7979
)}
8080
</div>
81-
<div className="flex flex-col border-b border-b-[#9B9B9B] pb-6 lg:pb-10 gap-6 ">
81+
<div className="flex flex-col border-b border-b-gray-custom-1900 dark:border-b-gray-custom-1800 pb-6 lg:pb-10 gap-6 ">
8282
<BaseCrumbLists crumbsArray={allRoutes} />
8383
<div className="flex flex-col gap-1 lg:gap-4">
84-
<h3 className="text-xl 2xl:text-2xl font-medium">{header}</h3>
85-
<p className="hidden lg:inline-block text-sm lg:text-base 2xl:text-lg text-custom-black-custom-300">
84+
<h3 className="text-xl 2xl:text-2xl font-medium dark:text-gray-custom-100">{header}</h3>
85+
<p className="hidden lg:inline-block text-sm lg:text-base 2xl:text-lg text-custom-black-custom-300 dark:text-gray-custom-100">
8686
{description}
8787
</p>
8888
<p className="inline-block lg:hidden text-sm lg:text-lg text-custom-black-custom-300">

src/components/landing-page/WhyTranscripts.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const WhyTranscripts = () => {
9696
Review Transcripts, Earn Sats
9797
</Link>
9898
<button
99-
className='text-xl bg-orange-custom-200 border-gray-custom-300 text-orange-custom-400 py-6 rounded-full flex items-center md:w-[85%] whitespace-nowrap justify-center px-32 h-20 max-xl:h-[72px] max-lg:h-16 max-md:h-14 max-lg:w-full max-md:w-full font-semibold text-nowrap max-lg:text-lg max-md:text-base max-lg:px-16 max-md:px-8 cursor-pointer hidden'
99+
className='text-xl bg-orange-custom-200 border-gray-custom-300 text-orange-custom-400 py-6 rounded-full items-center md:w-[85%] whitespace-nowrap justify-center px-32 h-20 max-xl:h-[72px] max-lg:h-16 max-md:h-14 max-lg:w-full max-md:w-full font-semibold text-nowrap max-lg:text-lg max-md:text-base max-lg:px-16 max-md:px-8 cursor-pointer hidden'
100100
onClick={() => setIsOpen(!isOpen)}
101101
>
102102
Suggest Source for Transcription

0 commit comments

Comments
 (0)