mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 18:32:40 +00:00
flex working, but odd vertical spacing
This commit is contained in:
@@ -231,23 +231,25 @@ const MetadataEditor = createClass({
|
|||||||
value={this.props.metadata.title}
|
value={this.props.metadata.title}
|
||||||
onChange={(e)=>this.handleFieldChange('title', e)} />
|
onChange={(e)=>this.handleFieldChange('title', e)} />
|
||||||
</div>
|
</div>
|
||||||
<div className='field description'>
|
<div className='field-group'>
|
||||||
<label>description</label>
|
<div className='field description'>
|
||||||
<textarea value={this.props.metadata.description} className='value'
|
<label>description</label>
|
||||||
onChange={(e)=>this.handleFieldChange('description', e)} />
|
<textarea value={this.props.metadata.description} className='value'
|
||||||
</div>
|
onChange={(e)=>this.handleFieldChange('description', e)} />
|
||||||
<div className='field thumbnail'>
|
</div>
|
||||||
<label>thumbnail</label>
|
<div className='field thumbnail'>
|
||||||
<input type='text'
|
<label>thumbnail</label>
|
||||||
value={this.props.metadata.thumbnail}
|
<input type='text'
|
||||||
placeholder='my.thumbnail.url'
|
value={this.props.metadata.thumbnail}
|
||||||
className='value'
|
placeholder='my.thumbnail.url'
|
||||||
onChange={(e)=>this.handleFieldChange('thumbnail', e)} />
|
className='value'
|
||||||
<button className='display' onClick={this.toggleThumbnailDisplay}>
|
onChange={(e)=>this.handleFieldChange('thumbnail', e)} />
|
||||||
<i className={`fas fa-caret-${this.state.showThumbnail ? 'right' : 'left'}`} />
|
<button className='display' onClick={this.toggleThumbnailDisplay}>
|
||||||
</button>
|
<i className={`fas fa-caret-${this.state.showThumbnail ? 'right' : 'left'}`} />
|
||||||
{this.renderThumbnail()}
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{this.renderThumbnail()}
|
||||||
|
|
||||||
<StringArrayEditor label='tags' valuePatterns={[/^(?:(?:group|meta|system|type):)?[A-Za-z0-9][A-Za-z0-9 \/.\-]{0,40}$/]}
|
<StringArrayEditor label='tags' valuePatterns={[/^(?:(?:group|meta|system|type):)?[A-Za-z0-9][A-Za-z0-9 \/.\-]{0,40}$/]}
|
||||||
placeholder='add tag' unique={true}
|
placeholder='add tag' unique={true}
|
||||||
|
|||||||
@@ -7,10 +7,21 @@
|
|||||||
width : 100%;
|
width : 100%;
|
||||||
padding : 25px;
|
padding : 25px;
|
||||||
background-color : #999;
|
background-color : #999;
|
||||||
|
height : calc(100vh - 54px); // 54px is the height of the navbar + snippet bar. probably a better way to dynamic get this.
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.field-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 5;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
.field{
|
.field{
|
||||||
display : flex;
|
display : flex;
|
||||||
width : 100%;
|
width : 100%;
|
||||||
margin-bottom : 10px;
|
|
||||||
&>label{
|
&>label{
|
||||||
display : inline-block;
|
display : inline-block;
|
||||||
vertical-align : top;
|
vertical-align : top;
|
||||||
@@ -23,7 +34,7 @@
|
|||||||
}
|
}
|
||||||
&>.value{
|
&>.value{
|
||||||
flex : 1 1 auto;
|
flex : 1 1 auto;
|
||||||
min-width : 200px;
|
width : 50px;
|
||||||
}
|
}
|
||||||
&.thumbnail{
|
&.thumbnail{
|
||||||
height : 1.4em;
|
height : 1.4em;
|
||||||
@@ -43,22 +54,33 @@
|
|||||||
background-color: #777;
|
background-color: #777;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.thumbnail-preview{
|
}
|
||||||
position : relative;
|
|
||||||
width : 80px;
|
&.description {
|
||||||
height : min-content;
|
flex: 1;
|
||||||
border : 2px solid white;
|
textarea.value {
|
||||||
margin-left : 5px;
|
resize : none;
|
||||||
max-height : 115px;
|
height : auto;
|
||||||
|
font-family : 'Open Sans', sans-serif;
|
||||||
|
font-size : 0.8em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.description.field textarea.value{
|
|
||||||
resize : none;
|
|
||||||
height : 5em;
|
.thumbnail-preview {
|
||||||
font-family : 'Open Sans', sans-serif;
|
position: relative;
|
||||||
font-size : 0.8em;
|
justify-self: center;
|
||||||
|
width: 80px;
|
||||||
|
height: min-content;
|
||||||
|
border: 2px solid white;
|
||||||
|
flex: 1 1;
|
||||||
|
max-height: 115px;
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
object-fit: contain;
|
||||||
|
background-color: cadetblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.systems.field .value{
|
.systems.field .value{
|
||||||
label{
|
label{
|
||||||
vertical-align : middle;
|
vertical-align : middle;
|
||||||
|
|||||||
Reference in New Issue
Block a user