improve filters
This commit is contained in:
@@ -2,7 +2,6 @@ $(function(){
|
||||
var toe = new Vue({
|
||||
el: '#toe',
|
||||
data: {
|
||||
only_selected: true,
|
||||
filters: 'any',
|
||||
titans: [
|
||||
'4000', '4001', '4002', '4003',
|
||||
@@ -37,7 +36,7 @@ var toe = new Vue({
|
||||
var t = this;
|
||||
var aFilteredMatches = t.matches.filter(function (match) {
|
||||
return (
|
||||
t.only_selected === false &&
|
||||
!t.selectedTitans.length &&
|
||||
(
|
||||
(t.filters == 'any' && match.enemypower < 1000000) ||
|
||||
(t.filters == 'only_lords' && match.enemypower > 1000000) ||
|
||||
@@ -47,7 +46,7 @@ var toe = new Vue({
|
||||
|
||||
||
|
||||
|
||||
t.only_selected === true && t.getSelectedTitans() == t.getEnemyTeam(match.defBattle.attackers) &&
|
||||
t.selectedTitans.length && t.getSelectedTitans() == t.getEnemyTeam(match.defBattle.attackers) &&
|
||||
(
|
||||
(t.filters == 'any' && match.enemypower < 1000000) ||
|
||||
((t.filters == 'only_lords') && (match.enemypower > 1000000)) ||
|
||||
|
||||
@@ -8,12 +8,43 @@
|
||||
}
|
||||
|
||||
.toe {
|
||||
&__filters {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .2px;
|
||||
display: block;
|
||||
padding: 3px 12px;
|
||||
line-height: 20px;
|
||||
margin: 0 5px;
|
||||
box-shadow: 0 0 0 1px #eee;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 0 0 1px #333;
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
display: none;
|
||||
|
||||
&:checked + span {
|
||||
box-shadow: 0 0 0 2px #3a86ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.titans {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
width: 200px;
|
||||
margin: 0 auto 60px;
|
||||
margin: 20px auto 60px;
|
||||
|
||||
li {
|
||||
flex: 0 0 25%;
|
||||
|
||||
Reference in New Issue
Block a user