Skip to content

Commit 33e4114

Browse files
committed
chore(dark-page): added dark pages on explore and indivdualtranscript page
1 parent 3ac8f3a commit 33e4114

File tree

15 files changed

+212
-52
lines changed

15 files changed

+212
-52
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Image from "next/image";
44
import { notFound } from "next/navigation";
55
import { ContentTreeArray } from "@/utils/data";
66
import LinkIcon from "/public/svgs/link-icon.svg";
7-
import WorldIcon from "/public/svgs/world-icon.svg";
87
import allSources from "@/public/sources-data.json";
98
import { constructSlugPaths, deriveSourcesList, fetchTranscriptDetails, loopArrOrObject } from "@/utils";
109
import { ArrowLinkRight } from "@bitcoin-dev-project/bdp-ui/icons";
@@ -13,6 +12,7 @@ import TranscriptDetailsCard from "@/components/common/TranscriptDetailsCard";
1312
import { SourcesBreadCrumbs } from "@/components/explore/SourcesBreadCrumbs";
1413
import TranscriptContentPage from "@/components/explore/TranscriptContentPage";
1514
import { LanguageCodes } from "@/config";
15+
import WorldIcon from "@/components/svgs/WorldIcon";
1616

1717
// forces 404 for paths not generated from `generateStaticParams` function.
1818
export const dynamicParams = false;
@@ -106,11 +106,11 @@ const page = ({ params }: { params: { slug: string[] } }) => {
106106
<h3 className='text-xl 2xl:text-2xl font-medium pt-6 md:pt-3'>{metadata?.title ?? slug[slug.length - 1]}</h3>
107107
{isRoot && metadata?.website ? (
108108
<div className='flex gap-1 items-center pt-3 md:pt-6'>
109-
<Image src={WorldIcon} alt='world icon' className='w-[18px] md:w-[20px]' />
109+
<WorldIcon className='w-[18px] md:w-[20px] dark:text-gray-custom-100' />
110110
<Link
111111
href={metadata?.website ?? ""}
112112
target='_blank'
113-
className='text-xs md:text-sm xl:text-base leading-[17.6px] font-medium text-black underline text-wrap break-words line-clamp-1'
113+
className='text-xs md:text-sm xl:text-base leading-[17.6px] font-medium text-black dark:text-gray-custom-100 underline text-wrap break-words line-clamp-1'
114114
>
115115
{metadata.website ?? ""}
116116
</Link>

src/app/about/page.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ArrowLinkRight } from "@bitcoin-dev-project/bdp-ui/icons";
88
import reviewers from "@/public/reviewers-data.json";
99
import upperLineIcon from "@/public/svgs/upper-line-icon.svg";
1010
import lowerLineIcon from "@/public/svgs/lower-line-icon.svg";
11+
import CustomBorder from "@/components/svgs/CustomBorder";
1112

1213
const page = () => {
1314
return (
@@ -59,6 +60,11 @@ const page = () => {
5960
</div>
6061

6162
<div className='flex flex-col gap-10 md:gap-20 relative'>
63+
<div
64+
className="flex w-full max-w-24 md:max-w-[184px] z-[-1] h-full justify-center absolute">
65+
<CustomBorder className='h-full' />
66+
</div>
67+
6268
{processFlowData.map((item) => (
6369
<div key={item.title} className='flex flex-row items-center gap-4 sm:gap-[31px]'>
6470
<section

src/components/common/BaseCrumbLists.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ const BaseCrumbLists = ({crumbsArray}:{crumbsArray:BaseCrumbType[]}) => {
1515
className={`capitalize hover:underline font-medium text-sm 2xl:text-base ${
1616
link.isActive
1717
? "text-orange-custom-100"
18-
: "text-black md:text-gray-custom-800"
18+
: "text-black md:text-gray-custom-800 dark:text-gray-custom-800"
1919
}`}
2020
href={link.link}
2121
>
2222
{link.name}
2323
</Link>
2424
{i !== crumbsArray.length - 1 && (
25-
<p className="text-custom-black-custom-200">/</p>
25+
<p className="text-custom-black-custom-200 dark:text-gray-custom-800">/</p>
2626
)}
2727
</div>
2828
))}

src/components/common/Tabs.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ const Tabs = ({
2727

2828
return (
2929
<div className="flex flex-col relative">
30-
<div className="sticky bg-white z-10 top-0 lg:top-0 md:pt-6 h-full flex gap-4 md:gap-10 xl:gap-16 justify-start items-center border-b border-b-gray-custom-1200">
30+
<div className="sticky bg-white dark:bg-dark-custom-100 z-10 top-0 lg:top-0 md:pt-6 h-full flex gap-4
31+
md:gap-10 xl:gap-16 justify-start items-center border-b border-b-gray-custom-1200 dark:border-b-gray-custom-1800">
3132
<Tab
3233
title="Transcript"
3334
isOpen={openTabs === "transcript"}
@@ -116,7 +117,7 @@ const Tab = ({
116117
<section className="flex flex-col h-full items-center justify-between relative w-full">
117118
<p
118119
className={`text-sm md:text-base xl:text-lg 2xl:text-xl font-normal ${
119-
isOpen ? "text-orange-custom-100" : "text-custom-black-custom-400"
120+
isOpen ? "text-orange-custom-100" : "text-custom-black-custom-400 dark:text-gray-custom-100"
120121
}`}
121122
>
122123
{title}

src/components/common/TranscriptMetadataCard.tsx

+18-32
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import { createSlug, FieldCountItem } from "@/utils";
1111
import AiGeneratedIcon from "../svgs/AIGeneratedIcon";
1212
import { format, isDate } from "date-fns";
1313
import Pill from "./Pill";
14-
import { getIsolatedFacetLink } from "@/service/URLManager/helper";
15-
1614
interface ITranscriptMetadataComponent {
1715
title: string;
1816
date: string | Date;
@@ -34,43 +32,37 @@ const TranscriptMetadataComponent = ({
3432
setShowDetail((prev) => !prev);
3533
};
3634

35+
3736
const convertedDate = date ? new Date(date) : false
3837

39-
const formattedDate = isDate(convertedDate) ? format(convertedDate, "d MMMM, yyyy") : "";
38+
const formattedDate = isDate(convertedDate) ? format(convertedDate, "d MMMM, yyyy") : "";
39+
4040

4141
return (
42-
<div className="border flex text-black flex-col rounded-2xl p-4 md:p-5 2xl:p-6 gap-4 w-full border-gray-custom-1200">
42+
<div className="border flex text-black dark:text-gray-custom-100 flex-col rounded-2xl p-4 md:p-5 2xl:p-6 gap-4 w-full border-gray-custom-1200 dark:border-gray-custom-1800">
4343
<div className="flex flex-col md:flex-row flex-wrap gap-4 justify-between ">
4444
<h4 className="text-orange-custom-100 text-xl font-bold md:text-2xl 2xl:text-[2rem]">
4545
{title}
4646
</h4>
4747
<button
4848
onClick={handleShowDetail}
49-
className="text-black text-sm lg:text-base gap-1 py-1.5 2xl:py-2 px-5 flex items-center border w-[149px] md:w-[154px] rounded-lg border-gray-custom-1100 whitespace-nowrap"
49+
className="text-black dark:text-gray-custom-100
50+
text-sm lg:text-base gap-1 py-1.5 2xl:py-2 px-5 flex items-center border
51+
w-[149px] md:w-[154px] rounded-lg border-gray-custom-1100 whitespace-nowrap"
5052
>
5153
{showDetail ? (
5254
<>
53-
<Image
54-
src="/svgs/eye-close-icon.svg"
55-
alt="eye close icon"
56-
width={24}
57-
height={24}
58-
className="w-5"
59-
/>
55+
<EyeClose className="w-5 dark:text-gray-custom-100" />
6056
<span className="font-medium text-sm 2xl:text-base">
6157
Hide Details{" "}
6258
</span>
6359
</>
6460
) : (
6561
<>
66-
<Image
67-
src="/svgs/eye-open-icon.svg"
68-
alt="eye open icon"
69-
width={24}
70-
height={24}
71-
className="w-5"
72-
/>
73-
<span className="font-medium">Show Details</span>
62+
<EyeOpen className="w-5 dark:text-gray-custom-100" />
63+
<span className="font-medium text-sm 2xl:text-base">
64+
Show Details
65+
</span>
7466
</>
7567
)}
7668
</button>
@@ -81,7 +73,7 @@ const TranscriptMetadataComponent = ({
8173
<MetadataBlock
8274
header={
8375
<>
84-
<CalendarIcon width={"19px"} color="#141B34" />
76+
<CalendarIcon width={"19px"} />
8577
<p className="text-base lg:text-lg font-semibold">Date</p>
8678
</>
8779
}
@@ -100,13 +92,13 @@ const TranscriptMetadataComponent = ({
10092
<MetadataBlock
10193
header={
10294
<>
103-
<BookmarkIcon width={"19px"} color="#000000" />
95+
<BookmarkIcon width={"19px"} />
10496
<p className="text-base lg:text-lg font-semibold">Topics</p>
10597
</>
10698
}
10799
footer={
108100
<div className="flex flex-wrap gap-2">
109-
{(topics && topics.length > 0) ?
101+
{topics && topics.length > 0 ? (
110102
topics.map((topic) => (
111103
<Pill key={topic.slug} kind="link" name={topic.name} slug={getIsolatedFacetLink({filter_field: "tags", filter_value: topic.slug})} />
112104
)):
@@ -119,13 +111,13 @@ const TranscriptMetadataComponent = ({
119111
<MetadataBlock
120112
header={
121113
<>
122-
<MicIcon width={"19px"} color="#000000" />
114+
<MicIcon width={"19px"} />
123115
<p className="text-base lg:text-lg font-semibold">Speakers</p>
124116
</>
125117
}
126118
footer={
127119
<div className="flex flex-wrap gap-2">
128-
{speakers && speakers.length > 0 ?
120+
{speakers && speakers.length > 0 ? (
129121
speakers.map((speaker) => (
130122
<Pill key={speaker} kind="link" name={speaker} slug={getIsolatedFacetLink({filter_field: "authors", filter_value: speaker})} />
131123
)):
@@ -138,13 +130,7 @@ const TranscriptMetadataComponent = ({
138130
<MetadataBlock
139131
header={
140132
<>
141-
<Image
142-
src="/svgs/pencil-icon.svg"
143-
alt="pencil icon"
144-
width={24}
145-
height={24}
146-
className="w-5"
147-
/>
133+
<PencilIcon className="w-5 dark:text-gray-custom-100" />
148134
<p className="text-base lg:text-lg font-semibold">
149135
Transcript by
150136
</p>

src/components/individual-transcript/IndividualTranscript.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const IndividualTranscript = ({
2626
];
2727
const finalRoutes = [...staticRoutes, ...breadCrumbs];
2828
return (
29-
<Wrapper className="relative flex flex-col !px-0 gap-6 lg:gap-7 2xl:gap-10 mx-auto h-[calc(100svh-var(--header-height)-10px)] w-full overflow-y-auto scroll-smooth">
29+
<Wrapper className="relative flex flex-col !px-0 gap-6 lg:gap-7 dark:bg-dark-custom-100 2xl:gap-10 mx-auto h-[calc(100vh-var(--header-height))] w-full overflow-y-auto scroll-smooth">
3030
<div className="py-4 lg:pt-7 2xl:pt-10 px-4 lg:px-10 2xl:px-[60px]">
3131
<BaseCrumbLists crumbsArray={finalRoutes} />
3232
</div>

src/components/individual-transcript/TranscriptTabContent.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function formatSpeakerText(text: string): string {
1111
// Replace matched text with formatted HTML
1212
return text.replace(pattern, (match, speaker, time) => {
1313
// HTML for the speaker's name
14-
const formattedSpeaker = `<span className="font-bold text-black text-base leading-[1.36rem]">${speaker}:</span>`;
14+
const formattedSpeaker = `<span className="font-bold text-black dark:text-gray-custom-100 text-base leading-[1.36rem]">${speaker}:</span>`;
1515
// HTML for the timestamp
1616
const formattedTime = `<span className="text-gray-custom-1700 font-bold text-base leading-[1.36rem]">${time}</span>`;
1717

src/components/individual-transcript/markdown.css

+15-4
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
font-size: 1.125rem;
1818
}
1919

20-
.wmde-markdown h3,
21-
.wmde-markdown h4,
22-
.wmde-markdown h5,
23-
.wmde-markdown h6 {
20+
.wmde-markdown h3, .wmde-markdown h4, .wmde-markdown h5, .wmde-markdown h6 {
2421
color: #000;
2522
scroll-margin-top: 100px;
2623
font-size: 1rem;
2724
}
25+
html.dark .wmde-markdown h1, .wmde-markdown h2, .wmde-markdown h3, .wmde-markdown h4,
26+
.wmde-markdown h5, .wmde-markdown h6 {
27+
color: #fafafa;
28+
}
2829

2930
span.code-line {
3031
white-space: pre-wrap;
@@ -45,11 +46,21 @@ span.code-line {
4546
line-height: 2.1875rem;
4647
}
4748

49+
html.dark .wmde-markdown p {
50+
color: #fafafa;
51+
}
4852
.wmde-markdown ul li {
4953
list-style-type: circle;
5054
color: #000;
5155
}
5256

57+
html.dark .wmde-markdown ul li {
58+
color: #fafafa;
59+
}
60+
61+
html.dark .wmde-markdown ol li {
62+
color: #fafafa;
63+
}
5364
.wmde-markdown ul {
5465
padding-left: 1em;
5566
}

src/components/landing-page/TranscriptCard.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const TranscriptCard = ({ data, daysOpened, transcripts, source }: TranscriptCar
4848
))}
4949

5050
{remainingSpeakers === 0 ? null : (
51-
<p className='py-[4.11px] px-[16.43px] rounded-[5.13px] bg-gray-custom-700 whitespace-nowrap text-nowrap max-md:px-3 max-md:py-[2px] max-xl:text-[13px] max-md:text-sm max-md:border max-md:border-gray-custom-300 max-md:leading-[100%]'>
51+
<p className='py-[4.11px] px-[16.43px] rounded-[5.13px] bg-gray-custom-700 dark:bg-gray-custom-1800 dark:text-gray-custom-100
52+
whitespace-nowrap text-nowrap max-md:px-3 max-md:py-[2px] max-xl:text-[13px] max-md:text-sm max-md:border max-md:border-gray-custom-300 max-md:leading-[100%]'>
5253
+ {remainingSpeakers} more
5354
</p>
5455
)}

src/components/layout/Header.tsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import React, { useState, useRef, useEffect, Suspense } from "react";
44
import Link from "next/link";
55
import Image from "next/image";
6-
import MenuIcon from "/public/svgs/menu.svg";
76
import MobileMenu from "../landing-page/MobileMenu";
87
import { MenuApp, menuApps } from "@/utils/data";
98
import { AppsIcon, ArrowRight, CloseIconOutlined, DayIcon, NightIcon } from "@bitcoin-dev-project/bdp-ui/icons";
@@ -72,27 +71,30 @@ export const LanguageSwitcher = () => {
7271
};
7372

7473
export const AppItem = ({ href, image, alt, title }: MenuApp) => (
74+
<div className="py-1 first-of-type:pt-4 md:py-2 px-4 md:px-5 first-of-type:md:pt-6 last-of-type:pb-4 last-of-type:md:pb-6">
7575
<Link
7676
href={href}
77-
className="py-2 md:py-3 px-5 md:px-8 gap-3 md:gap-6 flex items-center hover:bg-orange-custom-600 first-of-type:pt-4 first-of-type:md:pt-6 last-of-type:pb-4 last-of-type:md:pb-6"
77+
className=" py-2 hover:px-2 hover:md:px-3 gap-3 md:gap-6 flex items-center rounded-xl
78+
hover:bg-orange-custom-600 dark:hover:bg-brown-custom-100 transition-all duration-200"
7879
target="_blank"
7980
rel="noopener noreferrer"
8081
>
8182
<Image
8283
className={`rounded-xl w-11 h-11 lg:w-16 lg:h-16 ${
8384
alt === "Bitcoin search" || alt === "Bitcoin TLDR"
84-
? "border-[1.5px] border-gray-custom-600"
85+
? "border-[1.5px] border-gray-custom-600 dark:border-gray-custom-1800"
8586
: ""
8687
}`}
8788
src={image}
8889
alt={alt}
8990
width={88}
9091
height={88}
9192
/>
92-
<p className="text-xs md:text-sm xl:text-base 2xl:text-lg text-left ">
93+
<p className="text-xs md:text-sm xl:text-base 2xl:text-lg text-left dark:text-gray-custom-100">
9394
{title}
9495
</p>
9596
</Link>
97+
</div>
9698
);
9799

98100
export function AppMenu() {
@@ -155,10 +157,10 @@ const MenuSwitcher = () => {
155157
className="hidden data-[is-open=true]:block absolute top-0 right-0 mt-3 md:mt-4"
156158
>
157159
<div
158-
className={`bg-white rounded-2xl border border-gray-custom-600 w-[min(90vw,300px)] md:w-[402px] max-h-[calc(100vh-70px)] md:max-h-[calc(100vh-100px)] overflow-auto`}
160+
className={`bg-white dark:bg-dark-custom-100 rounded-2xl border border-gray-custom-600 w-[min(90vw,300px)] md:w-[402px] max-h-[calc(100vh-70px)] md:max-h-[calc(100vh-100px)] overflow-auto`}
159161
>
160162
<AppItem {...menuApps[0]} />
161-
<div className="mx-5 md:mx-7 my-3 md:my-3 border border-gray-custom-300"></div>
163+
<div className="mx-5 md:mx-7 my-3 md:my-3 border border-gray-custom-300 dark:border-b-gray-custom-1800"></div>
162164
{menuApps.slice(1).map((item) => (
163165
<AppItem key={item.title} {...item} />
164166
))}

src/components/svgs/CustomBorder.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as React from "react";
2+
import { SVGProps } from "react";
3+
const CustomBorder = (props: SVGProps<SVGSVGElement>) => (
4+
<svg
5+
width={1}
6+
height={"100%"}
7+
// viewBox="0 0 1 1359"
8+
fill="none"
9+
xmlns="http://www.w3.org/2000/svg"
10+
{...props}
11+
>
12+
<line x1={0.5} x2={0.5} y2={"100%"} stroke="#616161" strokeDasharray="8 8" />
13+
</svg>
14+
);
15+
export default CustomBorder;

src/components/svgs/EyeClose.tsx

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import * as React from "react";
2+
import { SVGProps } from "react";
3+
const EyeClose = (props: SVGProps<SVGSVGElement>) => (
4+
<svg
5+
width={20}
6+
height={21}
7+
viewBox="0 0 20 21"
8+
fill="none"
9+
xmlns="http://www.w3.org/2000/svg"
10+
{...props}
11+
>
12+
<path
13+
d="M18.3346 7.16669C18.3346 7.16669 15.0013 12.1667 10.0013 12.1667C5.0013 12.1667 1.66797 7.16669 1.66797 7.16669"
14+
stroke="currentColor"
15+
strokeWidth={1.5}
16+
strokeLinecap="round"
17+
/>
18+
<path
19+
d="M12.5 11.75L13.75 13.8333"
20+
stroke="currentColor"
21+
strokeWidth={1.5}
22+
strokeLinecap="round"
23+
strokeLinejoin="round"
24+
/>
25+
<path
26+
d="M16.668 9.66669L18.3346 11.3334"
27+
stroke="currentColor"
28+
strokeWidth={1.5}
29+
strokeLinecap="round"
30+
strokeLinejoin="round"
31+
/>
32+
<path
33+
d="M1.66797 11.3334L3.33464 9.66669"
34+
stroke="currentColor"
35+
strokeWidth={1.5}
36+
strokeLinecap="round"
37+
strokeLinejoin="round"
38+
/>
39+
<path
40+
d="M7.5 11.75L6.25 13.8333"
41+
stroke="currentColor"
42+
strokeWidth={1.5}
43+
strokeLinecap="round"
44+
strokeLinejoin="round"
45+
/>
46+
</svg>
47+
);
48+
export default EyeClose;

0 commit comments

Comments
 (0)