9
9
content ="gridstack, typescript, jquery, grid, layout, drag-n-drop, widgets, js, javascript, gridstack.js, dashboard " />
10
10
< title > gridstack.js | Build interactive dashboards in minutes.</ title >
11
11
12
- <!-- Bootstrap core CSS -->
13
- < link href ="https://bootswatch.com/4/yeti/bootstrap.min.css " rel ="stylesheet " />
14
- < link href ="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.16.2/build/styles/default.min.css " rel ="stylesheet "/>
12
+ <!-- ES5 support for IE -->
13
+ < script src ="../dist/es5/gridstack-poly.js "> </ script >
14
+ < script src ="../dist/es5/gridstack-jq.js "> </ script >
15
+
15
16
< script src ="https://getbootstrap.com/docs/4.3/dist/js/bootstrap.bundle.min.js " integrity ="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o " crossorigin ="anonymous "> </ script >
16
17
< script src ="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.16.2/build/highlight.min.js "> </ script >
17
-
18
- < link href ="../dist/gridstack.min.css " rel ="stylesheet " />
19
- < script src ="../dist/gridstack-h5.js "> </ script >
20
- <!-- <script src="https://cdn.jsdelivr.net/npm/gridstack@4.2.1/dist/gridstack-h5.js"></script> -->
21
18
19
+ <!-- Bootstrap core CSS -->
20
+ < link href ="https://bootswatch.com/4/yeti/bootstrap.min.css " rel ="stylesheet " />
21
+ < link href ="../dist/gridstack.min.css " rel ="stylesheet " />
22
+ < link href ="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.16.2/build/styles/default.min.css " rel ="stylesheet "/>
22
23
< style type ="text/css ">
24
+ .grid-container {
25
+ padding : 15px ;
26
+ border : 1px solid white;
27
+ max-width : 1000px ;
28
+ }
29
+ .center {
30
+ margin-left : auto;
31
+ margin-right : auto;
32
+ }
23
33
.grid-stack-item {
24
34
border : 0 ;
25
35
}
@@ -168,7 +178,7 @@ <h1>Basic Demo</h1>
168
178
169
179
< div class ="row ">
170
180
< div class ="col-sm-12 " style ="padding-bottom: 25px; ">
171
- < div style =" padding: 15px; border: 1px solid white ">
181
+ < div class =" grid-container center ">
172
182
< div class ="grid-stack " id ="simple-grid "> </ div >
173
183
</ div >
174
184
</ div >
@@ -187,8 +197,8 @@ <h3>Code</h3>
187
197
< pre >
188
198
< code class ="html "> npm install gridstack</ code >
189
199
< p class ="text-white "> then in html:</ p >
190
- < code class ="html "> <script src="node_modules/gridstack /dist/gridstack-h5.js"></script>
191
- <link href="node_modules/gridstack /dist/gridstack.min.css" rel="stylesheet"/>
200
+ < code class ="html "> <script src=".. /dist/gridstack-h5.js"></script>
201
+ <link href=".. /dist/gridstack.min.css" rel="stylesheet"/>
192
202
<style type="text/css">
193
203
.grid-stack { background: #FAFAD2; }
194
204
.grid-stack-item-content { background-color: #18BC9C; }
@@ -245,7 +255,7 @@ <h1>Advanced Demo</h1>
245
255
</ div >
246
256
</ div >
247
257
< div class ="col-sm-12 col-md-10 " style ="padding-bottom: 25px; ">
248
- < div style =" padding: 15px; border: 1px solid white ">
258
+ < div class =" grid-container ">
249
259
< div class ="grid-stack " id ="advanced-grid "> </ div >
250
260
</ div >
251
261
</ div >
@@ -355,11 +365,13 @@ <h1>Used by</h1>
355
365
356
366
var simpleGrid = GridStack . init ( {
357
367
alwaysShowResizeHandle : / A n d r o i d | w e b O S | i P h o n e | i P a d | i P o d | B l a c k B e r r y | I E M o b i l e | O p e r a M i n i / i. test ( navigator . userAgent ) ,
368
+ margin : 5 ,
358
369
} , '#simple-grid' ) ;
359
370
simpleGrid . load ( simple ) ;
360
371
361
372
var advGrid = GridStack . init ( {
362
373
alwaysShowResizeHandle : / A n d r o i d | w e b O S | i P h o n e | i P a d | i P o d | B l a c k B e r r y | I E M o b i l e | O p e r a M i n i / i. test ( navigator . userAgent ) ,
374
+ margin : 5 ,
363
375
acceptWidgets : true ,
364
376
dragIn : '.newWidget' , // class that can be dragged from outside
365
377
dragInOptions : { revert : 'invalid' , scroll : false , appendTo : 'body' , helper : 'clone' } ,
0 commit comments