0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 18:42:40 +00:00

Move metadata window to be independent of title

This commit is contained in:
G.Ambatte
2023-03-19 18:42:31 +13:00
parent 807ab2a538
commit db5469699e
2 changed files with 66 additions and 57 deletions

View File

@@ -46,7 +46,8 @@ const MetadataNav = createClass({
renderMetaWindow : function(){ renderMetaWindow : function(){
if(!this.state.showMetaWindow) return null; if(!this.state.showMetaWindow) return null;
return <div className='dropdown'> return <div className='windowWrapper'>
<div className='window'>
<div className='row'> <div className='row'>
<h4>Description</h4> <h4>Description</h4>
<p>{this.props.brew.description || 'No description.'}</p> <p>{this.props.brew.description || 'No description.'}</p>
@@ -67,6 +68,7 @@ const MetadataNav = createClass({
<h4>Last Updated</h4> <h4>Last Updated</h4>
<p>{Moment(this.props.brew.updatedAt).fromNow()}</p> <p>{Moment(this.props.brew.updatedAt).fromNow()}</p>
</div> </div>
</div>
</div>; </div>;
}, },

View File

@@ -173,12 +173,16 @@
i{ i{
margin-right: 10px; margin-right: 10px;
} }
.dropdown{ .windowWrapper{
position : absolute; position: fixed;
top : 18px; top: 18px;
left : 0px; left: 0px;
z-index : -1; width: calc(100vw - 30px);
width : 100%; z-index: -1;
.window{
max-width : 764px;
width : 80%;
min-width : 380px;
max-height : ~"calc(100vh - 28px)"; max-height : ~"calc(100vh - 28px)";
background-color : #333; background-color : #333;
display: flex; display: flex;
@@ -187,6 +191,7 @@
align-content: baseline; align-content: baseline;
padding: 10px 10px 0px; padding: 10px 10px 0px;
border-radius: 5px; border-radius: 5px;
margin: 0 auto;
.row{ .row{
display : flex; display : flex;
flex-flow : row wrap; flex-flow : row wrap;
@@ -200,6 +205,7 @@
border-top : 1px solid #888; border-top : 1px solid #888;
flex-basis : 20%; flex-basis : 20%;
flex-grow : 1; flex-grow : 1;
min-width : 76px;
} }
p{ p{
font-family : 'Open Sans', sans-serif; font-family : 'Open Sans', sans-serif;
@@ -214,6 +220,7 @@
} }
} }
} }
}
.warning.navItem{ .warning.navItem{
position : relative; position : relative;
background-color : @orange; background-color : @orange;