-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
162 lines (140 loc) · 5.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="nl" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated filter</title>
<link rel="stylesheet" href="dist/css/animated-filter.css">
<style>
body {
margin: 0;
padding: 40px;
background: #eee;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 18px;
line-height: 24px;
color: #222;
}
h1 {
font-size: 32px;
line-height: 40px;
font-weight: 400;
}
* {
box-sizing: border-box;
}
[data-filter-list] {
margin-bottom: 24px;
}
[data-filter-list] li + li {
margin-left: 16px;
}
[data-filter] {
color: #34495e;
background: white;
padding: 12px;
}
[data-filter]:hover {
text-decoration: none;
}
[data-filter].is-active {
background: #2980b9;
color: white;
}
[data-filter-types] {
border: 4px solid #bdc3c7;
background: white;
padding: 6px;
margin-bottom: 24px;
}
[data-filter-type] {
background: #eee;
margin: 6px;
padding: 12px;
width: calc(100% - 12px);
color: white;
}
@media screen and (min-width:560px) {
[data-filter-type] {
width: calc(50% - 12px);
margin: 6px;
float: left;
}
}
@media screen and (min-width:768px) {
[data-filter-type] {
width: calc(33.333333333% - 12px);
}
}
[data-filter-type="1"] {
background: #c0392b;
}
[data-filter-type="2"] {
background: #27ae60;
}
[data-filter-type="3"] {
background: #2980b9;
}
[data-filter-type="none"] {
background: #333333;
}
</style>
</head>
<body>
<ul data-filter-list data-filter-for="items1">
<li><a data-filter="all" href="#" class="is-active">All</a></li>
<li><a data-filter="1" href="#">1</a></li>
<li><a data-filter="2" href="#">2</a></li>
<li><a data-filter="3" href="#">3</a></li>
<li><a data-filter="4" href="#">4</a></li>
</ul>
<div class="items" data-filter-types id="items1">
<div class="item" data-filter-type="1">1 and 2 and 3</div>
<div class="item" data-filter-type="3">Item type 3 a</div>
<div class="item" data-filter-type="1">Item type 1 b</div>
<div class="item" data-filter-type="2">Item type 2 a</div>
<div class="item" data-filter-type="2">Item type 2 b</div>
<div class="item" data-filter-type="3">Item type 3 b</div>
<div class="item" data-filter-type="1">Item type 1 c</div>
<div class="item" data-filter-type="1">Item type 1 d</div>
<div class="item" data-filter-type="1">Item type 3 e</div>
<div class="item" data-filter-type="2">Item type 2 c</div>
<div class="item" data-filter-type="1">Item type 1 f</div>
<div class="item" data-filter-type="2">Item type 2 d</div>
<div class="item" data-filter-type="1">Item type 3 g</div>
<div class="item" data-filter-type="3">Item type 3 c</div>
<div class="item" data-filter-type="2">Item type 2 e</div>
<div class="item is-hiding is-hidden" data-filter-type="none">No items found</div>
</div>
<ul data-filter-list data-filter-for="items2">
<li><a data-filter="all" href="#" class="is-active">All</a></li>
<li><a data-filter="1" href="#">1</a></li>
<li><a data-filter="2" href="#">2</a></li>
<li><a data-filter="3" href="#">3</a></li>
</ul>
<div class="items" data-filter-types id="items2">
<div class="item" data-filter-type="1">1 and 2 and 3</div>
<div class="item" data-filter-type="3">Item type 3 a</div>
<div class="item" data-filter-type="1">Item type 1 b</div>
<div class="item" data-filter-type="2">Item type 2 a</div>
<div class="item" data-filter-type="2">Item type 2 b</div>
<div class="item" data-filter-type="3">Item type 3 b</div>
<div class="item" data-filter-type="1">Item type 1 c</div>
<div class="item" data-filter-type="1">Item type 1 d</div>
<div class="item" data-filter-type="1">Item type 3 e</div>
<div class="item" data-filter-type="2">Item type 2 c</div>
<div class="item" data-filter-type="1">Item type 1 f</div>
<div class="item" data-filter-type="2">Item type 2 d</div>
<div class="item" data-filter-type="1">Item type 3 g</div>
<div class="item" data-filter-type="3">Item type 3 c</div>
<div class="item" data-filter-type="2">Item type 2 e</div>
</div>
<!-- loading menu animation -->
<script src="src/js/animated-filter.js"></script>
<!-- initializing the menu -->
<script type="text/javascript">
var filter = new animatedFilter();
</script>
</body>
</html>