notherbase-fs 1.2.4 → 1.2.7
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/explorer.js +10 -4
- package/controllers/the-front.js +4 -1
- package/package.json +1 -1
- package/public/styles/inventory.css +1 -1
- package/public/styles/main.css +7 -3
- package/public/styles/menu.css +16 -2
- package/views/explorer.ejs +7 -0
- package/views/head.ejs +2 -2
package/controllers/explorer.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const { inventory, game, item } = require("../models");
|
|
1
|
+
const { inventory, game, item, user } = require("../models");
|
|
2
|
+
const path = require('path');
|
|
2
3
|
|
|
3
4
|
let router = require("express").Router();;
|
|
4
5
|
let dir = "";
|
|
@@ -63,6 +64,7 @@ let complete = function complete(explorerBuild) {
|
|
|
63
64
|
|
|
64
65
|
router.get(currentRoute, async function(req, res) {
|
|
65
66
|
try {
|
|
67
|
+
const foundUser = await user.findById(req.session.currentUser);
|
|
66
68
|
const foundInventory = await inventory.findOne({ user: req.session.currentUser }).populate("items.item");
|
|
67
69
|
|
|
68
70
|
let serverScriptReturns = [];
|
|
@@ -84,7 +86,7 @@ let complete = function complete(explorerBuild) {
|
|
|
84
86
|
|
|
85
87
|
let context = {
|
|
86
88
|
siteTitle: "NotherBase",
|
|
87
|
-
user:
|
|
89
|
+
user: foundUser,
|
|
88
90
|
styles: detail.options.styles,
|
|
89
91
|
externalStyles: detail.options.externalStyles,
|
|
90
92
|
main: detail.options.main,
|
|
@@ -93,7 +95,9 @@ let complete = function complete(explorerBuild) {
|
|
|
93
95
|
itemIDs: foundItemIDs,
|
|
94
96
|
pov: req.query.pov,
|
|
95
97
|
inventory: foundInventory,
|
|
96
|
-
query: req.query
|
|
98
|
+
query: req.query,
|
|
99
|
+
dir: dir,
|
|
100
|
+
path: path
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
if (detail.options.needsKey !== "" && foundInventory) {
|
|
@@ -133,7 +137,9 @@ let complete = function complete(explorerBuild) {
|
|
|
133
137
|
localScripts: [],
|
|
134
138
|
inventory: null,
|
|
135
139
|
itemIDs: [],
|
|
136
|
-
main: `${dir}/${explorerBuild.void}/index
|
|
140
|
+
main: `${dir}/${explorerBuild.void}/index`,
|
|
141
|
+
dir: dir,
|
|
142
|
+
path: path
|
|
137
143
|
});
|
|
138
144
|
});
|
|
139
145
|
}
|
package/controllers/the-front.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { user, inventory, connectionSuccess } = require("../models");
|
|
2
|
+
const path = require('path');
|
|
2
3
|
|
|
3
4
|
let router = require("express").Router();
|
|
4
5
|
let dir = "";
|
|
@@ -51,7 +52,9 @@ let front = function front(detail) {
|
|
|
51
52
|
localScripts: detail.options.localScripts,
|
|
52
53
|
itemIDs: foundItemIDs,
|
|
53
54
|
inventory: null,
|
|
54
|
-
query: req.query
|
|
55
|
+
query: req.query,
|
|
56
|
+
dir: dir,
|
|
57
|
+
path: path
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
if (connectionSuccess) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
color: var(--textColor);
|
|
4
4
|
width: 100%;
|
|
5
5
|
height: 100%;
|
|
6
|
-
/* background-color: var(--bgColor); */
|
|
7
6
|
padding: 5px;
|
|
8
7
|
z-index: 500;
|
|
9
8
|
overflow: auto;
|
|
@@ -46,6 +45,7 @@
|
|
|
46
45
|
padding: 5px;
|
|
47
46
|
margin: 2.5px;
|
|
48
47
|
position: relative;
|
|
48
|
+
background-color: var(--bgColor);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.item-card button {
|
package/public/styles/main.css
CHANGED
|
@@ -41,7 +41,7 @@ body {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
main {
|
|
44
|
-
width:
|
|
44
|
+
width: 1000px;
|
|
45
45
|
min-height: 500px;
|
|
46
46
|
box-shadow: 5px 5px 5px 5px var(--shadowColor);
|
|
47
47
|
padding: 20px;
|
|
@@ -62,7 +62,7 @@ footer {
|
|
|
62
62
|
align-content: center;
|
|
63
63
|
align-items: flex-start;
|
|
64
64
|
min-height: 25px;
|
|
65
|
-
width:
|
|
65
|
+
width: 1000px;
|
|
66
66
|
background-color: var(--veryDarkBgColor);
|
|
67
67
|
border-radius: 0px 0px 5px 5px;
|
|
68
68
|
box-shadow: 5px 5px 5px 5px var(--shadowColor);
|
|
@@ -224,8 +224,12 @@ iframe {
|
|
|
224
224
|
font-size: 12px;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
@media only screen and (max-width:
|
|
227
|
+
@media only screen and (max-width: 1000px) {
|
|
228
228
|
main {
|
|
229
229
|
width: 100%;
|
|
230
230
|
}
|
|
231
|
+
|
|
232
|
+
footer {
|
|
233
|
+
width: 100%;
|
|
234
|
+
}
|
|
231
235
|
}
|
package/public/styles/menu.css
CHANGED
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
|
|
43
43
|
.ui button#menu {
|
|
44
44
|
position: fixed;
|
|
45
|
-
bottom:
|
|
46
|
-
right:
|
|
45
|
+
bottom: 15px;
|
|
46
|
+
right: 15px;
|
|
47
47
|
width: 64px;
|
|
48
48
|
height: 64px;
|
|
49
49
|
border-radius: 5px;
|
|
@@ -96,4 +96,18 @@
|
|
|
96
96
|
border-top: none;
|
|
97
97
|
border-radius: 0 0 5px 5px;
|
|
98
98
|
text-align: center;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@media only screen and (max-width: 1000px) {
|
|
102
|
+
.menu {
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 90vh;
|
|
105
|
+
top: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ui button#menu {
|
|
110
|
+
bottom: 5px;
|
|
111
|
+
right: 5px;
|
|
112
|
+
}
|
|
99
113
|
}
|
package/views/explorer.ejs
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<%- include("./head.ejs"); %>
|
|
2
2
|
|
|
3
3
|
<style>
|
|
4
|
+
<%- include(path.resolve(dir, "../", "public/styles/main.css")); %>
|
|
5
|
+
<%- include(path.resolve(dir, "../", "public/styles/menu.css")); %>
|
|
6
|
+
<%- include(path.resolve(dir, "../", "public/styles/inventory.css")); %>
|
|
7
|
+
<%- include(path.resolve(dir, "../", "public/styles/player.css")); %>
|
|
8
|
+
<%- include(path.resolve(dir, "../", "public/styles/account.css")); %>
|
|
9
|
+
<%- include(path.resolve(dir, "../", "public/styles/more.css")); %>
|
|
10
|
+
|
|
4
11
|
<% for (let i = 0; i < styles.length; i++) { %>
|
|
5
12
|
<%- include(`${styles[i]}.css`); %>
|
|
6
13
|
<% } %>
|
package/views/head.ejs
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
<!-- 'Redacted Script', cursive; -->
|
|
14
14
|
<link href="https://fonts.googleapis.com/css2?family=Redacted+Script:wght@300&display=swap" rel="stylesheet">
|
|
15
15
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
|
16
|
-
<link rel="stylesheet" href="/styles/main.css">
|
|
16
|
+
<!-- <link rel="stylesheet" href="/styles/main.css">
|
|
17
17
|
<link rel="stylesheet" href="/styles/menu.css">
|
|
18
18
|
<link rel="stylesheet" href="/styles/inventory.css">
|
|
19
19
|
<link rel="stylesheet" href="/styles/player.css">
|
|
20
20
|
<link rel="stylesheet" href="/styles/account.css">
|
|
21
|
-
<link rel="stylesheet" href="/styles/more.css">
|
|
21
|
+
<link rel="stylesheet" href="/styles/more.css"> -->
|
|
22
22
|
</head>
|
|
23
23
|
|
|
24
24
|
<body>
|