-
Notifications
You must be signed in to change notification settings - Fork 102
/
index.html
277 lines (254 loc) · 11.5 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
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Rubik's cube (CSS3 + JS)</title>
<meta property="og:title" content="3D HTML5 Rubik's Cube" />
<meta property="og:type" content="product" />
<meta property="og:url" content="https://html5rubik.com" />
<meta property="og:image" content="https://html5rubik.com/img/rotate.png" />
<meta property="og:site_name" content="3D HTML5 Rubik's cube" />
<meta property="fb:admins" content="1220708115" />
<meta name = "viewport" content = "user-scalable=no">
<meta name = "description" content = "Rubik's cube in HTML5 (CSS3 + JavaScript)">
<meta name = "keywords" content = "html5, CSS3, rubik's,cube, 3D, rubik, Javascript, YUI, Mojito">
<meta charset="UTF-8" />
<link href='//fonts.googleapis.com/css?family=Luckiest+Guy' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="style.css"></link>
<link rel="stylesheet" href="rubik.css"></link>
<script src="//yui-s.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
<script src="rubik.js"></script>
<script src="message-scroll.js"></script>
</head>
<body>
<header>
<hgroup>
<h1>Rubik's</h1>
<h2><a href="//www.rubiks.com">Rubik's Cube</a> ®
used by permission of Seven Towns Limited. | Published in 2012
</h2>
</hgroup>
</header>
<section id="log">
<a href="tutorial">
<div class="html5">
</div>
<span href="/tutorial">Tutorial</span>
</a>
</section>
<section id="tutorial">
<p><span>Move</span> your device to trigger the accelerometers and rotate the cube.
Use <span>flick</span> gestures to move the faces.
<span>Rotate</span> your device to start the <span class="yellow">landscape</span> application. Have fun!</p>
</section>
<section id="messages">
<div class="wrapper">
<ul class="active">
<li class="prev"></li>
<li class="current"></li>
<li class="next"></li>
</ul>
<div class="populate">
<div class="panel" data-pos="0">
<hgroup>
<h1>Welcome to the HTML5 Rubik's page!</h1>
<h2><u>Swipe left</u> your finger over the panel to get into the next pages</h2>
</hgroup>
</div>
<div class="panel" data-pos="1">
<hgroup>
<h1>Let's see how to play with the cube...</h1>
<h2>Don't forget to give it a try in you tablet or your phone!</h2>
</hgroup>
</div>
<div class="panel" data-pos="2">
<hgroup>
<h1>Movements and rotation</h1>
<h2>Flick over the cube to do the movements.
Push with two fingers on the screen (or use the orange button) to rotate the cube.
</h2>
</hgroup>
</div>
<div class="panel" data-pos="3">
<hgroup>
<h1>Solving the cube</h1>
<h2>Tap in the rubik's button to solve the cube. Note that the real algorithm is not implemented yet so if just going to be a multiple undo.
</h2>
</hgroup>
</div>
<div class="panel" data-pos="4">
<hgroup>
<h1>Cube history</h1>
<h2>Press the undo or redo blue arrow buttons
to go back and forward off the rubik's movement</h2>
</hgroup>
</div>
<div class="panel" data-pos="5">
<hgroup>
<h1>Rubik's CSS3+JS Tutorial</h1>
<h2>
Don't forget to check the <a href="/tutorial">tutorial</a> of how the cube was made!
</h2>
</hgroup>
</div>
<div class="panel" data-pos="6">
<hgroup>
<h1>Code at Github</h1>
<h2>
Any contribution will be welcome in the <a href="//github.com/dferreiroval">github</a> account
</h2>
</hgroup>
</div>
<div class="panel" data-pos="7">
<hgroup>
<h1>Feedback</h1>
<h2>
Feel free to send me your feedback via
<a href="mailto:[email protected]">mail</a> or
<a href="//twitter.com/#!/diervo">twitter!</a>
</h2>
</hgroup>
</div>
<div class="panel" data-pos="8">
<hgroup>
<h1>Have fun!</h1>
<h2>
For more projects visit my home page:
<a href="//feval.info">feval.info</a> or
<a href="//twitter.com/#!/diervo">@diervo</a>
</h2>
</hgroup>
</div>
</div>
</div>
</section>
<section id="rubik">
<div id="cube-container">
<div id="cube-viewport">
<div id="cube">
<!-- UP FACE -->
<!-- LEFT COLUMN (L) -->
<div class="utl cubie up LM UE BS"><div><span>U1</span></div></div>
<div class="ucl cubie up LM UE CS"><div><span>U2</span></div></div>
<div class="ubl cubie up LM UE FS"><div><span>U3</span></div></div>
<!-- CENTER COLUMN (C) -->
<div class="utc cubie up CM UE BS"><div><span>U4</span></div></div>
<div class="ucc cubie up CM UE CS"><div><span>U5</span></div></div>
<div class="ubc cubie up CM UE FS"><div><span>U6</span></div></div>
<!-- RIGHT COLUMN (R) -->
<div class="utr cubie up RM UE BS"><div><span>U7</span></div></div>
<div class="ucr cubie up RM UE CS"><div><span>U8</span></div></div>
<div class="ubr cubie up RM UE FS"><div><span>U9</span></div></div>
<!-- END UP FACE -->
<!-- FRONT FACE -->
<!-- LEFT COLUMN (L) -->
<div class="ftl cubie front LM UE FS"><div><span>F1</span></div></div>
<div class="fcl cubie front LM CE FS"><div><span>F2</span></div></div>
<div class="fbl cubie front LM DE FS"><div><span>F3</span></div></div>
<!-- CENTER COLUMN (C) -->
<div class="ftc cubie front CM UE FS"><div><span>F4</span></div></div>
<div class="fcc cubie front CM CE FS"><div><span>F5</span></div></div>
<div class="fbc cubie front CM DE FS"><div><span>F6</span></div></div>
<!-- RIGHT COLUMN (R) -->
<div class="ftr cubie front RM UE FS"><div><span>F7</span></div></div>
<div class="fcr cubie front RM CE FS"><div><span>F8</span></div></div>
<div class="fbr cubie front RM DE FS"><div><span>F9</span></div></div>
<!-- END FRONT FACE -->
<!--DOWN FACE -->
<!-- LEFT COLUMN (L) -->
<div class="dtl cubie down LM DE FS"><div><span>D1</span></div></div>
<div class="dcl cubie down LM DE CS"><div><span>D2</span></div></div>
<div class="dbl cubie down LM DE BS"><div><span>D3</span></div></div>
<!-- CENTER COLUMN (C) -->
<div class="dtc cubie down CM DE FS"><div><span>D4</span></div></div>
<div class="dcc cubie down CM DE CS"><div><span>D5</span></div></div>
<div class="dbc cubie down CM DE BS"><div><span>D6</span></div></div>
<!-- RIGHT COLUMN (R) -->
<div class="dtr cubie down RM DE FS"><div><span>D7</span></div></div>
<div class="dcr cubie down RM DE CS"><div><span>D8</span></div></div>
<div class="dbr cubie down RM DE BS"><div><span>D9</span></div></div>
<!-- END DOWN FACE -->
<!--BACK FACE -->
<!-- LEFT COLUMN (L) -->
<div class="btl cubie back LM DE BS"><div><span>B1</span></div></div>
<div class="bcl cubie back LM CE BS"><div><span>B2</span></div></div>
<div class="bbl cubie back LM UE BS"><div><span>B3</span></div></div>
<!-- CENTER COLUMN (C) -->
<div class="btc cubie back CM DE BS"><div><span>B4</span></div></div>
<div class="bcc cubie back CM CE BS"><div><span>B5</span></div></div>
<div class="bbc cubie back CM UE BS"><div><span>B6</span></div></div>
<!-- RIGHT COLUMN (R) -->
<div class="btr cubie back RM DE BS"><div><span>B7</span></div></div>
<div class="bcr cubie back RM CE BS"><div><span>B8</span></div></div>
<div class="bbr cubie back RM UE BS"><div><span>B9</span></div></div>
<!--END BOTTOM FACE -->
<!--LEFT FACE -->
<!-- LEFT COLUMN (L) -->
<div class="ltl cubie left LM UE BS"><div><span>L1</span></div></div>
<div class="lcl cubie left LM CE BS"><div><span>L2</span></div></div>
<div class="lbl cubie left LM DE BS"><div><span>L3</span></div></div>
<!-- CENTER COLUMN (C) -->
<div class="ltc cubie left LM UE CS"><div><span>L4</span></div></div>
<div class="lcc cubie left LM CE CS"><div><span>L5</span></div></div>
<div class="lbc cubie left LM DE CS"><div><span>L6</span></div></div>
<!-- RIGHT COLUMN (R) -->
<div class="ltr cubie left LM UE FS"><div><span>L7</span></div></div>
<div class="lcr cubie left LM CE FS"><div><span>L8</span></div></div>
<div class="lbr cubie left LM DE FS"><div><span>L9</span></div></div>
<!--END LEFT FACE -->
<!--RIGHT FACE -->
<!-- LEFT COLUMN (L) -->
<div class="rtl cubie right RM UE FS"><div><span>R1</span></div></div>
<div class="rcl cubie right RM CE FS"><div><span>R2</span></div></div>
<div class="rbl cubie right RM DE FS"><div><span>R3</span></div></div>
<!-- CENTER COLUMN (C) -->
<div class="rtc cubie right RM UE CS"><div><span>R4</span></div></div>
<div class="rcc cubie right RM CE CS"><div><span>R5</span></div></div>
<div class="rbc cubie right RM DE CS"><div><span>R6</span></div></div>
<!-- RIGHT COLUMN (R) -->
<div class="rtr cubie right RM UE BS"><div><span>R7</span></div></div>
<div class="rcr cubie right RM CE BS"><div><span>R8</span></div></div>
<div class="rbr cubie right RM DE BS"><div><span>R9</span></div></div>
<!--END LEFT FACE -->
</div>
</div>
</div>
<aside>
<section id="main">
<div id="cube-controls">
<ul>
<li>
<div class="undo"></div>
</li>
<li>
<div class="redo"></div>
</li>
<li>
<div class="solve"></div>
</li>
<li id="rotation">
<div class="rotate"></div>
</li>
</ul>
</div>
</section>
</aside>
</section>
<script>
YUI().use('node','rubik','message-scroll',function(Y){
var scrollpanel = new Y.MessageScroll();
var cube = window.cube = new Y.Rubik();
cube.run();
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32149285-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>