0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Move Metadata window to title

This commit is contained in:
G.Ambatte
2023-04-09 13:33:53 +12:00
parent c5bd41acbf
commit aa0cc1ebf6
2 changed files with 71 additions and 72 deletions

View File

@@ -50,28 +50,26 @@ const MetadataNav = createClass({
renderMetaWindow : function(){
if(!this.state.showMetaWindow) return null;
return <div className='windowWrapper'>
<div className='window'>
<div className='row'>
<h4>Description</h4>
<p>{this.props.brew.description || 'No description.'}</p>
</div>
<div className='row'>
<h4>Authors</h4>
<p>{this.getAuthors()}</p>
</div>
<div className='row'>
<h4>Tags</h4>
<p>{this.getTags()}</p>
</div>
<div className='row'>
<h4>Systems</h4>
<p>{this.getSystems()}</p>
</div>
<div className='row'>
<h4>Last Updated</h4>
<p>{Moment(this.props.brew.updatedAt).fromNow()}</p>
</div>
return <div className='window'>
<div className='row'>
<h4>Description</h4>
<p>{this.props.brew.description || 'No description.'}</p>
</div>
<div className='row'>
<h4>Authors</h4>
<p>{this.getAuthors()}</p>
</div>
<div className='row'>
<h4>Tags</h4>
<p>{this.getTags()}</p>
</div>
<div className='row'>
<h4>Systems</h4>
<p>{this.getSystems()}</p>
</div>
<div className='row'>
<h4>Updated</h4>
<p>{Moment(this.props.brew.updatedAt).fromNow()}</p>
</div>
</div>;
},

View File

@@ -175,59 +175,60 @@
i{
margin-right: 10px;
}
.windowWrapper{
position: fixed;
top: 18px;
left: 0px;
width: calc(100vw - 30px);
z-index: -1;
.window{
max-width : 764px;
width : 80%;
min-width : 380px;
max-height : ~"calc(100vh - 28px)";
background-color : #333;
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-content: baseline;
padding: 10px 10px 0px;
border-radius: 5px;
margin: 0 auto;
.row{
display : flex;
flex-flow : row wrap;
width : 100%;
h4{
display : block;
box-sizing : border-box;
padding : 5px 0px;
color : #bbb;
text-align : center;
border-top : 1px solid #888;
flex-basis : 20%;
flex-grow : 1;
min-width : 76px;
}
p{
font-family : 'Open Sans', sans-serif;
font-size : 10px;
font-weight : normal;
text-transform : initial;
padding : 5px 0;
flex-basis : 80%;
flex-grow : 1;
border-top : 1px solid #888;
.tag{
border: 2px solid grey;
padding: 2px;
margin: -2px 2px;
display: inline-block;
border-radius: 5px;
}
// .windowWrapper{
// position: fixed;
// top: 18px;
// left: 0px;
// width: calc(100vw - 30px);
// z-index: -1;
.window{
position: absolute;
top: 100%;
width: 80%;
left: 10%;
max-height : ~"calc(100vh - 28px)";
background-color : #333;
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-content: baseline;
padding: 0px 10px;
border-radius: 0 0 5px 5px;
margin: 0 auto;
.row{
display : flex;
flex-flow : row wrap;
width : 100%;
h4{
display : block;
box-sizing : border-box;
padding : 5px 0px;
color : #bbb;
text-align : center;
border-top : 1px solid #888;
flex-basis : 20%;
flex-grow : 1;
min-width : 76px;
}
p{
font-family : 'Open Sans', sans-serif;
font-size : 10px;
font-weight : normal;
text-transform : initial;
padding : 5px 0;
flex-basis : 80%;
flex-grow : 1;
border-top : 1px solid #888;
.tag{
border: 2px solid grey;
padding: 2px;
margin: -2px 2px;
display: inline-block;
border-radius: 5px;
}
}
}
// }
}
}
.warning.navItem{