-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
119 lines (114 loc) · 4.99 KB
/
index.html
File metadata and controls
119 lines (114 loc) · 4.99 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Practice JavaScript</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#0C141F">
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="/launch-icon.svg">
<!-- OPEN GRAPH STUFF -->
<meta property="og:title" content="Practice JavaScript!">
<meta property="og:description" content="Practice JavaScript with this fun game">
<meta property="og:type" content="website">
<meta property="og:image" content="https://practicejavascript.com/dist/img/social-banner.png">
<meta property="og:url" content="https://practicejavascript.com">
<!-- TWITTER CARDS STUFF -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@jakob_anderson" />
<meta name="twitter:title" content="Practice JavaScript!" />
<meta name="twitter:description" content="Practice JavaScript with this fun game" />
<meta name="twitter:image" content="https://practicejavascript.com/dist/img/social-banner.png" />
<meta name="twitter:image:alt" content="PracticeJavaScript Logo" />
</head>
<body>
<style>
body {
opacity: 0;
background-color: #0C141F;
transition: opacity 200ms ease-in-out;
}
</style>
<heading class="site-heading">
<div class="container">
<span>
<img class="logo" src="./dist/img/monitor.svg" alt="Logo" height="80px">
<h1>Practice JavaScript!</h1>
</span>
<nav class="controls">
<div>
<img id="prev-problem" class="prev-problem" src="./dist/img/back.svg" alt="Previous problem" title="Previous problem (CMD + SHIFT + RETURN or CTRL + SHIFT + ENTER)" height="80">
<div class="title">Back</div>
</div>
<div>
<img id="shuffle-problems" class="shuffle-problems" src="./dist/img/shuffle.svg" alt="Shuffle problems" title="Shuffle problems" height="80">
<div class="title">Shuffle</div>
</div>
<div>
<img id="next-problem" class="next-problem" src="./dist/img/next.svg" alt="Next problem" title="Next problem (CMD + RETURN or CTRL + ENTER)" height="80">
<div class="title">Next</div>
</div>
</nav>
</div>
</heading>
<div class="container">
<main>
<div class="problem-group">
<div id="problem" class="problem">‌</div>
</div>
<div id="answer" class="answer">
<!--TODO: add ability to peek answer, while giving up any points for the question.-->
</div>
<div class="code-and-tests">
<div id="test-area" class="test-area">
<div id="test-total" class="test-total"></div>
<div id="test-suite" class="test-suite"></div>
<div id="assert-console" class="assert-console console monospace">
<h4>TEST ERRORS</h4>
<div id="assert-output"></div>
</div>
</div>
<div class="code-and-eval-console">
<label for="code" class="visually-hidden">Code Editor</label>
<textarea id="code" class="code monospace" rows="10" autofocus autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
<div id="eval-console" class="eval-console console monospace">
<h4>CODE OUTPUT</h4>
<div id="eval-output"></div>
</div>
</div>
</div>
</main>
</div>
<!-- practice-javascript-bottom-banner -->
<div class="ads-bottom">
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-4039212144643368"
data-ad-slot="9721927778"></ins>
</div>
<footer>
<div class="copyright">© 2017 <a href="https://twitter.com/jakob_anderson">Jakob Anderson</a></div>
<div class="issues"><a href="https://github.com/PracticeJavaScript/practicejavascript.com/issues">Problems? Leave an issue on github</a></div>
<div class="icon-license">Icons designed by <a href="http://www.flaticon.com/authors/gregor-cresnar">Gregor Cresnar</a> from Flaticon</div>
</footer>
<link href="./dist/css/style.css" rel="stylesheet">
<script src="./dist/js/bundle.min.js"></script>
<script src="./dist/js/loadJS.js"></script>
<script src="./dist/js/sw-registration.js"></script>
<!-- DEFER AND ASYNC ALL THE OTHER GARBAGE THAT ISN'T MY APP -->
<script>
// Only do ads and analytics when in prod
if (window.location.host === 'practicejavascript.com') {
window.addEventListener('load', function() {
loadJS('//www.google-analytics.com/analytics.js', function() {
ga('create', 'UA-97392792-1', 'auto');
ga('send', 'pageview');
});
loadJS('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', function() {
(adsbygoogle = window.adsbygoogle || []).push({});
});
});
}
</script>
</body>
</html>