notherbase-fs 1.1.42 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers/authCheck.js +5 -20
- package/controllers/explorer.js +11 -1
- package/controllers/inventory.js +2 -4
- package/controllers/the-front.js +18 -10
- package/controllers/user.js +314 -20
- package/models/index.js +2 -1
- package/models/send-mail.js +26 -0
- package/models/user.js +11 -1
- package/package.json +6 -2
- package/public/styles/account.css +41 -0
- package/public/styles/inventory.css +12 -24
- package/public/styles/main.css +8 -30
- package/public/styles/menu.css +61 -9
- package/public/styles/more.css +3 -0
- package/public/styles/player.css +12 -0
- package/test/coast/tall-beach/nono-cove/local-scripts/nono.js +211 -0
- package/test/coast/tall-beach/nono-cove/styles/index.css +18 -0
- package/test/coast/tall-beach/nono-cove/styles/nono.css +89 -0
- package/test/coast/tall-beach/nono-cove/views/index.ejs +5 -1
- package/test/coast/tall-beach/nono-cove/views/nono-og.ejs +37 -0
- package/test/test-index.js +10 -0
- package/test/views/index.ejs +94 -4
- package/views/account.ejs +161 -0
- package/views/explorer.ejs +7 -1
- package/views/head.ejs +4 -1
- package/views/inventory.ejs +68 -59
- package/views/menu.ejs +51 -14
- package/views/{contact.ejs → more.ejs} +2 -2
- package/views/player.ejs +47 -0
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
.inventory {
|
|
2
2
|
border: 1px solid var(--textColor);
|
|
3
3
|
color: var(--textColor);
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
left: 5%;
|
|
8
|
-
bottom: 105px;
|
|
9
|
-
background-color: var(--bgColor);
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
/* background-color: var(--bgColor); */
|
|
10
7
|
padding: 5px;
|
|
11
|
-
border-radius: 5px;
|
|
12
8
|
z-index: 500;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-wrap: wrap;
|
|
15
9
|
overflow: auto;
|
|
16
10
|
}
|
|
17
11
|
|
|
@@ -21,6 +15,7 @@
|
|
|
21
15
|
flex-wrap: wrap;
|
|
22
16
|
overflow: auto;
|
|
23
17
|
border: 1px solid var(--textColor);
|
|
18
|
+
align-content: flex-start;
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
.inventory .item-spawner {
|
|
@@ -43,21 +38,13 @@
|
|
|
43
38
|
background-color: var(--woodColor);
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
button#inventory {
|
|
47
|
-
position: fixed;
|
|
48
|
-
bottom: 30px;
|
|
49
|
-
right: 75px;
|
|
50
|
-
width: 64px;
|
|
51
|
-
height: 64px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
41
|
.item-card {
|
|
55
|
-
width:
|
|
56
|
-
height:
|
|
57
|
-
border-radius:
|
|
42
|
+
width: 150px;
|
|
43
|
+
height: 45px;
|
|
44
|
+
border-radius: 3px;
|
|
58
45
|
border: 1px solid var(--textColor);
|
|
59
|
-
padding:
|
|
60
|
-
margin: 5px;
|
|
46
|
+
padding: 5px;
|
|
47
|
+
margin: 2.5px;
|
|
61
48
|
position: relative;
|
|
62
49
|
}
|
|
63
50
|
|
|
@@ -67,9 +54,10 @@ button#inventory {
|
|
|
67
54
|
top: 0;
|
|
68
55
|
margin: 0;
|
|
69
56
|
padding: 0;
|
|
57
|
+
border-radius: 0;
|
|
70
58
|
}
|
|
71
59
|
|
|
72
60
|
.item-card hr {
|
|
73
|
-
|
|
74
|
-
|
|
61
|
+
width: 100%;
|
|
62
|
+
margin: 0;
|
|
75
63
|
}
|
package/public/styles/main.css
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--bgColor: rgb(37, 37, 37);
|
|
3
|
+
--bgColorTransparent: rgba(37, 37, 37, 0.404);
|
|
3
4
|
--darkBgColor: rgb(27, 27, 27);
|
|
5
|
+
--veryDarkBgColorTransparent: rgba(15, 15, 15, 0.404);
|
|
4
6
|
--veryDarkBgColor: rgb(15, 15, 15);
|
|
5
7
|
--lightBgColor: rgb(57, 57, 57);
|
|
6
8
|
--shadowColor: rgb(26, 26, 26);
|
|
@@ -8,6 +10,7 @@
|
|
|
8
10
|
--textColorBright: rgb(221, 181, 130);
|
|
9
11
|
--woodColor: rgb(95, 68, 43);
|
|
10
12
|
--darkWoodColor: rgb(70, 50, 32);
|
|
13
|
+
--standardBorder: 1px solid var(--textColor);
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
* {
|
|
@@ -21,6 +24,11 @@
|
|
|
21
24
|
display: none !important;
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
.camo {
|
|
28
|
+
transition: all .15s;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
body {
|
|
25
33
|
background-color: var(--darkBgColor);
|
|
26
34
|
min-height: 100vh;
|
|
@@ -163,32 +171,6 @@ ul {
|
|
|
163
171
|
margin: 10px;
|
|
164
172
|
}
|
|
165
173
|
|
|
166
|
-
#contact {
|
|
167
|
-
position: fixed;
|
|
168
|
-
bottom: 30px;
|
|
169
|
-
left: 5px;
|
|
170
|
-
width: 64px;
|
|
171
|
-
height: 64px;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
#contact-form {
|
|
175
|
-
width: 100%;
|
|
176
|
-
border: 1px solid var(--textColor);
|
|
177
|
-
color: var(--textColor);
|
|
178
|
-
position: fixed;
|
|
179
|
-
width: 90%;
|
|
180
|
-
height: 30%;
|
|
181
|
-
left: 5%;
|
|
182
|
-
bottom: 105px;
|
|
183
|
-
background-color: var(--bgColor);
|
|
184
|
-
padding: 5px;
|
|
185
|
-
border-radius: 5px;
|
|
186
|
-
z-index: 500;
|
|
187
|
-
display: flex;
|
|
188
|
-
flex-wrap: wrap;
|
|
189
|
-
overflow: auto;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
174
|
.door {
|
|
193
175
|
border: 1px solid var(--darkWoodColor);
|
|
194
176
|
width: 100px;
|
|
@@ -242,10 +224,6 @@ iframe {
|
|
|
242
224
|
font-size: 12px;
|
|
243
225
|
}
|
|
244
226
|
|
|
245
|
-
.ui {
|
|
246
|
-
position: relative;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
227
|
@media only screen and (max-width: 500px) {
|
|
250
228
|
main {
|
|
251
229
|
width: 100%;
|
package/public/styles/menu.css
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
.menu {
|
|
2
2
|
width: 75%;
|
|
3
3
|
height: 50%;
|
|
4
|
-
margin: 5% 12.5%;
|
|
5
4
|
border: 1px solid var(--textColor);
|
|
6
5
|
color: var(--textColor);
|
|
7
6
|
position: fixed;
|
|
7
|
+
left: 12.5%;
|
|
8
|
+
top: 5%;
|
|
9
|
+
background-color: var(--bgColorTransparent);
|
|
10
|
+
backdrop-filter: blur(3px);
|
|
11
|
+
border-radius: 5px;
|
|
12
|
+
z-index: 500;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.menu hr {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ui .fade {
|
|
20
|
+
background-color: var(--veryDarkBgColorTransparent);
|
|
21
|
+
backdrop-filter: blur(3px);
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
position: fixed;
|
|
8
25
|
left: 0;
|
|
9
26
|
top: 0;
|
|
27
|
+
z-index: 400;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ui button {
|
|
10
31
|
background-color: var(--bgColor);
|
|
11
|
-
border
|
|
12
|
-
|
|
32
|
+
border: 1px solid var(--textColor);
|
|
33
|
+
margin: 0;
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ui button:hover {
|
|
38
|
+
border: 1px solid var(--textColorBright);
|
|
39
|
+
color: var(--textColorBright);
|
|
40
|
+
cursor: pointer;
|
|
13
41
|
}
|
|
14
42
|
|
|
15
43
|
.ui button#menu {
|
|
@@ -18,30 +46,54 @@
|
|
|
18
46
|
right: 5px;
|
|
19
47
|
width: 64px;
|
|
20
48
|
height: 64px;
|
|
49
|
+
border-radius: 5px;
|
|
21
50
|
}
|
|
22
51
|
|
|
23
52
|
.menu button#close {
|
|
24
|
-
top:
|
|
25
|
-
right:
|
|
53
|
+
top: 0;
|
|
54
|
+
right: 0;
|
|
26
55
|
width: 32px;
|
|
27
56
|
height: 32px;
|
|
28
57
|
position: absolute;
|
|
58
|
+
border-radius: 0;
|
|
29
59
|
}
|
|
30
60
|
|
|
31
61
|
.menu .tabs {
|
|
32
62
|
width: 100%;
|
|
33
|
-
height:
|
|
63
|
+
height: 30px;
|
|
34
64
|
border: 1px solid var(--textColor);
|
|
35
65
|
}
|
|
36
66
|
|
|
37
|
-
.menu .
|
|
67
|
+
.menu .tabs button {
|
|
68
|
+
height: 30px;
|
|
69
|
+
border-radius: 0;
|
|
70
|
+
padding: 0 10px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.menu .tabs .selected {
|
|
74
|
+
border: 2px solid var(--textColorBright);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.menu #content-window {
|
|
38
78
|
width: 100%;
|
|
39
|
-
height:
|
|
79
|
+
height: calc(100% - 30px);
|
|
40
80
|
border: 1px solid var(--textColor);
|
|
41
81
|
}
|
|
42
82
|
|
|
43
83
|
.menu a {
|
|
44
84
|
margin: 0;
|
|
45
85
|
padding: 5px;
|
|
46
|
-
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.menu #logout {
|
|
89
|
+
position: absolute;
|
|
90
|
+
width: 50%;
|
|
91
|
+
height: 40px;
|
|
92
|
+
bottom: -40px;
|
|
93
|
+
left: calc(25%);
|
|
94
|
+
background-color: var(--bgColor);
|
|
95
|
+
border: var(--standardBorder);
|
|
96
|
+
border-top: none;
|
|
97
|
+
border-radius: 0 0 5px 5px;
|
|
98
|
+
text-align: center;
|
|
47
99
|
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
let tileSize = 30;
|
|
2
|
+
|
|
3
|
+
class NonoTile {
|
|
4
|
+
constructor (game, $field, position, modifier) {
|
|
5
|
+
this.$div = $field.append(`<div class="nono-tile" id="${position[0]},${position[1]}"></div>`).children().last();
|
|
6
|
+
this.$div.css("width", tileSize);
|
|
7
|
+
this.$div.css("height", tileSize);
|
|
8
|
+
this.position = position;
|
|
9
|
+
this.state = "blank";
|
|
10
|
+
this.$div.addClass(this.state);
|
|
11
|
+
this.correctState = this.getRandomState(modifier);
|
|
12
|
+
this.solved = this.checkIfSolved();
|
|
13
|
+
this.game = game;
|
|
14
|
+
|
|
15
|
+
this.$div.on("click", this.clicked);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
getRandomState(modifier) {
|
|
19
|
+
let roll = Math.floor(Math.random() * (2 + modifier));
|
|
20
|
+
if (roll < 1) return "blank";
|
|
21
|
+
else return "punched";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
checkIfSolved() {
|
|
25
|
+
if ((this.state === "blank" || this.state === "marked") && this.correctState === "blank") return true;
|
|
26
|
+
else if (this.state === "punched" && this.correctState === "punched") return true;
|
|
27
|
+
else return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
clicked = () => {
|
|
31
|
+
this.$div.removeClass(this.state);
|
|
32
|
+
|
|
33
|
+
if (this.state === "blank") this.state = "marked";
|
|
34
|
+
else if (this.state === "marked") this.state = "punched";
|
|
35
|
+
else if (this.state === "punched") this.state = "blank";
|
|
36
|
+
|
|
37
|
+
this.$div.addClass(this.state);
|
|
38
|
+
|
|
39
|
+
this.solved = this.checkIfSolved();
|
|
40
|
+
this.game.tryFinishGame();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
class NonoGame {
|
|
45
|
+
constructor () {
|
|
46
|
+
this.difficulty = 0;
|
|
47
|
+
this.level = 2;
|
|
48
|
+
this.$board = $("#nono-board");
|
|
49
|
+
this.$field = null;
|
|
50
|
+
this.dimensions = [this.level, this.level];
|
|
51
|
+
this.hints = [[], []];
|
|
52
|
+
this.tiles = [];
|
|
53
|
+
this.nonoSize = 100;
|
|
54
|
+
this.maxNonoId = 4;
|
|
55
|
+
this.goldItem = itemIDs[0];
|
|
56
|
+
|
|
57
|
+
this.startNew();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
startNew() {
|
|
61
|
+
this.dimensions = [this.level, this.level];
|
|
62
|
+
|
|
63
|
+
this.$board.empty();
|
|
64
|
+
this.$board.css("width", this.dimensions[0] * (tileSize) + this.nonoSize + 5);
|
|
65
|
+
this.$board.css("height", this.dimensions[1] * (tileSize) + this.nonoSize + 5);
|
|
66
|
+
|
|
67
|
+
let $nono = this.$board.append(`<img class="nono" src="/img/logo.png">`).children().last();
|
|
68
|
+
$nono.css("width", this.nonoSize);
|
|
69
|
+
$nono.css("height", this.nonoSize);
|
|
70
|
+
|
|
71
|
+
let $topHints = this.$board.append(`<div class="top hints"></div>`).children().last();
|
|
72
|
+
$topHints.css("width", this.dimensions[0] * tileSize);
|
|
73
|
+
$topHints.css("height", this.nonoSize);
|
|
74
|
+
|
|
75
|
+
let $columns = [];
|
|
76
|
+
for (let i = 0; i < this.dimensions[0]; i++) {
|
|
77
|
+
let $newColumn = $topHints.append(`<div class="column"></div>`).children().last();
|
|
78
|
+
$newColumn.css("width", tileSize);
|
|
79
|
+
$columns.push($newColumn);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
let $sideHints = this.$board.append(`<div class="side hints"></div>`).children().last();
|
|
83
|
+
$sideHints.css("width", this.nonoSize);
|
|
84
|
+
$sideHints.css("height", this.dimensions[1] * tileSize);
|
|
85
|
+
|
|
86
|
+
let $rows = [];
|
|
87
|
+
for (let i = 0; i < this.dimensions[1]; i++) {
|
|
88
|
+
let $newRow = $sideHints.append(`<div class="row"></div>`).children().last();
|
|
89
|
+
$newRow.css("height", tileSize);
|
|
90
|
+
$rows.push($newRow);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
this.$field = this.$board.append(`<div class="nono-field"></div>`).children().last();
|
|
94
|
+
this.$field.css("width", this.dimensions[0] * tileSize);
|
|
95
|
+
this.$field.css("height", this.dimensions[1] * tileSize);
|
|
96
|
+
|
|
97
|
+
this.tiles = this.generateTiles();
|
|
98
|
+
this.hints = this.generateHints();
|
|
99
|
+
|
|
100
|
+
for (let i = 0; i < this.dimensions[0]; i++) {
|
|
101
|
+
for (let j = 0; j < this.hints[0][i].length; j++) {
|
|
102
|
+
$columns[i].append(`<p class="hint">${this.hints[0][i][j]}</p>`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
for (let i = 0; i < this.dimensions[1]; i++) {
|
|
107
|
+
for (let j = 0; j < this.hints[1][i].length; j++) {
|
|
108
|
+
$rows[i].append(`<p class="hint">${this.hints[1][i][j]}</p>`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (this.checkForSolve()) {
|
|
113
|
+
console.log("Randomly generated nothing!");
|
|
114
|
+
this.startNew();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
generateTiles() {
|
|
119
|
+
let tiles = [];
|
|
120
|
+
|
|
121
|
+
for (let i = 0; i < this.dimensions[0]; i++) {
|
|
122
|
+
for (let j = 0; j < this.dimensions[1]; j++) {
|
|
123
|
+
tiles.push(new NonoTile(
|
|
124
|
+
this,
|
|
125
|
+
this.$field,
|
|
126
|
+
[i, j],
|
|
127
|
+
1 - (this.difficulty / 10)
|
|
128
|
+
));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return tiles;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
generateHints() {
|
|
136
|
+
let hints = [[], []];
|
|
137
|
+
|
|
138
|
+
for (let i = 0; i < this.dimensions[0]; i++) {
|
|
139
|
+
let current = 0;
|
|
140
|
+
hints[0].push([]);
|
|
141
|
+
|
|
142
|
+
for (let j = 0; j < this.dimensions[1]; j++) {
|
|
143
|
+
if (this.tiles[j * this.dimensions[0] + i].correctState === "punched") current++;
|
|
144
|
+
else if (current > 0) {
|
|
145
|
+
hints[0][i].push(current);
|
|
146
|
+
current = 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (current > 0 || hints[0][i].length < 1) {
|
|
151
|
+
hints[0][i].push(current);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
for (let i = 0; i < this.dimensions[1]; i++) {
|
|
156
|
+
let current = 0;
|
|
157
|
+
hints[1].push([]);
|
|
158
|
+
|
|
159
|
+
for (let j = 0; j < this.dimensions[0]; j++) {
|
|
160
|
+
if (this.tiles[i * this.dimensions[0] + j].correctState === "punched") current++;
|
|
161
|
+
else if (current > 0) {
|
|
162
|
+
hints[1][i].push(current);
|
|
163
|
+
current = 0;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (current > 0 || hints[1][i].length < 1) hints[1][i].push(current);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return hints;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
checkForSolve() {
|
|
174
|
+
let solved = true;
|
|
175
|
+
|
|
176
|
+
for (let i = 0; i < this.tiles.length; i++) {
|
|
177
|
+
if (!this.tiles[i].solved) {
|
|
178
|
+
solved = false;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return solved;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
tryFinishGame() {
|
|
187
|
+
if (this.checkForSolve()) {
|
|
188
|
+
playerInventory.change({
|
|
189
|
+
item: this.goldItem,
|
|
190
|
+
amount: this.level + this.difficulty
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
let $tiles = $(".nono-tile");
|
|
194
|
+
$tiles.off("click");
|
|
195
|
+
$tiles.addClass("borderless");
|
|
196
|
+
$tiles = $(".nono-tile.marked");
|
|
197
|
+
$tiles.addClass("blank");
|
|
198
|
+
$tiles.removeClass("marked");
|
|
199
|
+
|
|
200
|
+
this.level++;
|
|
201
|
+
if (this.level > 10) {
|
|
202
|
+
this.difficulty += this.level - 10;
|
|
203
|
+
if (this.difficulty > 10) this.difficulty = 10;
|
|
204
|
+
this.level -= 10;
|
|
205
|
+
}
|
|
206
|
+
setTimeout(() => {this.startNew();}, 2000);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
let nonoGame = new NonoGame();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
.nono-spirit {
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 200px;
|
|
7
|
+
margin: 10px;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.nono-spirit img {
|
|
12
|
+
width: 100px;
|
|
13
|
+
height: 100px;
|
|
14
|
+
top: 50%;
|
|
15
|
+
left: 50%;
|
|
16
|
+
position: absolute;
|
|
17
|
+
image-rendering: pixelated;
|
|
18
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--nonoColor: rgb(87, 61, 53);
|
|
3
|
+
--nonoColorBright: rgb(187, 130, 113);
|
|
4
|
+
--nonoBG: rgb(61, 61, 61);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
#nono-board {
|
|
8
|
+
border: 2px solid black;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
align-items: flex-start;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.nono {
|
|
15
|
+
background-color: var(--nonoBG);
|
|
16
|
+
user-select: none;
|
|
17
|
+
image-rendering: pixelated;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.hints {
|
|
21
|
+
background-color: var(--nonoBG);
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
user-select: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.column {
|
|
29
|
+
border: 1px solid var(--nonoColor);
|
|
30
|
+
height: 100%;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
justify-content: flex-end;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.row {
|
|
38
|
+
border: 1px solid var(--nonoColor);
|
|
39
|
+
width: 100%;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
justify-content: flex-end;
|
|
43
|
+
user-select: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.hint {
|
|
47
|
+
width: 25px;
|
|
48
|
+
height: 25px;
|
|
49
|
+
margin: 0;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
user-select: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.nono-field {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
align-items: flex-start;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.nono-tile {
|
|
63
|
+
border: 1px solid var(--nonoColor);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.borderless {
|
|
68
|
+
border: none !important;
|
|
69
|
+
cursor: initial !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.nono-tile:hover {
|
|
73
|
+
border: 1px solid var(--nonoColorBright);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.blank {
|
|
77
|
+
background-color: white;
|
|
78
|
+
transition: all .1s ease;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.marked {
|
|
82
|
+
background-color: rgb(73, 80, 182);
|
|
83
|
+
transition: all .1s ease;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.punched {
|
|
87
|
+
background-color: rgb(0, 0, 0);
|
|
88
|
+
transition: all .1s ease;
|
|
89
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<p>
|
|
2
|
+
A random nono washes up on shore. Will you solve it?
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<hr>
|
|
6
|
+
|
|
7
|
+
<div class="nono-spirit">
|
|
8
|
+
<img id="move-nono-spirit" src="/img/logo.png" alt="Nono Spirit">
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div id="nono-board"></div>
|
|
12
|
+
|
|
13
|
+
<hr>
|
|
14
|
+
|
|
15
|
+
<a href="/the-front">
|
|
16
|
+
Go to The Front
|
|
17
|
+
</a>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
let lastPos = [0, 0];
|
|
21
|
+
|
|
22
|
+
let moveNono = function moveNono() {
|
|
23
|
+
let focus = $("#move-nono-spirit");
|
|
24
|
+
let newPos = [Math.floor(Math.random() * 200), Math.floor(Math.random() * 100)];
|
|
25
|
+
|
|
26
|
+
focus.animate({
|
|
27
|
+
left: newPos[0],
|
|
28
|
+
top: newPos[1],
|
|
29
|
+
}, 2000);
|
|
30
|
+
|
|
31
|
+
lastPos = newPos;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
moveNono();
|
|
35
|
+
|
|
36
|
+
setInterval(moveNono, 2000);
|
|
37
|
+
</script>
|
package/test/test-index.js
CHANGED