forked from flukeout/css-diner
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
171 lines (140 loc) · 5.73 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
<!DOCTYPE html>
<html>
<head>
<title>CSS Diner - Where we feast on CSS Selectors!</title>
<script>var levels={}; var strings={};</script>
<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="levels.js" type="text/javascript" charset="utf-8"></script>
<script src="levels_it.js" type="text/javascript" charset="utf-8"></script>
<script src="levels_de.js" type="text/javascript" charset="utf-8"></script>
<script src="restaurant.js" type="text/javascript" charset="utf-8"></script>
<link rel="icon" type="image/png" href="favicon.png">
<link href='http://fonts.googleapis.com/css?family=Exo+2:200,400,600,400italic,600italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<header>
CSS Diner
<div class="logo">
<plate><apple /></plate>
</div>
<div class="lang">
<span id="lang-select"></span>
<ul>
</ul>
</div>
</header>
<div class="col-wrapper bottom-half">
<div class="left-col">
<h2 class="order"></h2>
<div class="note">
<h3 data-lang-id="1">No worries, you've got this!</h3>
<p data-lang-id="2">
You're about to learn CSS Selectors!
Selectors are how you pick which element to apply styles to.
</p>
<h4 data-lang-id="3">Exhibit 1 - A CSS Rule</h4>
<pre>
p {
margin-bottom: 12px;
}
</pre>
<p data-lang-id="4">Here, the "p" is the selector (selects all <p> elements) and applies the margin-bottom style.</p>
<p data-lang-id="5">
To play, type in a CSS selector in the editor below to select the correct items on the table.
If you get it right, you'll advance to the next level.
</p>
<p data-lang-id="6">Hover over the items on the table to see their HTML markup.</p>
<p data-lang-id="7">Get help with selectors on the right! →</p>
<a class="note-toggle" href="#" data-lang-id="8">Ok, got it!</a>
</div>
<a class="note-toggle" href="#" data-lang-id="9">Help, I'm stuck!</a>
<div class="game-wrapper">
<div class="table-wrapper">
<div class="table"></div>
</div>
<div class="table-edge">
<div class="table-leg"></div>
<div class="table-leg"></div>
</div>
</div>
<div class="editor">
<div class="editor-pane">
<div class="input-header" data-lang-id="10">
<div class="file-name">style.css</div> CSS Editor
</div>
<div class="file-window css-view">
<div class="line-numbers">
1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>10<br/>11<br/>12<br/>13<br/>14<br/>15<br/>16<br/>17<br/>18<br/>19<br/>20
</div>
<input class="input-strobe" type="text" placeholder="Type in a CSS selector" data-lang-id="11"/><span class="plus">+</span><div class="enter-button" data-lang-id="12">enter</div>
<div data-lang-id="13">
{<br/>
/* Styles would go here. */<br/>
}
</div>
<div class="help" data-lang-id="14">
<br/>
/* <br/>
Type a number to skip to a level.<br/>
Ex → "5" for level 5 <br/>*/
</div>
</div>
</div>
<div class="editor-pane html-view">
<div class="input-header" data-lang-id="15">
<div class="file-name">table.html</div>
HTML Viewer
</div>
<div class="file-window">
<div class="line-numbers">
1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>10<br/>11<br/>12<br/>13<br/>14<br/>15<br/>16<br/>17<br/>18<br/>19<br/>20 </div>
<div class="markup">
</div>
</div>
</div>
</div>
<div class="what-is-this">
<h2 data-lang-id="16">What is this?</h2>
<p data-lang-id="17">It's a little game to help you learn CSS selectors. Type in the correct selector to complete each level. Get help on the right.</p>
<p>It's a work in progress, so please give me feedback!</p>
<p>
Made by <a href="http://www.twitter.com/flukeout">@flukeout</a> with special thanks to...
</p>
<p>
<a href="https://twitter.com/k88hudson">@k88hudson</a>, <a href="http://www.twitter.com/antlam7">@antlam7</a> and <a href="https://twitter.com/smashman2004">@smashman2004</a>.
</p>
<p>
Please submit issues and PRs at <a href="https://github.com/flukeout/restaurant">this Github repo</a>.
</p>
</div>
</div><!-- /left col -->
<div class="right-col">
<div class="help-wrapper">
<div class="level-nav">
<a href="#"><</a>
<a href="#">></a>
</div>
<h1 class="level-header"></h1>
<div class="level-progress"><div class="progress"></div></div>
<div class="display-help">
<h3 class="selector-name"></h3>
<h2 class="title"></h2>
<h3 class="syntax"></h3>
<div class="hint"></div>
<div class="examples"></div>
<div class="selector"></div>
</div>
</div>
<div class="level-menu">
<div class="levels"></div>
</div>
<div class="level-menu-toggle-wrapper">
<div class="level-menu-toggle"></div>
</div>
</div><!-- /right col -->
</div>
<!-- This is the popup that floats over table elemetns -->
<div class="helper"></div>
</body>
</html>