-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (59 loc) · 2.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
<!DOCTYPE html>
<html lang="en">
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/mathjs/1.5.0/math.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bignumber.js/2.0.5/bignumber.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js"></script>
<style>
html, body {
height: 100%;
overflow:hidden;
}
.euler, .console {
padding: 50px;
border: none;
}
pre {
overflow-y: auto;
max-height: 700px;
}
</style>
</head>
<body>
<div class="row" style="height:100%">
<div class="col-sm-5" style="height:100%">
<iframe class="euler" style="width:100%;height:100%;" src="about:blank"></iframe>
</div>
<div class="console col-sm-7">
<div class="row">
<div class="col-sm-6">
<a class="prev pull-left" href="">prev</a>
</div>
<div class="col-sm-6">
<a class="next pull-right" href="">next</a>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<pre></pre>
<h1 class="text-center"><code></code></h1>
</div>
</div>
</div>
</div>
<script src="euler.js"></script>
<script type="text/javascript">
var print = function(v){$('code').text(v);};
$(function(){
var href = window.location.href.split('?')
, n = parseInt(href[1]) || 1;
$('iframe').attr('src', 'https://projecteuler.net/problem=' + n);
$('.prev').attr('href', href[0] + '?' + (n-1||1));
$('.next').attr('href', href[0] + '?' + (n+1));
answers[n-1] && $('pre').text(answers[n-1].toString()) && answers[n-1]();
});
</script>
</body>