-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
130 lines (130 loc) · 3.82 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
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Responsive Table</title>
<meta name="description" content="" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#222222" />
<link rel="manifest" href="site.webmanifest" />
<link rel="icon" sizes="192x192" href="icon.png" />
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/prism.css" />
<link
href="https://fonts.googleapis.com/css?family=Montserrat:400,900|Raleway:400,700|Source+Code+Pro"
rel="stylesheet"
/>
</head>
<body>
<header>
<h1>
<a href="https://svinkle.github.io/responsive-table/">
<span role="img" aria-hidden="true">🍱</span>
Responsive Table
</a>
</h1>
</header>
<main class="main" id="main" role="main">
<p>
<b>Responsive Table</b>
is a tasty JavaScript library which helps format data tables on small
screens! It does so by reordering items in the DOM while keeping HTML
markup valid and assistive technology friendly!
</p>
<h2>Flavours</h2>
<ul>
<li>
<a href="list.html">
<span role="img" aria-hidden="true">🔗</span>
List
</a>
– Generates a link list above the table using the row headers as the
link text. Only the associated table row is visible while the others
remain hidden!
</li>
<li>
<a href="stack.html">
<span role="img" aria-hidden="true">🥞</span>
Stack
</a>
– Displays each row of content atop one another, like a stack of
pankaces!
</li>
<li>
<a href="window.html">
<span role="img" aria-hidden="true">🏠</span>
Window
</a>
– The table remains as-is with a horizontal scroll available. A link
to open the table in a new, full-width window appears at the desired
breakpoint.
</li>
</ul>
<h2>Usage</h2>
<ol>
<li>
Include
<code>responsive-table.js</code>
at the bottom of your page
</li>
<li>
Create a new
<code>dataTable</code>
variable and assign it a
<code>new ResponsiveTable()</code>
instance
</li>
<li>
Pass
<code>ResponsiveTable()</code>
three paramaters:
<ul>
<li>
The unique
<code>IDREF</code>
of the table
</li>
<li>
The type of table:
<code>list</code>
,
<code>stack</code>
, or
<code>window</code>
</li>
<li>The CSS breakpoint at which the table mutation should occur</li>
</ul>
</li>
</ol>
<pre class="language-markup">
<code class="language-markup"><script src="js/responsive-table.js"></script>
<script>
var dataTable = new ResponsiveTable('#data-table', 'list', '50em');
</script></code>
</pre>
</main>
<footer>
<h2>Links</h2>
<ul>
<li>
<a href="https://twitter.com/svinkle">
Made with
<span role="img" aria-label="love">♥</span>
by @svinkle
</a>
</li>
<li>
<a href="https://github.com/svinkle/responsive-table">
Source on GitHub
</a>
</li>
</ul>
</footer>
<script src="js/prism.js"></script>
</body>
</html>