Compare commits
2 Commits
cd06005a1c
...
5665bdeaa9
| Author | SHA1 | Date | |
|---|---|---|---|
| 5665bdeaa9 | |||
| 712c5c095c |
@@ -33,6 +33,11 @@
|
||||
margin: 12px;
|
||||
}
|
||||
|
||||
#strain-list .cards .card .tag-list--title {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 769px) {
|
||||
#strain-list .cards .card {
|
||||
width: 45%;
|
||||
@@ -45,6 +50,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 860px) {
|
||||
#strain-list .cards .card .tag-list--title {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
}
|
||||
|
||||
#search-form .filters .select {
|
||||
display: block;
|
||||
}
|
||||
@@ -345,6 +356,7 @@
|
||||
.filter(Boolean)
|
||||
.sort((a, b) => {
|
||||
if (a.score === b.score) {
|
||||
// sort matching search score by adjusted rating
|
||||
if (a.rating_adjusted === b.rating_adjusted) return 0;
|
||||
return a.rating_adjusted > b.rating_adjusted ? -1 : 1;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,8 @@ async function build() {
|
||||
|
||||
// calculate adjusted ratings
|
||||
const totalMean =
|
||||
data.strains.reduce((acc, strain) => {
|
||||
return acc + strain.rating + strain.rating_count;
|
||||
}, 0) / data.strains.length;
|
||||
data.strains.reduce((acc, strain) => acc + strain.rating + strain.rating_count, 0) /
|
||||
data.strains.length;
|
||||
|
||||
data.strains = data.strains.map(strain => {
|
||||
const minRatings = 10;
|
||||
|
||||
Reference in New Issue
Block a user