-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (58 loc) · 2.6 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
<!--
Sokoban game
© Copyright 2021 Zakon Technomantów
Published under WTFPLv2
Languages: HTML5, CSS3, JavaScript (ES 2020)
Main menu
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Sokobanbanban</title>
<script src="./node_modules/jquery/dist/jquery.js"></script>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./style/main.css" />
<link rel="stylesheet" href="./style/colors.css" />
<link rel="stylesheet" href="./style/borders.css" />
<link rel="stylesheet" href="./style/electronstyles.css" />
<script defer type="module" src="./menu-bar/menu-buttons.js"></script>
<script defer type="module" src="./scripts/init.js"></script>
<script type="text/javascript">
const randomBetween = (min, max) => min + Math.floor(Math.random() * (max - min + 1))
let style = document.createElement('style')
let css = "body:before{background-image:url('./assets/bg/"+randomBetween(1,5)+".png')};"
style.type = 'text/css'
style.appendChild(document.createTextNode(css))
document.head.appendChild(style)
</script>
</head>
<body>
<header>
<menu id="menu-bar">
<div class="left" role="menu">
<!-- <button class="menubar-btn" id="console-btn"><i class="fa fa-terminal"></i></button> -->
<h5>Sokobanbanban</h5>
</div>
<div class="right">
<button class="menubar-btn" id="minimize-btn"><i class="fa fa-window-minimize"></i></button>
<button class="menubar-btn" id="close-btn"><i class="fa fa-close"></i></button>
</div>
</menu>
</header>
<main>
<nav class="container">
<button class="flex-item" onclick="location.href='./static/difficulty.html'">Play</button>
<button class="flex-item" onclick="location.href='./static/saves.html'">Load/Start new game</button>
<button class="flex-item" onclick="location.href='./static/custom.html'">Custom game</button>
<button class="flex-item" onclick="location.href='./static/levelmaker.html'">Create level</button>
<button class="flex-item" onclick="location.href='./static/leaderboard.html'">Hall of Fame</button>
<div class="flex-item" id="button-container">
<button onclick="location.href='./static/credits.html'">Credits</button>
<button onclick="window.closeWindow()">Quit</button>
</div>
</nav>
</main>
</body>
</html>