0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-03 08:22:42 +00:00

Add 8 corner images.

Doesn't work well with --rotation but you can just set top,left or whatever. --offset works.
This commit is contained in:
Trevor Buckner
2022-09-27 23:55:24 -04:00
parent b8d7d1a8e4
commit 89c091c630
21 changed files with 65 additions and 11 deletions

View File

@@ -96,7 +96,7 @@ const BrewItem = createClass({
render : function(){
const brew = this.props.brew;
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';
@@ -112,7 +112,7 @@ const BrewItem = createClass({
<div className='brewTags' title={`Tags:\n${brew.tags.join('\n')}`}>
<i className='fas fa-tags'/>
{brew.tags.map((tag, idx)=>{
let matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
return <span className={matches[1]}>{matches[2]}</span>;
})}
</div>