Skip to content

Commit 18f4f36

Browse files
authored
fix: iframe-video positioning and width fixes along with some accordion styling fixes (#1625)
* fix: iframe-video positioning and width * fix: increased sidebar padding-bottom to ensure the last accordion is visible, and centered accordion text for smaller screen sizes * fixed position and alignment of filter button * minor fix: removed the unnessary ugly looking borders around show contents button * Resolved logo and search icon overlap in the navbar on small mobile devices
1 parent b8df755 commit 18f4f36

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/app/courses/[courseId]/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ const Layout = async ({
4949
const fullCourseContent = await getFullCourseContent(parseInt(courseId, 10));
5050
return (
5151
<div className="relative flex min-h-screen flex-col py-24">
52-
<div className="flex justify-between">
52+
<div className="flex justify-between items-center">
5353
<div className="2/3">
5454
<Sidebar fullCourseContent={fullCourseContent} courseId={courseId} />
5555
</div>
56-
<div className="w-1/3">
56+
<div>
5757
<FilterContent />
5858
</div>
5959
</div>

src/components/AppxVideoPlayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const AppxVideoPlayer = ({
3838
}
3939
return <iframe
4040
src={url}
41-
className="h-[80vh] w-[80vw] rounded-lg"
41+
className="w-full rounded-lg aspect-video"
4242
allowFullScreen
4343
></iframe >;
4444
};

src/components/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const Navbar = () => {
8080
className="size-10 rounded-full"
8181
/>
8282
<p
83-
className={`hidden bg-gradient-to-b from-blue-400 to-blue-700 bg-clip-text text-2xl font-black tracking-tighter text-transparent min-[375px]:block`}
83+
className={`hidden bg-gradient-to-b from-blue-400 to-blue-700 bg-clip-text text-2xl font-black tracking-tighter text-transparent min-[410px]:block`}
8484
>
8585
100xDevs
8686
</p>

src/components/Sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export function Sidebar({
234234
);
235235

236236
return (
237-
<div className="sticky top-[72px] z-20 bg-background py-2">
237+
<div className="sticky top-[72px] z-20 py-2">
238238
<Button
239239
ref={buttonRef}
240240
onClick={() => setSidebarOpen((s) => !s)}
@@ -274,7 +274,7 @@ export function Sidebar({
274274
<Accordion
275275
type="multiple"
276276
defaultValue={currentActiveContentIds.map((num) => `item-${num}`)}
277-
className="w-full px-4 pb-24 capitalize"
277+
className="w-full px-4 pb-40 capitalize"
278278
>
279279
{memoizedContent}
280280
</Accordion>

src/components/VideoPlayerSegment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export const VideoPlayerSegment: FunctionComponent<VideoProps> = ({
9898
<div
9999
id="thumbnail-preview"
100100
ref={thumbnailPreviewRef}
101-
className="pointer-events-none absolute z-10 hidden h-[180px] w-[320px] bg-cover bg-no-repeat"
101+
className="pointer-events-none absolute z-10 hidden h-full w-full bg-cover bg-no-repeat"
102102
/>
103103
<VideoPlayer
104104
setQuality={setQuality}

src/components/ui/accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const AccordionTrigger = React.forwardRef<
2828
<AccordionPrimitive.Trigger
2929
ref={ref}
3030
className={cn(
31-
'flex flex-1 items-center justify-between py-4 transition-all [&[data-state=open]>svg]:rotate-180',
31+
'flex flex-1 items-center justify-between py-4 transition-all [&[data-state=open]>svg]:rotate-180 text-start',
3232
className,
3333
)}
3434
{...props}

0 commit comments

Comments
 (0)