-
Notifications
You must be signed in to change notification settings - Fork 45
/
hand-layouts.html
213 lines (200 loc) · 7.41 KB
/
hand-layouts.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
<!DOCTYPE html>
<html lang="en-nz">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CardsJS Hand Layouts</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<link href="cards.css" rel="stylesheet" type="text/css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
pre { font-size: 80%; }
</style>
</head>
<body>
<div class="container-fluid">
<div class="jumbotron">
<div class="container">
<h1>Hand Layouts</h1>
<p>Cards can be grouped into a hand. A hand is a <code><div class='hand'></code> containing the cards
(<code><img class='card' src='cards/..'></code>).
When the mouse is over an active hand's card, the card is moved veritically or horizontally to indicate that it
will be selected. Use <code>class="active-hand"</code> to make a hand active.
</p>
</div>
</div>
<h2>Horizontal Hand</h2>
<div class="row">
<div class="col-md-6">
<p>A simple horizontal layout of a hand. Every card is completely visible. Hovering over the card will make it jump up.</p>
<div class="hand hhand active-hand">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
</div>
</div>
<div class="col-md-4">
<pre><code><div class="hand hhand">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
</div></code></pre>
</div>
</div>
<h2>Horizontal Hand - Compact</h2>
<div class="row">
<div class="col-md-6">
<p>A horizontal layout where cards are overlapped. Hovering over the card will make it jump up.</p>
<div class="hand hhand-compact active-hand">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
</div>
</div>
<div class="col-md-4">
<pre>
<div class="hand hhand-compact">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
</div></pre>
</div>
</div>
<h2>Vertical hand</h1>
<div class="row">
<div class="col-md-6">
<p>
A vertical layout with overlapping cards. Each is column contains all the cards for the suit. This can be used
to display a dummy hand in bridge. Hovering over the card will make it jump to the right.
</p>
<div class="active-hand">
<div class="hand vhand-compact">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
</div>
<div class="hand vhand-compact">
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
</div>
<div class="hand vhand-compact">
<img class='card' src='cards/10D.svg'>
<img class='card' src='cards/4D.svg'>
<img class='card' src='cards/2D.svg'>
</div>
<div class="hand vhand-compact">
<img class='card' src='cards/8C.svg'>
<img class='card' src='cards/7C.svg'>
<img class='card' src='cards/6C.svg'>
</div>
</div>
</div>
<div class="col-md-4">
<pre>
<div>
<div class="hand vhand-compact">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
</div>
<div class="hand vhand-compact">
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
</div>
<div class="hand vhand-compact">
<img class='card' src='cards/10D.svg'>
<img class='card' src='cards/4D.svg'>
<img class='card' src='cards/2D.svg'>
</div>
<div class="hand vhand-compact">
<img class='card' src='cards/8C.svg'>
<img class='card' src='cards/7C.svg'>
<img class='card' src='cards/6C.svg'>
</div>
</div></pre>
</div>
</div>
<h2>Fan hand</h2>
<div class="row">
<div class="col-md-6">
<p>
A 3D look and feel to hand. Each card is rotated and overlapped. Suitable for displaying the
player's hand. Hovering over the card will make it jump up.
</p>
<div class="hand fan active-hand">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
<img class='card' src='cards/10D.svg'>
<img class='card' src='cards/4D.svg'>
<img class='card' src='cards/2D.svg'>
<img class='card' src='cards/8C.svg'>
<img class='card' src='cards/7C.svg'>
<img class='card' src='cards/6C.svg'>
</div>
<div class="alert alert-warning" role="alert">Requires javascript for positioning and rotation.</div>
</div>
<div class="col-md-4">
<pre>
<div class="hand fan">
<img class='card' src='cards/AS.svg'>
<img class='card' src='cards/KS.svg'>
<img class='card' src='cards/QS.svg'>
<img class='card' src='cards/JS.svg'>
<img class='card' src='cards/10S.svg'>
<img class='card' src='cards/9H.svg'>
<img class='card' src='cards/3H.svg'>
<img class='card' src='cards/10D.svg'>
<img class='card' src='cards/4D.svg'>
<img class='card' src='cards/2D.svg'>
<img class='card' src='cards/8C.svg'>
<img class='card' src='cards/7C.svg'>
<img class='card' src='cards/6C.svg'>
</div></pre>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="cards.js"></script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-60043592-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>