-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
371 lines (355 loc) · 11.7 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>TEF components demo</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../theme_telefonica/css/components.telefonica.css">
<style>
h1 {
margin-top: 0;
background: none !important;
text-align: left !important;
}
header > div { padding-top: 2px; }
code {
display: block;
overflow: hidden;
}
style {
display: block;
white-space: pre;
color: #0086B3;
border: 1px solid #cfcece;
background: #f2f2f2;
margin: 20px 0;
line-height: 25px;
overflow-y: auto;
border-radius: 4px;
}
[data-columns] > * span {
display: block;
background: rgba(0,0,0,.1);
text-align: center;
padding: 20px 0;
margin: 8px 1px;
}
[data-columns].double > * span {
padding: 57px;
}
/*
ul + h2 {
margin-top: 50px;
}
*/
</style>
</head>
<body>
<div class="tc-content">
<header>
<h1>Responsive grid system</h1>
</header>
<h2>6 columns (list)</h2>
<p>Grid is limited to 6 columns. More columns could be achieved using nesting.</p>
<ul data-columns="6">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li><li><span>5</span></li><li><span>6</span></li>
</ul>
<code>
<style>
<ul data-columns="6">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
</ul>
</style>
</code>
<h2>6 columns (div)</h2>
<div data-columns="6">
<div><span>1</span></div><div><span>2</span></div><div><span>3</span></div><div><span>4</span></div><div><span>5</span></div><div><span>6</span></div>
</div>
<code>
<style>
<div data-columns="6">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
</div>
</style>
</code>
<h2>6 columns with gutter</h2>
<ul data-columns="6" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li><li><span>5</span></li><li><span>6</span></li>
</ul>
<code>
<style>
<ul data-columns="6" class="tc-gutter">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
</ul>
</style>
</code>
<h2>6 to 1</h2>
<ul data-columns="6">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li><li><span>5</span></li><li><span>6</span></li>
</ul>
<ul data-columns="5">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li><li><span>5</span></li>
</ul>
<ul data-columns="4">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li>
</ul>
<ul data-columns="3">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li>
</ul>
<ul data-columns="2">
<li><span>1</span></li><li><span>2</span></li>
</ul>
<ul data-columns="1">
<li><span>1</span></li>
</ul>
<h2>6 to 1 with gutter</h2>
<ul data-columns="6" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li><li><span>5</span></li><li><span>6</span></li>
</ul>
<ul data-columns="5" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li><li><span>5</span></li>
</ul>
<ul data-columns="4" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li>
</ul>
<ul data-columns="3" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li>
</ul>
<ul data-columns="2" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li>
</ul>
<ul data-columns="1" class="tc-gutter">
<li><span>1</span></li>
</ul>
<h2>6 columns responsive</h2>
<p>Example:</p>
<ul>
<li>Desktop (default):<strong> 6 columns</strong></li>
<li>Tablet landscape (md):<strong> 4 columns</strong></li>
<li>Tablet portrait / Mobile landscape (sm):<strong> 2 columns</strong></li>
<li>Mobile portrait (xs):<strong> 1 column</strong></li>
</ul>
<p><strong>Note:</strong> Setting data-columns to 0, md0, sm0 or xs0 will hide the column for that breakpoint.</p>
<ul data-columns="6 md4 sm2 xs1" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li><li><span>4</span></li><li><span>5</span></li><li><span>6</span></li><li><span>7</span></li><li><span>8</span></li><li><span>9</span></li><li><span>10</span></li><li><span>11</span></li><li><span>12</span></li>
</ul>
<code>
<style>
<ul data-columns="6 md4 sm2 xs1" class="tc-gutter">
<li>1</li>
<li>2</li>
...
<li>11</li>
<li>12</li>
</ul>
</style>
</code>
<h2>column span <small>(how many data-columns an element should span across)</small></h2>
<p><strong>Example 1:</strong> 6 colums, 1 for each side panel and 4 for content.</p>
<ul data-columns="6" class="tc-gutter">
<li data-column-span="1"><span>1 column</span></li>
<li data-column-span="4"><span>4 columns</span></li>
<li data-column-span="1"><span>1 column</span></li>
</ul>
<code>
<style>
<ul data-columns="6">
<li data-column-span="1">1 column</li>
<li data-column-span="4">4 columns</li>
<li data-column-span="1">1 column</li>
</ul>
</style>
</code>
<p><strong>Example 2:</strong> 3 colums for content and a side menu of 2 columns</p>
<ul data-columns="5" class="tc-gutter">
<li><span>1</span></li>
<li><span>2</span></li>
<li><span>3</span></li>
<li data-column-span="2"><span>Menu</span></li>
</ul>
<code>
<style>
<ul data-columns="5" class="tc-gutter">
<li>1</li>
<li>2</li>
<li>3</li>
<li data-column-span="2">Menu</li>
</ul>
</style>
</code>
<h2>Nested grids</h2>
<p>Nested grids will be useful in case you need to split content inside a data-column.</p>
<div data-columns="5" class="tc-gutter">
<section data-column-span="3">
<ul data-columns="3" class="tc-gutter double">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li>
</ul>
</section>
<nav data-column-span="2">
<header><span>Menu header</span></header>
<ul data-columns="2" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li>
</ul>
</nav>
</div>
<code>
<style>
<div data-columns="5" class="tc-gutter">
<section data-column-span="3">
<ul data-columns="3" class="tc-gutter">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</section>
<nav data-column-span="2">
<header>Menu header</header>
<ul data-columns="2" class="tc-gutter">
<li>1</li>
<li>2</li>
</ul>
</nav>
</div>
</style>
</code>
<h2>Nested responsive grids</h2>
<p>Same code as before, this time responsive:</p>
<ul>
<li>
Desktop (default): <strong>5 columns</strong>
<ul>
<li>Content: <strong>3 columns</strong></li>
<li>Menu: <strong>2 columns</strong> (content: 2 columns)</li>
</ul>
</li>
<li>
Tablet landscape (md):
<ul>
<li>Menu: <strong>2 columns</strong> (content: 1 column)</li>
</ul>
</li>
<li>
Tablet portrait / Mobile landscape (sm): <strong>2 columns</strong>
<ul>
<li>Content: <strong>1 column</strong></li>
<li>Menu: <strong>1 columns</strong></li>
</ul>
</li>
<li>
Mobile portrait (xs): <strong>1 column</strong>
<ul>
<li>Content: <strong>1 column</strong></li>
<li>Menu: <strong>Removed</strong></li>
</ul>
</ul>
<div data-columns="5 sm2 xs1" class="tc-gutter">
<section data-column-span="3 sm1 xs1">
<ul data-columns="3 sm1" class="tc-gutter double">
<li><span>1</span></li><li><span>2</span></li><li><span>3</span></li>
</ul>
</section>
<nav data-column-span="2 sm1 xs0">
<header><span>Menu header</span></header>
<ul data-columns="2 md1" class="tc-gutter">
<li><span>1</span></li><li><span>2</span></li>
</ul>
</nav>
</div>
<code>
<style>
<div data-columns="5 sm2 xs1" class="tc-gutter">
<section data-column-span="3 sm1 xs1">
<ul data-columns="3 sm1" class="tc-gutter">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</section>
<nav data-column-span="2 sm1 xs0">
<header>Menu header</header>
<ul data-columns="2 md1" class="tc-gutter">
<li>1</li>
<li>2</li>
</ul>
</nav>
</div>
</style>
</code>
<h2>column offset <small>(move columns to the right)</small></h2>
<ul data-columns="4">
<li><span>No offset</span></li>
<li data-column-offset="1"><span>1 column offset</span></li>
<li><span>No offset</span></li>
</ul>
<ul data-columns="4">
<li data-column-offset="1"><span>1 column offset</span></li>
<li data-column-offset="1"><span>1 column offset</span></li>
</ul>
<ul data-columns="4">
<li data-column-offset="2"><span>2 data-columns offset</span></li>
<li><span>No offset</span></li>
</ul>
<ul data-columns="4">
<li data-column-offset="3"><span>3 data-columns offset</span></li>
</ul>
<code>
<style>
<ul data-columns="4">
<li>No offset</li>
<li data-column-offset="1">1 column offset</li>
<li>No offset</li>
</ul>
<ul data-columns="4">
<li data-column-offset="1">1 column offset</li>
<li data-column-offset="1">1 column offset</li>
</ul>
<ul data-columns="4">
<li data-column-offset="2">2 data-columna offset</li>
<li>No offset</li>
</ul>
<ul data-columns="4">
<li data-column-offset="3">3 data-columns offset</li>
</ul>
</style>
</code>
<p><strong>Example:</strong> Centered content effect uisng column offset.</p>
<ul data-columns="4">
<li data-column-offset="1" data-column-span="2"><span>1 column offset</span></li>
</ul>
<code>
<style>
<ul data-columns="4">
<li data-column-offset="1" data-column-span="2">1 column offset</li>
</ul>
</style>
</code>
<h2>Responsive column offset</h2>
<ul data-columns="6 md4 sm3 xs1">
<li data-column-offset="1 md2 sm1 xs0"><span>Responsive offset</span></li>
</ul>
<code>
<style>
<ul data-columns="6 md4 sm3 xs1">
<li data-column-offset="1 md2 sm1 xs0">Responsive offset</li>
</ul>
</style>
</code>
</div>
</body>
</html>