mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-17 12:23:21 +00:00
Merge branch 'master' into pr/2382
This commit is contained in:
@@ -109,7 +109,12 @@ const BrewRenderer = createClass({
|
|||||||
|
|
||||||
renderPageInfo : function(){
|
renderPageInfo : function(){
|
||||||
return <div className='pageInfo' ref='main'>
|
return <div className='pageInfo' ref='main'>
|
||||||
{this.state.viewablePageNumber + 1} / {this.state.pages.length}
|
<div>
|
||||||
|
{this.props.renderer}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{this.state.viewablePageNumber + 1} / {this.state.pages.length}
|
||||||
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,17 @@
|
|||||||
right : 17px;
|
right : 17px;
|
||||||
bottom : 0;
|
bottom : 0;
|
||||||
z-index : 1000;
|
z-index : 1000;
|
||||||
padding : 8px 10px;
|
|
||||||
background-color : #333;
|
background-color : #333;
|
||||||
font-size : 10px;
|
font-size : 10px;
|
||||||
font-weight : 800;
|
font-weight : 800;
|
||||||
color : white;
|
color : white;
|
||||||
|
div {
|
||||||
|
display: inline-block;
|
||||||
|
padding : 8px 10px;
|
||||||
|
&:not(:last-child){
|
||||||
|
border-right: 1px solid #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.ppr_msg{
|
.ppr_msg{
|
||||||
position : absolute;
|
position : absolute;
|
||||||
|
|||||||
@@ -96,11 +96,15 @@ const BrewItem = createClass({
|
|||||||
render : function(){
|
render : function(){
|
||||||
const brew = this.props.brew;
|
const brew = this.props.brew;
|
||||||
if(Array.isArray(brew.tags)) { // temporary fix until dud tags are cleaned
|
if(Array.isArray(brew.tags)) { // temporary fix until dud tags are cleaned
|
||||||
brew.tags = brew.tags?.filter(tag => tag); //remove tags that are empty strings
|
brew.tags = brew.tags?.filter((tag)=>tag); //remove tags that are empty strings
|
||||||
}
|
}
|
||||||
const dateFormatString = 'YYYY-MM-DD HH:mm:ss';
|
const dateFormatString = 'YYYY-MM-DD HH:mm:ss';
|
||||||
|
|
||||||
return <div className='brewItem'>
|
return <div className='brewItem'>
|
||||||
|
{brew.thumbnail &&
|
||||||
|
<div className='thumbnail' style={{ backgroundImage: `url(${brew.thumbnail})` }} >
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<div className='text'>
|
<div className='text'>
|
||||||
<h2>{brew.title}</h2>
|
<h2>{brew.title}</h2>
|
||||||
<p className='description'>{brew.description}</p>
|
<p className='description'>{brew.description}</p>
|
||||||
@@ -112,7 +116,7 @@ const BrewItem = createClass({
|
|||||||
<div className='brewTags' title={`Tags:\n${brew.tags.join('\n')}`}>
|
<div className='brewTags' title={`Tags:\n${brew.tags.join('\n')}`}>
|
||||||
<i className='fas fa-tags'/>
|
<i className='fas fa-tags'/>
|
||||||
{brew.tags.map((tag, idx)=>{
|
{brew.tags.map((tag, idx)=>{
|
||||||
let matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
|
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
|
||||||
return <span className={matches[1]}>{matches[2]}</span>;
|
return <span className={matches[1]}>{matches[2]}</span>;
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
min-height : 105px;
|
min-height : 105px;
|
||||||
margin-right : 15px;
|
margin-right : 15px;
|
||||||
margin-bottom : 15px;
|
margin-bottom : 15px;
|
||||||
padding : 5px 15px 2px 8px;
|
padding : 5px 15px 2px 6px;
|
||||||
padding-right : 15px;
|
padding-right : 15px;
|
||||||
border : 1px solid #c9ad6a;
|
border : 1px solid #c9ad6a;
|
||||||
border-radius : 5px;
|
border-radius : 5px;
|
||||||
@@ -19,6 +19,20 @@
|
|||||||
break-inside : avoid;
|
break-inside : avoid;
|
||||||
box-shadow : 0px 4px 5px 0px #333;
|
box-shadow : 0px 4px 5px 0px #333;
|
||||||
background-color : #cab2802e;
|
background-color : #cab2802e;
|
||||||
|
.thumbnail {
|
||||||
|
position: absolute;
|
||||||
|
width: 150px;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: -1;
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right top;
|
||||||
|
mask-image: linear-gradient(80deg, #0000 20%, #050 40%);
|
||||||
|
-webkit-mask-image: linear-gradient(80deg, #0000 20%, #050 40%);
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
.text {
|
.text {
|
||||||
min-height : 54px;
|
min-height : 54px;
|
||||||
h4{
|
h4{
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ app.get('/user/:username', async (req, res, next)=>{
|
|||||||
'createdAt',
|
'createdAt',
|
||||||
'updatedAt',
|
'updatedAt',
|
||||||
'lastViewed',
|
'lastViewed',
|
||||||
|
'thumbnail',
|
||||||
'tags'
|
'tags'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user