This repository has been archived by the owner on Aug 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
192 lines (179 loc) · 7.71 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><juicy-tile-table></title>
<!-- Importing Web Component's Polyfill -->
<script src="../webcomponentsjs/webcomponents.js"></script>
<!-- Importing Custom Elements -->
<link rel="import" href="juicy-tile-table.html">
<!-- Importing Polymer for demos -->
<link rel="import" href="../polymer/polymer.html" />
<link rel="stylesheet" href="http://juicy.github.io/juicy-tile-list/examples/github-markdown.css">
<link rel="stylesheet" href="examples/examples.css">
<!-- Use JSONEditor to edit tiles setup -->
<!-- <link rel="import" href="../juicy-jsoneditor/src/juicy-jsoneditor.html"> -->
<!-- josdejong/jsoneditor#104 workaround-->
<link rel="stylesheet" type="text/css" href="../jsoneditor/dist/jsoneditor.min.css">
<style>
juicy-jsoneditor {
height: 15em;
}
</style>
</head>
<body>
<a href="https://github.com/Juicy/juicy-tile-table">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub">
</a>
<article class="markdown-body">
<h1><juicy-tile-table></h1>
<blockquote>
<p>
Masonry-like Custom Element with <code><table></code> renderer that mimics CSS Grid Layout of [`juicy-tile-grid`](Juicy/juicy-tile-grid).
</p>
</blockquote>
<template is="dom-bind">
<juicy-tile-table refreshonresize
setup='{
"gutter":8,
"items":[{
"id":0,
"priority":0.9,
"height":50,
"width":50
},{
"id":1,
"priority":0.8,
"height":100,
"width":50,
"hidden":false
},{
"id":2,
"priority":0.7,
"height":180,
"width":200,
"heightDynamic":true
},{
"id":3,
"priority":0.6,
"height":180,
"width":150,
"heightAdaptive":true
},{
"id":4,
"priority":0.5,
"height":50,
"width":200
},{
"id":5,
"priority":0.4,
"height":100,
"width":50
},{
"id":6,
"priority":0.3,
"height":230,
"width":100
},{
"id":7,
"priority":0.2,
"height":50,
"width":50
},{
"id":8,
"priority":0.1,
"height":50,
"width":50
},{
"id":9,
"priority":0.09,
"height":150,
"width":50
},{
"id":10,
"priority":0.08,
"height":50,
"width":100
},{
"id":11,
"priority":0.07,
"height":50,
"width":200
}]}'>
<div>0</div>
<div>
<button>1</button>
</div>
<div>
<h4>2</h4>
<p>
<code>heightDynamic: true</code>Dynamically change height after tile was packed.
<button onclick="addMore( this )">Add more content</button>
<span id="ieHierarchyRequestErrorWorkaround"></span>
</p>
</div>
<section>
<h4>3</h4>
<p>
<code>heightAdaptive: true</code> - adapt to siblings dynamic height change</p>
</section>
<div>
<textarea>4</textarea>
</div>
<div>5</div>
<div>
<h4>6</h4>
</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
</juicy-tile-table>
<!-- <juicy-jsoneditor json="{{setup}}" name="juicy-tile-table.setup" modes="['text','tree','form']"></juicy-jsoneditor> -->
<button onclick="javascript: document.querySelector('juicy-tile-table').refresh();">Refresh grid</button>
<script type="text/javascript">
var setup = document.querySelector('juicy-tile-table').setup;
console.log('for this demo purposes juicy-tile-table setup is exposed under `setup` variable', setup);
function addMore(element){
var p = document.createElement('p');
p.innerText = 'more content';
element.parentElement.appendChild(p);
}
</script>
<section>
<h3>Features</h3>
<ul>
<li>masonry-like, gap-less layout (bin-packing), </li>
<li>prioritizing items, </li>
<li>grouping into virtual, nested containers,</li>
<li>alignment in different orientations/directions,</li>
<li>dynamically changing size,</li>
<li>auto adjusting container sizes,</li>
<li>gutter/cell-spacing between tiles,</li>
<li>adapting to window size changes,</li>
<li>widely supported table layout, that mimics CSS Grid,</li>
<li>adapting to dynamic changes of tile's content, without need to repack.</li>
</ul>
</section>
<footer>
<h4>Other examples</h4>
<ul>
<li><a href="examples/prioritized.html">Prioritized/weighted tiles</a></li>
<li><a href="examples/verticalLayers.html">Vertical layers</a></li>
<li><a href="examples/fullWidth.html">Full width package</a></li>
<li><a href="examples/relativeSize.html">Relative dimensions</a></li>
<li><a href="examples/defaultTileSetup.html">Default tile setup</a></li>
<li><a href="examples/nested.html">Nested packages</a></li>
<li><a href="examples/recursiveGroups.html">Virtual nested groups</a></li>
<li><a href="examples/recursiveGroupsHeightAuto.html">Virtual groups with automatically adjusted height</a></li>
<li><a href="examples/oversize.html">Oversize background of virtual container</a></li>
<li><a href="examples/innerHTML.html">HTML/CSS content for virtual group</a></li>
<li><a href="examples/fullFill.html">Item that fills full width and height of a grid</a></li>
<li><a href="http://juicy.github.io/juicy-tile-list/">Default absolute position layout <code><juicy-tile-list></code></a></li>
<li><a href="http://juicy.github.io/juicy-tile-editor/examples/juicy-tiles-grid-editor.html">Editing the grid with <code><juicy-tile-editor></code></a></li>
</ul>
</footer>
</article>
</body>
</html>