-
Notifications
You must be signed in to change notification settings - Fork 4
/
tests.html
126 lines (100 loc) · 5.29 KB
/
tests.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="BVSelect Jquery">
<meta name="author" content="Bruno Vieira">
<title>EasyGrid - VanillaJS Grid </title>
<!-- EasyGrid Plugin Style -->
<link rel="stylesheet" type="text/css" href="css/easygrid.css">
<!-- DEMO ONLY -->
<link href="demo-template/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body style="min-height:1000px;">
<div class="container">
<div class="row" style="margin-top:30px;">
<div class="col-12 col-md-12 cold-sm-12" style="text-align: center; border-bottom: 1px solid grey; margin-bottom: 12px; padding-bottom: 13px;">
<button type="button" id="all" class="btn btn-dark">All</button>
<button type="button" id="blue" class="btn btn-primary">Blue</button>
<button type="button" id="purple" class="btn btn-primary" style="background-color: #bb16bb; border-color: #d230d2;">Purple</button>
<button type="button" id="red" class="btn btn-primary" style="background-color: red; border-color: red;">Red</button>
<button type="button" id="green" class="btn btn-primary" style="background-color: #30b530; border-color: #28ce28;">Green</button>
</div>
</div>
</div>
<!-- EasyGrid Main Div -->
<div id="grid" class="easygrid_bvgrid" style="width:100%; margin-top:5px;">
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_blue egfilter_red egfilter_purple"><img style="width:100%;" src="demo-template/images/blue_purple_red.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_blue egfilter_red"><img style="width:100%;" src="demo-template/images/red_blue.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_blue"><img style="width:100%;" src="demo-template/images/blue.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_green egfilter_blue"><img style="width:100%;" src="demo-template/images/green_blue.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_green egfilter_blue"><img style="width:100%;" src="demo-template/images/green_blue.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_green"><img style="width:100%;" src="demo-template/images/green.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_purple"><img style="width:100%;" src="demo-template/images/purple.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_red"><img style="width:100%;" src="demo-template/images/red.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_red"><img style="width:100%;" src="demo-template/images/red.png"></div>
<!-- This item will be fetched to EasyGrid and then removed -->
<div class="easygrid_fetch egfilter_red"><img style="width:100%;" src="demo-template/images/red.png"></div>
</div>
<button style="margin-bottom:10px; z-index:9999; position:relative;" id="randomtiles" class="btn btn-dark">Random Height</button>
<script src="js/easygrid.js"></script>
<script>
/* RANDOM TILES */
var demo1;
document.addEventListener("DOMContentLoaded", function() {
demo_filtering = new EasyGrid({
selector: "#grid",
dimensions: {
width: "200",
height: "auto",
margin: "5",
minHeight: "20", // if height is "random"
maxHeight: "40" // if height is "random"
},
config: {
fetchFromHTML: true,
filter: true
},
animations: {
fadeInSpeed: "100",
addItemSpeed: "100"
},
style: {
background: "transparent",
borderRadius: "10"
}
});
});
/* all */
document.getElementById("all").addEventListener("click", function() {
demo_filtering.Filter("all");
});
/* BLUE */
document.getElementById("blue").addEventListener("click", function() {
demo_filtering.Filter("egfilter_blue");
});
/* PURPLE */
document.getElementById("purple").addEventListener("click", function() {
demo_filtering.Filter("egfilter_purple");
});
/* RED */
document.getElementById("red").addEventListener("click", function() {
demo_filtering.Filter("egfilter_red");
});
/* GREEEN */
document.getElementById("green").addEventListener("click", function() {
demo_filtering.Filter("egfilter_green");
});
</script>
</body>
</html>