comparison default/node_modules/tablesaw/demo/stack-blocks.html @ 0:1d038bc9b3d2 default tip

Up:default
author Liny <dev@neowd.com>
date Sat, 31 May 2025 09:21:51 +0800
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1d038bc9b3d2
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <title>TableSaw Stack Table</title>
8
9 <link rel="stylesheet" href="../dist/tablesaw.css">
10 <link rel="stylesheet" href="demo.css">
11 <link rel="stylesheet" href="//filamentgroup.github.io/demo-head/demohead.css">
12 <style>
13 .democolwidth {
14 width: 200px;
15 }
16 </style>
17
18 <!-- <script src="../dist/dependencies/jquery.js"></script>
19 <script src="../dist/tablesaw.jquery.js"></script> -->
20 <script src="../dist/tablesaw.js"></script>
21 <script src="../dist/tablesaw-init.js"></script>
22 <script src="//filamentgroup.github.io/demo-head/loadfont.js"></script>
23 <script>
24
25 $(window).on( "load", function() {
26 $( "canvas" ).each(function() {
27 var canvas = this;
28 // demo from https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_usage
29 if( canvas.getContext ) {
30 var ctx = canvas.getContext( "2d" );
31 ctx.fillStyle = 'rgba(0,0,0,.4)';
32 ctx.fillRect(0, 0, 200, 20);
33 }
34 });
35 });
36 </script>
37 </head>
38 <body>
39 <div class="demo-header">
40 <div class="company">
41 <img src="http://filamentgroup.com/images/fg-logo-positive-sm-crop.png">
42 </div>
43 <div class="details">
44 <h1 class="description-container">Demo of <span class="repo-name">Tablesaw</span>
45 <span class="description">A group of plugins for responsive tables.</span>
46 </h1>
47 <ul class="outbound-links">
48 <li><a href="https://github.com/filamentgroup/tablesaw">Code</a></li>
49 <li><a href="https://github.com/filamentgroup/tablesaw/issues">Issues</a></li>
50 </ul>
51 </div>
52 </div>
53 <div class="nav-container">
54 <div class="docs-globalnav">
55 <nav class="docs-nav">
56 <a href="kitchensink.html">Kitchen Sink</a>
57 <a href="modeswitch.html">Mode Switch</a>
58 <a href="sort.html">Sortable</a>
59 <a href="stack.html" class="current">Stack</a>
60 <a href="stackonly.html">Stack Only</a>
61 <a href="swipe.html">Swipe Table</a>
62 <a href="toggle.html">Toggle</a>
63 <a href="checkall.html">Check All</a>
64 </nav>
65 </div>
66 </div>
67 <div class="docs-main">
68 <h2>Stack Table</h2>
69 <p>The Stack Table stacks the table headers to a two column layout with headers on the left. Resize your viewport to across the 40em (640px) breakpoint to see the change.</p>
70 <table class="tablesaw" data-tablesaw-mode="stack">
71 <thead>
72 <tr>
73 <th scope="col" data-tablesaw-priority="persist">Movie Title</th>
74 <th scope="col" data-tablesaw-sortable-default-col data-tablesaw-priority="3">Rank</th>
75 <th scope="col" data-tablesaw-priority="2" class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: red"><canvas width="200" height="20"></canvas></div></th>
76 <th scope="col" data-tablesaw-priority="1"><abbr title="Rotten Tomato Rating">Rating</abbr></th>
77 <th scope="col" data-tablesaw-priority="4">Gross</th>
78 </tr>
79 </thead>
80 <tbody>
81 <tr>
82 <td class="title"><a href="http://en.wikipedia.org/wiki/Avatar_(2009_film)">Avatar</a></td>
83 <td>1</td>
84 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
85 <td>83%</td>
86 <td>$2.7B</td>
87 </tr>
88 <tr>
89 <td class="title"><a href="http://en.wikipedia.org/wiki/Titanic_(1997_film)">Titanic</a></td>
90 <td>2</td>
91 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
92 <td>88%</td>
93 <td>$2.1B</td>
94 </tr>
95 <tr>
96 <td class="title"><a href="http://en.wikipedia.org/wiki/The_Avengers_(2012_film)">The Avengers</a></td>
97 <td>3</td>
98 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
99 <td>92%</td>
100 <td>$1.5B</td>
101 </tr>
102 <tr>
103 <td class="title"><a href="http://en.wikipedia.org/wiki/Harry_Potter_and_the_Deathly_Hallows_%E2%80%93_Part_2">Harry Potter and the Deathly Hallows—Part 2</a></td>
104 <td>4</td>
105 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
106 <td>96%</td>
107 <td>$1.3B</td>
108 </tr>
109 <tr>
110 <td class="title"><a href="http://en.wikipedia.org/wiki/Frozen_(2013_film)">Frozen</a></td>
111 <td>5</td>
112 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
113 <td>89%</td>
114 <td>$1.2B</td>
115 </tr>
116 <tr>
117 <td class="title"><a href="http://en.wikipedia.org/wiki/Iron_Man_3">Iron Man 3</a></td>
118 <td>6</td>
119 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
120 <td>78%</td>
121 <td>$1.2B</td>
122 </tr>
123 <tr>
124 <td class="title"><a href="http://en.wikipedia.org/wiki/Transformers:_Dark_of_the_Moon">Transformers: Dark of the Moon</a></td>
125 <td>7</td>
126 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
127 <td>36%</td>
128 <td>$1.1B</td>
129 </tr>
130 <tr>
131 <td class="title"><a href="http://en.wikipedia.org/wiki/The_Lord_of_the_Rings:_The_Return_of_the_King">The Lord of the Rings: The Return of the King</a></td>
132 <td>8</td>
133 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
134 <td>95%</td>
135 <td>$1.1B</td>
136 </tr>
137 <tr>
138 <td class="title"><a href="http://en.wikipedia.org/wiki/Skyfall">Skyfall</a></td>
139 <td>9</td>
140 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
141 <td>92%</td>
142 <td>$1.1B</td>
143 </tr>
144 <tr>
145 <td class="title"><a href="http://en.wikipedia.org/wiki/Transformers:_Age_of_Extinction">Transformers: Age of Extinction</a></td>
146 <td>10</td>
147 <td class="tablesaw-stack-block"><div style="width: 100%; min-width: 10em; background-color: blue"><canvas width="200" height="20"></canvas></div></td>
148 <td>18%</td>
149 <td>$1.0B</td>
150 </tr>
151 </tbody>
152 </table>
153 </div>
154
155 </body>
156 </html>