-
Notifications
You must be signed in to change notification settings - Fork 2
/
sudoku.html
94 lines (94 loc) · 1.77 KB
/
sudoku.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
<!DOCTYPE html>
<html>
<head>
<title>Sudoku</title>
<link rel="icon" href="res/favicon.ico">
<script>
function load(w, h, d) {
document.getElementById("sudoku").src =
`sudoku_embed.html?w=${w}&h=${h}&d=${d}`;
}
</script>
<style>
html, body { height: 100%; }
body {
background-color: #212121;
margin: 0;
display: flex;
flex-direction: column;
align-items: stretch;
}
#head {
background-color: #424242;
width: 100%;
display: flex;
justify-content: space-around;
margin-bottom: 16px;
}
h1, #index {
color: #ffc107;
text-align: center;
font-family: monospace;
font-size: 42px;
flex-grow: 1;
padding: 16px;
margin: 0;
}
#index {
color: #ff5722;
text-decoration: none;
flex-grow: 0;
}
h2 {
color: #ff5722;
font-family: monospace;
}
a {
color: #ffc107;
font-family: monospace;
font-size: 16px;
cursor: pointer;
text-decoration: underline;
}
#wrap {
display: flex;
justify-content: center;
padding: 0 16px;
color: #f5f5f5;
font-family: monospace;
font-size: 16px;
height: 100%;
}
#menu {
flex-grow: 0;
flex-basis: 100px;
margin: auto;
}
#sudoku {
flex-grow: 1;
height: 100%;
border: none;
}
</style>
</head>
<body>
<div id="head">
<a id="index" href="index.html"><</a>
<h1>Sudoku</h1>
</div>
<div id="wrap">
<div id="menu">
<a onclick="load(3, 3, 0)">Easy</a><br/>
<a onclick="load(3, 3, 1)">Medium</a><br/>
<a onclick="load(3, 3, 2)">Hard</a><br/>
<a onclick="load(3, 3, null)">Very Hard</a><br/>
<a onclick="load(2, 2, 2)">2x2</a><br/>
<a onclick="load(3, 2, 2)">3x2</a><br/>
<a onclick="load(4, 2, 2)">4x2</a><br/>
<a onclick="load(4, 3, 2)">4x3</a><br/>
<a onclick="load(4, 4, 2)">4x4</a><br/>
</div>
<iframe id="sudoku" src="sudoku_embed.html"></iframe>
</div>
</body>
</html>