Skip to content

Commit

Permalink
Merge branch 'master' into addLockRoutes-naturalcrit#3326
Browse files Browse the repository at this point in the history
  • Loading branch information
calculuschild authored Sep 24, 2024
2 parents 05c1d31 + cd0bf9c commit 220f4fa
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 118 deletions.
17 changes: 5 additions & 12 deletions client/homebrew/editor/metadataEditor/metadataEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,14 @@ const MetadataEditor = createClass({
onChange={(e)=>this.handleRenderer('V3', e)} />
V3
</label>

<a href='/legacy' target='_blank' rel='noopener noreferrer'>
Click here to see the demo page for the old Legacy renderer!
</a>
<small><a href='/legacy' target='_blank' rel='noopener noreferrer'>Click here to see the demo page for the old Legacy renderer!</a></small>
</div>
</div>;
},

render : function(){
return <div className='metadataEditor'>
<h1 className='sectionHead'>Brew</h1>
<h1>Properties Editor</h1>

<div className='field title'>
<label>title</label>
Expand Down Expand Up @@ -362,9 +359,7 @@ const MetadataEditor = createClass({

{this.renderRenderOptions()}

<hr/>

<h1 className='sectionHead'>Authors</h1>
<h2>Authors</h2>

{this.renderAuthors()}

Expand All @@ -375,15 +370,13 @@ const MetadataEditor = createClass({
notes={['Invited author usernames are case sensitive.', 'After adding an invited author, send them the edit link. There, they can choose to accept or decline the invitation.']}
onChange={(e)=>this.handleFieldChange('invitedAuthors', e)}/>

<hr/>

<h1 className='sectionHead'>Privacy</h1>
<h2>Privacy</h2>

<div className='field publish'>
<label>publish</label>
<div className='value'>
{this.renderPublish()}
<small>Published homebrews will be publicly viewable and searchable (eventually...)</small>
<small>Published brews are searchable in <a href='/vault'>the Vault</a> and visible on your user page. Unpublished brews are not indexed in the Vault or visible on your user page, but can still be shared and indexed by search engines. You can unpublish a brew any time.</small>
</div>
</div>

Expand Down
85 changes: 49 additions & 36 deletions client/homebrew/editor/metadataEditor/metadataEditor.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'naturalcrit/styles/colors.less';


.metadataEditor {
position : absolute;
z-index : 5;
Expand All @@ -9,12 +10,19 @@
padding : 25px;
overflow-y : auto;
background-color : #999999;
font-size : 13px;

.sectionHead {
h1 {
margin: 0 0 40px;
font-weight: bold;
text-transform: uppercase;
}

h2 {
margin : 20px 0;
font-weight : 1000;

&:first-of-type { margin-top : 0; }
font-weight : bold;
border-bottom: 2px solid gray;
color: #555;
}

& > div { margin-bottom : 10px; }
Expand Down Expand Up @@ -43,15 +51,21 @@
min-width : 200px;
& > label {
width : 80px;
font-size : 11px;
font-weight : 800;
line-height : 1.8em;
text-transform : uppercase;
font-size: .9em;
}
& > .value {
flex : 1 1 auto;
width : 50px;
&:invalid { background : #FFB9B9; }
small {
display : block;
font-size : 0.9em;
font-style : italic;
line-height : 1.4em;
}
}
input[type='text'], textarea {
border : 1px solid gray;
Expand All @@ -78,7 +92,6 @@
textarea.value {
height : auto;
font-family : 'Open Sans', sans-serif;
font-size : 0.8em;
resize : none;
}
}
Expand All @@ -87,12 +100,6 @@
z-index : 200;
max-width : 150px;
}
small {
display : inline-block;
font-size : 0.6em;
font-style : italic;
line-height : 1.4em;
}
}


Expand All @@ -113,18 +120,13 @@
display : inline-flex;
align-items : center;
margin-right : 15px;
font-size : 0.7em;
font-size : 0.9em;
font-weight : 800;
white-space : nowrap;
vertical-align : middle;
cursor : pointer;
user-select : none;
}
a {
display : inline-flex;
font-size : 0.7em;
font-weight : 800;
}
input {
margin : 3px;
vertical-align : middle;
Expand All @@ -149,12 +151,10 @@
}
}
.authors.field .value {
font-size : 0.8em;
line-height : 1.5em;
}

.themes.field {
font-size : 13.33px;
.navDropdownContainer {
position : relative;
z-index : 100;
Expand All @@ -165,9 +165,9 @@
background-color : darkgray;
}
& > div:first-child {
padding : 6px 3px;
padding : 3px 3px;
background-color : inherit;
border : 2px solid rgb(118,118,118);
border : 1px solid gray;
i { float : right; }
&:hover {
color : white;
Expand Down Expand Up @@ -240,6 +240,7 @@
}
}
}

.field .list {
display : flex;
flex : 1 0;
Expand All @@ -258,15 +259,15 @@
color : white;
text-align : center;
cursor : pointer;

i {
position : relative;
top : 50%;
transform : translateY(-50%);
}

&:not(:last-child) { border-right : 1px solid black; }

&:last-child { border-radius : 0 0.5em 0.5em 0; }
}

Expand All @@ -277,8 +278,7 @@
background-color : #DDDDDD;
border-radius : 0.5em;

.icon {
#groupedIcon; }
.icon { #groupedIcon; }
}

.input-group {
Expand All @@ -294,17 +294,30 @@
height : 100%;
}

.invalid:focus { background-color : pink; }
.input-group {
height : ~'calc(.9em + 4px + .6em)';

input { border-radius : 0.5em 0 0 0.5em; }

input:last-child { border-radius : 0.5em; }

.icon {
#groupedIcon;
top : -0.54em;
right : 1px;
height : 97%;
font-size : 0.8em;
.value {
width : 7.5vw;
min-width : 75px;
height : 100%;
}

.invalid:focus { background-color : pink; }

i { font-size : 1.125em; }
.icon {
#groupedIcon;
top : -0.54em;
right : 1px;
height : 97%;

i { font-size : 1.125em; }
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const StringArrayEditor = createClass({

return <div className='field'>
<label>{this.props.label}</label>
<div style={{ flex: '1 0' }}>
<div style={{ flex: '1 0' }} className='value'>
<div className='list'>
{valueElements}
<div className='input-group'>
Expand Down
Loading

0 comments on commit 220f4fa

Please sign in to comment.