forked from geosolutions-it/geonode-mapstore-client
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the viewer layout to container level (#551)
- Loading branch information
1 parent
0d3e632
commit 851adc1
Showing
14 changed files
with
249 additions
and
582 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
geonode_mapstore_client/client/js/components/ViewerLayout/ViewerLayout.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright 2021, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
function ViewerLayout({ | ||
id, | ||
className, | ||
header, | ||
leftColumn, | ||
rightColumn, | ||
rightOverlay, | ||
children, | ||
footer | ||
}) { | ||
|
||
return ( | ||
<div | ||
id={id} | ||
className={`${className ? `${className} ` : ''}gn-viewer-layout`} | ||
style={{ | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
width: '100%', | ||
height: '100%', | ||
display: 'flex', | ||
flexDirection: 'column' | ||
}}> | ||
<header> | ||
{header} | ||
</header> | ||
<div | ||
className="gn-viewer-layout-body" | ||
style={{ | ||
display: 'flex', | ||
width: '100%', | ||
flex: 1, | ||
position: 'relative' | ||
}}> | ||
<div className="gn-viewer-left-column"> | ||
{leftColumn} | ||
</div> | ||
<div | ||
className="gn-viewer-layout-center" | ||
style={{ | ||
flex: 1, | ||
position: 'relative' | ||
}} | ||
> | ||
{children} | ||
</div> | ||
<div className="gn-viewer-right-column"> | ||
{rightColumn} | ||
</div> | ||
</div> | ||
<div | ||
className="gn-viewer-right-overlay shadow-far" | ||
style={{ | ||
position: 'absolute', | ||
right: 0, | ||
height: '100%', | ||
zIndex: 2000, | ||
transform: 'all 0.3s' | ||
}}> | ||
{rightOverlay} | ||
</div> | ||
<footer> | ||
{footer} | ||
</footer> | ||
</div> | ||
); | ||
} | ||
|
||
export default ViewerLayout; |
1 change: 1 addition & 0 deletions
1
geonode_mapstore_client/client/js/components/ViewerLayout/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './ViewerLayout'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.