Skip to content

Commit e1ee7eb

Browse files
committed
add manual test file
1 parent 489ebe2 commit e1ee7eb

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

test/manual.html

+44
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,56 @@
55
<meta charset="UTF-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
9+
<style>
10+
body {
11+
margin: 0;
12+
}
13+
14+
.box {
15+
width: 200px;
16+
background-color: black;
17+
}
18+
19+
.container {
20+
width: 800px;
21+
margin-right: auto;
22+
margin-left: auto;
23+
}
24+
</style>
825
</head>
926
<body>
27+
<div class="container"></div>
28+
1029
<script src="../dist/bricks.js"></script>
1130
<script>
1231
console.log('Module assigned to window.Bricks. Logged below:')
1332
console.log(Bricks)
1433
</script>
34+
<script>
35+
const container = document.querySelector('.container')
36+
37+
// insert 100 divs with same width, but random height
38+
for (var i = 0; i < 100; i++) {
39+
const div = document.createElement('div')
40+
div.classList.add('box')
41+
div.style.width = '200px'
42+
div.style.height = Math.floor(Math.random() * 500) + 'px'
43+
container.appendChild(div)
44+
}
45+
46+
const instance = Bricks({
47+
container: '.container',
48+
packed: 'data-packed',
49+
position: true,
50+
sizes: [
51+
{ columns: 2, gutter: 10 },
52+
{ mq: '768px', columns: 3, gutter: 25 },
53+
{ mq: '1024px', columns: 4, gutter: 50 }
54+
]
55+
})
56+
.resize(true)
57+
.pack()
58+
</script>
1559
</body>
1660
</html>

0 commit comments

Comments
 (0)