mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-05-18 04:05:51 +00:00
polishing some final styles
This commit is contained in:
parent
75c2899244
commit
03789e85c1
@ -351,7 +351,7 @@ export default function CourseDetails({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Right column: Course details */}
|
{/* Right column: Course details */}
|
||||||
<div className={`bg-gray-800 rounded-lg h-fit ${isPhone ? 'p-3' : 'p-4'}`}>
|
<div className={`bg-gray-800 rounded-lg h-fit ${isPhone ? 'p-3 pl-0' : 'p-4'}`}>
|
||||||
<h2 className={`${isPhone ? 'text-lg' : 'text-xl'} font-semibold mb-3 text-white`}>Course Information</h2>
|
<h2 className={`${isPhone ? 'text-lg' : 'text-xl'} font-semibold mb-3 text-white`}>Course Information</h2>
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
|
@ -39,7 +39,7 @@ const CourseHeader = ({
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
router.push('/');
|
router.push('/');
|
||||||
}}
|
}}
|
||||||
className="mr-2 p-button-rounded p-button-text text-gray-300 hover:text-white"
|
className="mr-4 p-button-rounded p-button-text text-gray-300 hover:text-white"
|
||||||
rounded={true}
|
rounded={true}
|
||||||
text={true}
|
text={true}
|
||||||
aria-label="Go back to home"
|
aria-label="Go back to home"
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Tag } from 'primereact/tag';
|
import { Tag } from 'primereact/tag';
|
||||||
import { Button } from 'primereact/button';
|
|
||||||
import { Sidebar } from 'primereact/sidebar';
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { useImageProxy } from '@/hooks/useImageProxy';
|
import { useImageProxy } from '@/hooks/useImageProxy';
|
||||||
import GenericButton from '@/components/buttons/GenericButton';
|
import GenericButton from '@/components/buttons/GenericButton';
|
||||||
@ -109,39 +107,6 @@ const CourseSidebar = ({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
// Global toggle button container - only shown if hideToggleButton is false
|
|
||||||
const SidebarToggle = () => {
|
|
||||||
if (visible || hideToggleButton || isMobileView) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
position: 'fixed',
|
|
||||||
right: 0,
|
|
||||||
top: '40%',
|
|
||||||
zIndex: 99999,
|
|
||||||
pointerEvents: 'auto',
|
|
||||||
transform: 'translateY(-50%)'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<GenericButton
|
|
||||||
icon="pi pi-chevron-left"
|
|
||||||
onClick={handleToggle}
|
|
||||||
className="shadow-2xl border-0 rounded-r-none rounded-l-xl bg-blue-600 hover:bg-blue-700 pointer-events-auto"
|
|
||||||
tooltip="Show lessons"
|
|
||||||
tooltipOptions={{ position: 'left' }}
|
|
||||||
style={{
|
|
||||||
borderTopRightRadius: 0,
|
|
||||||
borderBottomRightRadius: 0,
|
|
||||||
boxShadow: '0 0 20px rgba(0,0,0,0.5)',
|
|
||||||
width: '3rem',
|
|
||||||
height: '5rem'
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Mobile content tab
|
// Mobile content tab
|
||||||
const MobileLessonsTab = () => (
|
const MobileLessonsTab = () => (
|
||||||
<div className="bg-gray-900 rounded-lg overflow-hidden border border-gray-800 shadow-md mb-6">
|
<div className="bg-gray-900 rounded-lg overflow-hidden border border-gray-800 shadow-md mb-6">
|
||||||
@ -160,9 +125,6 @@ const CourseSidebar = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Unified button approach for desktop - only if not hidden */}
|
|
||||||
{!hideToggleButton && <SidebarToggle />}
|
|
||||||
|
|
||||||
{/* Mobile view - direct content instead of sidebar */}
|
{/* Mobile view - direct content instead of sidebar */}
|
||||||
{isMobileView && visible && (
|
{isMobileView && visible && (
|
||||||
<MobileLessonsTab />
|
<MobileLessonsTab />
|
||||||
|
@ -32,17 +32,11 @@ export default function MenuTab({ items, activeIndex, onTabChange, sidebarVisibl
|
|||||||
: "pi pi-chevron-left"}
|
: "pi pi-chevron-left"}
|
||||||
onClick={onToggleSidebar}
|
onClick={onToggleSidebar}
|
||||||
outlined={true}
|
outlined={true}
|
||||||
style={{
|
rounded={true}
|
||||||
width: '2.5rem',
|
size="small"
|
||||||
height: '2.5rem',
|
|
||||||
backgroundColor: 'transparent',
|
|
||||||
border: 'none',
|
|
||||||
fontWeight: 'bold'
|
|
||||||
}}
|
|
||||||
tooltip={sidebarVisible ? "Hide lessons" : "Show lessons"}
|
tooltip={sidebarVisible ? "Hide lessons" : "Show lessons"}
|
||||||
tooltipOptions={{ position: 'bottom' }}
|
tooltipOptions={{ position: 'bottom' }}
|
||||||
aria-label="Toggle course lessons"
|
aria-label="Toggle course lessons"
|
||||||
size="small"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user