-
Notifications
You must be signed in to change notification settings - Fork 343
/
index.html
187 lines (158 loc) · 6.31 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
<!DOCTYPE html>
<html>
<head>
<title>CSS Diner - Where we feast on CSS Selectors!</title>
<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="js/levels.js" type="text/javascript" charset="utf-8"></script>
<script src="js/restaurant.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.mCustomScrollbar.min.js"></script>
<link rel="icon" type="image/png" href="favicon.png">
<link href='https://fonts.googleapis.com/css?family=Exo+2:200,400,600,400italic,600italic' rel='stylesheet'>
<link href="https://fonts.googleapis.com/css?family=Satisfy" rel="stylesheet">
<link rel="stylesheet" href="css/jquery.mCustomScrollbar.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">
<meta property="og:url" content="http://cssdiner.com" />
<meta property="og:type" content="website" />
<meta property="og:title" content="CSS Diner" />
<meta property="og:description" content="A fun game to help you learn and practice CSS selectors." />
<meta property="og:image" content="https://flukeout.github.io/images/fb-share.jpg" />
</head>
<body>
<div class="left-col">
<header>
CSS Diner
<div class="logo">
<plate><apple /></plate>
</div>
<span class="share-menu">
Share
<a class="share-twitter" type="twitter" href="#"></a>
<a class="share-facebook" type="facebook" href="#"></a>
<a class="share-email" type="email" href="#"></a>
</span>
</header>
<h2 class="order"></h2>
<div class="note">
<h3>No worries, you've got this!</h3>
<p>
You're about to learn CSS Selectors!
Selectors are how you pick which element to apply styles to.
</p>
<h4>Exhibit 1 - A CSS Rule</h4>
<pre>
p {
margin-bottom: 12px;
}</pre>
<p>
Here, the "p" is the selector (selects all <p> elements) and applies the margin-bottom style.
</p>
<p>
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>
Hover over the items on the table to see their HTML markup.
</p>
<p>
Get help with selectors on the right! →
</p>
<a class="note-toggle" href="#">Ok, got it!</a>
</div>
<a class="note-toggle" href="#">Help, I'm stuck!</a>
<div class="game-wrapper">
<div class="table-wrapper">
<div class="table-surface"></div>
<div class="nametags"></div>
<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">
<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"/><span class="plus">+</span><div class="enter-button">enter</div>
<div>
{<br/>
/* Styles would go here. */<br/>
}
</div>
<div class="help">
<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">
<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">
<p>
Made by <a href="http://www.twitter.com/flukeout">@flukeout</a> — come say hi!
</p>
<p>
Have feedback or questions? Please file an issue on <a href="https://github.com/flukeout/css-diner/issues">the Github repo</a>.
</p>
</div>
<div class="helper"><!-- This is the popup that floats over table elements --></div>
</div><!-- /left-col -->
<div class="right-col">
<div class="help-wrapper">
<h1 class="level-header">
<span class="level-text"></span>
<span class="checkmark"></span>
</h1>
<div class="level-nav">
<a class="previous" href="#"></a>
<a class="next" href="#"></a>
</div>
<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>
<h4 class="examples-title">Examples</h4>
<div class="examples"></div>
</div>
</div>
<div class="level-menu">
<h2>Choose a level</h2>
<div class="levels"><!-- level links are inserted here--></div>
<a class="reset-progress" href="#">Reset Progress</a>
</div>
<div class="level-menu-toggle-wrapper">
<div class="level-menu-toggle"></div>
</div>
</div><!-- /right-col -->
<script>
if(location.hostname != "localhost"){
(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-62998410-1', 'auto');
ga('send', 'pageview');
} else {
var ga = false;
}
</script>
</body>
</html>