mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-17 20:48:45 +00:00
lint pages
This commit is contained in:
@@ -120,7 +120,7 @@ const BrewItem = ({
|
||||
const dateFormatString = 'YYYY-MM-DD HH:mm:ss';
|
||||
|
||||
return (
|
||||
<div className={`brewItem${detailsOpen ? ' detailsOpen' : ''}`} onClick={() => setDetailsOpen(!detailsOpen)} >
|
||||
<div className={`brewItem${detailsOpen ? ' detailsOpen' : ''}`} onClick={()=>setDetailsOpen(!detailsOpen)} >
|
||||
{brew.thumbnail && <div className='thumbnail' style={{ backgroundImage: `url(${brew.thumbnail})` }}></div>}
|
||||
<div className='text'>
|
||||
<h2 title={brew.title}>{brew.title}</h2>
|
||||
|
||||
@@ -188,7 +188,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
||||
if(filterTags?.length == 0) return;
|
||||
return (
|
||||
<div className='tags-container'>
|
||||
Tags:
|
||||
Tags:
|
||||
{_.map(filterTags, (tag, idx)=>{
|
||||
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
|
||||
return (
|
||||
@@ -199,7 +199,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
||||
updateUrl(filterString, sortType, sortDir, tag);
|
||||
}}>
|
||||
{matches[2]}
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
@@ -299,8 +299,8 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
||||
<div className='radio-toggle layout-container'>
|
||||
<h6>View:</h6>
|
||||
<label className='option' title='grid'>
|
||||
<input name='layout-mode' type='radio' onChange={(e)=>handleLayoutChange(e, 'grid')} checked={layoutMode === 'grid'} />
|
||||
<i className='fac compressed-grid'></i>
|
||||
<input name='layout-mode' type='radio' onChange={(e)=>handleLayoutChange(e, 'grid')} checked={layoutMode === 'grid'} />
|
||||
<i className='fac compressed-grid'></i>
|
||||
</label>
|
||||
<label className='option' title='list'>
|
||||
<input name='layout-mode' type='radio' onChange={(e)=>handleLayoutChange(e, 'list')} checked={layoutMode === 'list'} />
|
||||
@@ -321,24 +321,24 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
||||
};
|
||||
const renderThemePicker = ()=>{
|
||||
return (
|
||||
<div className="radio-toggle theme-container">
|
||||
<div className='radio-toggle theme-container'>
|
||||
<h6>Theme:</h6>
|
||||
<label className="option">
|
||||
<input type="radio" name="theme" onChange={(e)=>handleThemeChange(e, 'light')} checked={themeMode === 'light'}/>
|
||||
<i className="fas fa-sun"/>
|
||||
<label className='option'>
|
||||
<input type='radio' name='theme' onChange={(e)=>handleThemeChange(e, 'light')} checked={themeMode === 'light'}/>
|
||||
<i className='fas fa-sun'/>
|
||||
</label>
|
||||
<label className="option">
|
||||
<input type="radio" name="theme" onChange={(e)=>handleThemeChange(e, 'dark')} checked={themeMode === 'dark'}/>
|
||||
<i className="fas fa-moon"/>
|
||||
<label className='option'>
|
||||
<input type='radio' name='theme' onChange={(e)=>handleThemeChange(e, 'dark')} checked={themeMode === 'dark'}/>
|
||||
<i className='fas fa-moon'/>
|
||||
</label>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const renderNav = () =>{
|
||||
const renderNav = ()=>{
|
||||
|
||||
return (
|
||||
<div className="listPageNav">
|
||||
<div className='listPageNav'>
|
||||
{renderLayoutModeOptions()}
|
||||
{renderThemePicker()}
|
||||
{renderSortOptions()}
|
||||
@@ -346,8 +346,8 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
||||
{renderTagsOptions()}
|
||||
</div>
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return (
|
||||
<div className='sitePage listPage'>
|
||||
@@ -355,7 +355,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
||||
|
||||
{renderNav()}
|
||||
|
||||
<div className={`content V3 ${themeMode + 'Mode'}`}>
|
||||
<div className={`content V3 ${`${themeMode}Mode`}`}>
|
||||
<div className='brewCollection'>{renderBrewCollection(brewCollection)}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user