mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 23:24:22 +01:00
feat: hide main content when sidepanes open on mobile for single-pane view
This commit is contained in:
@@ -201,7 +201,7 @@ const ThreePaneLayout: React.FC<ThreePaneLayoutProps> = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Mobile bookmark button */}
|
{/* Mobile bookmark button - only show when viewing article */}
|
||||||
{isMobile && !props.isSidebarOpen && props.isHighlightsCollapsed && (
|
{isMobile && !props.isSidebarOpen && props.isHighlightsCollapsed && (
|
||||||
<button
|
<button
|
||||||
className="mobile-hamburger-btn"
|
className="mobile-hamburger-btn"
|
||||||
@@ -213,7 +213,7 @@ const ThreePaneLayout: React.FC<ThreePaneLayoutProps> = (props) => {
|
|||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Mobile highlights button */}
|
{/* Mobile highlights button - only show when viewing article */}
|
||||||
{isMobile && !props.isSidebarOpen && props.isHighlightsCollapsed && (
|
{isMobile && !props.isSidebarOpen && props.isHighlightsCollapsed && (
|
||||||
<button
|
<button
|
||||||
className="mobile-highlights-btn"
|
className="mobile-highlights-btn"
|
||||||
@@ -259,7 +259,7 @@ const ThreePaneLayout: React.FC<ThreePaneLayoutProps> = (props) => {
|
|||||||
isMobile={isMobile}
|
isMobile={isMobile}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="pane main">
|
<div className={`pane main ${isMobile && (props.isSidebarOpen || !props.isHighlightsCollapsed) ? 'mobile-hidden' : ''}`}>
|
||||||
{props.showSettings ? (
|
{props.showSettings ? (
|
||||||
<Settings
|
<Settings
|
||||||
settings={props.settings}
|
settings={props.settings}
|
||||||
|
|||||||
@@ -619,6 +619,13 @@ body.mobile-sidebar-open {
|
|||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
transition: opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide main content when sidepanes are open on mobile */
|
||||||
|
.three-pane .pane.main.mobile-hidden {
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pane.highlights {
|
.pane.highlights {
|
||||||
|
|||||||
Reference in New Issue
Block a user