Improve slide preview modal with full-screen presentation mode
- Remove padding and shadows for true full-screen experience - Use theme background color to fill empty space around slides - Optimize aspect ratio calculations to maximize screen usage - Maintain proper aspect ratios without distortion - Add theme-background class for proper CSS variable inheritance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
1008bd4bca
commit
dcc8d19282
@ -5,11 +5,14 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
background: rgba(0, 0, 0, 0.95);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 2rem;
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-preview-modal.theme-background {
|
||||||
|
background: var(--theme-background, #000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview-hint {
|
.preview-hint {
|
||||||
@ -94,29 +97,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.slide-preview-wrapper .slide-container {
|
.slide-preview-wrapper .slide-container {
|
||||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
box-shadow: none;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Aspect ratio handling - matching SlideEditor pattern */
|
/* Full screen aspect ratio handling - maintain proper aspect ratio */
|
||||||
|
.slide-preview-wrapper .slide-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.slide-preview-wrapper .slide-container.aspect-16-9 {
|
.slide-preview-wrapper .slide-container.aspect-16-9 {
|
||||||
aspect-ratio: 16 / 9;
|
aspect-ratio: 16 / 9;
|
||||||
width: min(90vw, calc(90vh * 16/9));
|
width: min(100vw, calc(100vh * 16 / 9));
|
||||||
|
height: min(100vh, calc(100vw * 9 / 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-preview-wrapper .slide-container.aspect-4-3 {
|
.slide-preview-wrapper .slide-container.aspect-4-3 {
|
||||||
aspect-ratio: 4 / 3;
|
aspect-ratio: 4 / 3;
|
||||||
width: min(90vw, calc(90vh * 4/3));
|
width: min(100vw, calc(100vh * 4 / 3));
|
||||||
|
height: min(100vh, calc(100vw * 3 / 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-preview-wrapper .slide-container.aspect-16-10 {
|
.slide-preview-wrapper .slide-container.aspect-16-10 {
|
||||||
aspect-ratio: 16 / 10;
|
aspect-ratio: 16 / 10;
|
||||||
width: min(90vw, calc(90vh * 16/10));
|
width: min(100vw, calc(100vh * 16 / 10));
|
||||||
|
height: min(100vh, calc(100vw * 10 / 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-preview-wrapper .slide-container.aspect-1-1 {
|
.slide-preview-wrapper .slide-container.aspect-1-1 {
|
||||||
aspect-ratio: 1 / 1;
|
aspect-ratio: 1 / 1;
|
||||||
width: min(90vw, 90vh);
|
width: min(100vw, 100vh);
|
||||||
|
height: min(100vh, 100vw);
|
||||||
}
|
}
|
@ -79,7 +79,7 @@ export const SlidePreviewModal: React.FC<SlidePreviewModalProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="slide-preview-modal" onClick={handleOverlayClick}>
|
<div className="slide-preview-modal theme-background" onClick={handleOverlayClick}>
|
||||||
{/* ESC hint */}
|
{/* ESC hint */}
|
||||||
{showHint && (
|
{showHint && (
|
||||||
<div className="preview-hint">
|
<div className="preview-hint">
|
||||||
|
Loading…
Reference in New Issue
Block a user