Skip to content

Commit dea99a6

Browse files
committed
Voeg basis code van A-Maze-ing toe
1 parent 9af58b4 commit dea99a6

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
categories:
3+
- Activiteiten
4+
tags:
5+
- CSS
6+
- HTML
7+
- JavaScript
8+
- Spel
9+
---
10+
11+
# A-Maze-ing
12+
13+
```html
14+
<html>
15+
<head>
16+
<meta charset="utf-8" />
17+
<title>All Hallow's Eve Maze</title>
18+
19+
<style>
20+
body {
21+
align-items: center;
22+
background-color: black;
23+
display: flex;
24+
height: 100dvh;
25+
justify-content: center;
26+
margin: 0;
27+
width: 100dvw;
28+
}
29+
30+
#maze {
31+
--maze-size: min(75dvh, 75dvw);
32+
--cell-size: calc(var(--maze-size) / var(--number-of-cells));
33+
34+
position: relative;
35+
height: var(--maze-size);
36+
width: var(--maze-size);
37+
38+
&.escaped h1 {
39+
display: block;
40+
}
41+
42+
div {
43+
display: inline-flex;
44+
45+
height: var(--cell-size);
46+
width: var(--cell-size);
47+
48+
font-size: var(--cell-size);
49+
align-items: center;
50+
justify-content: center;
51+
}
52+
53+
h1 {
54+
color: green;
55+
display: none;
56+
font-family: sans-serif;
57+
text-align: center;
58+
}
59+
60+
#player {
61+
cursor: hand;
62+
63+
position: absolute;
64+
top: calc(var(--player-cell-y, 0) * var(--cell-size));
65+
left: calc(var(--player-cell-x, 0) * var(--cell-size));
66+
transition: all 0.2s;
67+
68+
span {
69+
display: none;
70+
}
71+
}
72+
}
73+
</style>
74+
</head>
75+
76+
<body></body>
77+
78+
<script></script>
79+
</html>
80+
```

0 commit comments

Comments
 (0)