mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 03:12:40 +00:00
last changes
This commit is contained in:
@@ -205,15 +205,20 @@ const MetadataEditor = createClass({
|
|||||||
|
|
||||||
renderAuthors : function(){
|
renderAuthors : function(){
|
||||||
const authors = this.props.metadata.authors;
|
const authors = this.props.metadata.authors;
|
||||||
let text = 'None.';
|
|
||||||
if(authors && authors.length){
|
|
||||||
text = authors.join(', ');
|
|
||||||
}
|
|
||||||
if(!this.state.isOwner || authors.length < 2) return (
|
if(!this.state.isOwner || authors.length < 2) return (
|
||||||
<div className='field authors'>
|
<div className='field authors'>
|
||||||
<label>authors</label>
|
<label>authors</label>
|
||||||
<div className='value'>
|
<div className='value'>
|
||||||
{text}
|
{authors.length > 0 && (
|
||||||
|
<a href={`/user/${authors[0]}`} className='author-link' title={`Owner - Click to open ${authors[0]}'s profile in a new tab`}>
|
||||||
|
{authors[0]}{authors.length > 1 && ', '}
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
{authors.length > 1 && authors.slice(1).map((author, i)=>(
|
||||||
|
<a href={`/user/${author}`} className='author-link' title={`Author - Click to open ${author}'s profile in a new tab`}>
|
||||||
|
{author}{i+2 < authors.length && ', '}
|
||||||
|
</a>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -223,7 +228,7 @@ const MetadataEditor = createClass({
|
|||||||
<ul className='list'>
|
<ul className='list'>
|
||||||
{authors.length > 0 && (
|
{authors.length > 0 && (
|
||||||
<li className='tag owner' title='Owner'>
|
<li className='tag owner' title='Owner'>
|
||||||
<a href={`/user/${authors[0]}`} className='author-link'>
|
<a href={`/user/${authors[0]}`} className='author-link' title={`Owner - Click to open ${authors[0]}'s profile in a new tab`}>
|
||||||
{authors[0]}
|
{authors[0]}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -231,7 +236,7 @@ const MetadataEditor = createClass({
|
|||||||
|
|
||||||
{authors.length > 1 && authors.slice(1).map((author, i)=>(
|
{authors.length > 1 && authors.slice(1).map((author, i)=>(
|
||||||
<li className='tag author' key={i + 1} title='Author'>
|
<li className='tag author' key={i + 1} title='Author'>
|
||||||
<a href={`/user/${author}`} className='author-link'>
|
<a href={`/user/${author}`} className='author-link' title={`Author - Click to open ${authors[0]}'s profile in a new tab`}>
|
||||||
{author}
|
{author}
|
||||||
</a>
|
</a>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -162,33 +162,44 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.authors.field {
|
.authors.field {
|
||||||
.tag.owner {
|
.tag {
|
||||||
position: relative;
|
font-weight:300;
|
||||||
background-color:@silverLight;
|
transition:background-color 0.2s;
|
||||||
min-width:25px;
|
|
||||||
display:grid;
|
|
||||||
place-items:center;
|
|
||||||
font-weight: 900;
|
|
||||||
|
|
||||||
&::after {
|
&.owner {
|
||||||
content: "\f521";
|
position: relative;
|
||||||
font-family: "Font Awesome 6 Free";
|
background-color:@silverLight;
|
||||||
color:gold;
|
min-width:25px;
|
||||||
position: absolute;
|
display:grid;
|
||||||
top: 0;
|
place-items:center;
|
||||||
left: 50%;
|
font-weight: 900;
|
||||||
width:15px;
|
|
||||||
height:15px;
|
&::after {
|
||||||
translate:-50% -90%;
|
content: "\f521";
|
||||||
|
font-family: "Font Awesome 6 Free";
|
||||||
|
color:gold;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width:15px;
|
||||||
|
height:15px;
|
||||||
|
rotate:-45deg;
|
||||||
|
translate:-50% -50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:has(button:hover) {
|
||||||
|
background:#d97d7d;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
button {
|
|
||||||
color:@redLight;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
button {
|
||||||
|
color:@red;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
a {
|
a {
|
||||||
color:black;
|
color:black;
|
||||||
|
text-decoration:unset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user