From d569e7fb3d2a7fcd1982df65e84f28ede0e61a54 Mon Sep 17 00:00:00 2001
From: ThomasMoraine-R <118221547+splice-7@users.noreply.github.com>
Date: Fri, 17 Feb 2023 13:36:45 +0000
Subject: [PATCH 1/2] Added admin tab and announcement banner
---
.replit | 77 +++++++++++++++++++++++++++++++++++++
data.json | 8 ++++
package-lock.json | 11 ++++++
package.json | 1 +
public/adminTab.html | 46 ++++++++++++++++++++++
public/css/home.css | 12 ++++++
public/home.html | 11 +++++-
public/js/extraFunctions.js | 25 ++++++++++++
replit.nix | 8 ++++
serve.js | 44 ++++++++++++++++++++-
10 files changed, 240 insertions(+), 3 deletions(-)
create mode 100644 .replit
create mode 100644 data.json
create mode 100644 public/adminTab.html
create mode 100644 replit.nix
diff --git a/.replit b/.replit
new file mode 100644
index 00000000..95b1e626
--- /dev/null
+++ b/.replit
@@ -0,0 +1,77 @@
+
+hidden = [".config", ".editorconfig", ".gitattributes", ".gitignore", ".gitnore", ".github"]
+run = "npm run start"
+
+[[hints]]
+regex = "Error \\[ERR_REQUIRE_ESM\\]"
+message = "We see that you are using require(...) inside your code. We currently do not support this syntax. Please use 'import' instead when using external modules. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)"
+
+[nix]
+channel = "stable-22_05"
+
+[env]
+XDG_CONFIG_HOME = "/home/runner/.config"
+PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin"
+npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global"
+
+[gitHubImport]
+requiredFiles = [".replit", "replit.nix", ".config"]
+
+[packager]
+language = "nodejs"
+
+ [packager.features]
+ packageSearch = true
+ guessImports = true
+ enabledForHosting = false
+
+[unitTest]
+language = "nodejs"
+
+[debugger]
+support = true
+
+ [debugger.interactive]
+ transport = "localhost:0"
+ startCommand = [ "dap-node" ]
+
+ [debugger.interactive.initializeMessage]
+ command = "initialize"
+ type = "request"
+
+ [debugger.interactive.initializeMessage.arguments]
+ clientID = "replit"
+ clientName = "replit.com"
+ columnsStartAt1 = true
+ linesStartAt1 = true
+ locale = "en-us"
+ pathFormat = "path"
+ supportsInvalidatedEvent = true
+ supportsProgressReporting = true
+ supportsRunInTerminalRequest = true
+ supportsVariablePaging = true
+ supportsVariableType = true
+
+ [debugger.interactive.launchMessage]
+ command = "launch"
+ type = "request"
+
+ [debugger.interactive.launchMessage.arguments]
+ args = []
+ console = "externalTerminal"
+ cwd = "."
+ environment = []
+ pauseForSourceMap = false
+ program = "./index.js"
+ request = "launch"
+ sourceMaps = true
+ stopOnEntry = false
+ type = "pwa-node"
+
+[languages]
+
+[languages.javascript]
+pattern = "**/{*.js,*.jsx,*.ts,*.tsx}"
+
+[languages.javascript.languageServer]
+start = "typescript-language-server --stdio"
diff --git a/data.json b/data.json
new file mode 100644
index 00000000..3b40e16b
--- /dev/null
+++ b/data.json
@@ -0,0 +1,8 @@
+{
+ "announcement": {
+ "content": "Hey, lookat that! It's a new Aspine update! You probably don't care, but for the two people that do care, you can check out the change logs by scrolling down in the info tab. These announcements will show up every once in a while, informing you of any upcoming events, school news, or anything else.
- The Aspine DevsP.S. Admins, to edit the announcement, go to the super secret admin tab",
+ "content-type": "html",
+ "shown": true
+ },
+ "note for dev team": "this system is expandable, feel free to use this file for additional features"
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index eb1246dd..588da8e7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,6 +24,7 @@
"express-session": "^1.17.1",
"file-saver": "^2.0.5",
"fs-extra": "^9.1.0",
+ "fullcalendar": "^5.11.3",
"jquery": "^3.6.0",
"jsdom": "^16.5.2",
"marked": "^4.0.10",
@@ -775,6 +776,11 @@
"node": ">=10"
}
},
+ "node_modules/fullcalendar": {
+ "version": "5.11.3",
+ "resolved": "https://registry.npmjs.org/fullcalendar/-/fullcalendar-5.11.3.tgz",
+ "integrity": "sha512-SgqiMEA+lWLyEd2jEwtIxdfx41j2CZr4KK00D2Gepj1MnGOjaEi13athnU6xvqMQXXjgJNj+vmlUP69QiuGncQ=="
+ },
"node_modules/graceful-fs": {
"version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
@@ -2181,6 +2187,11 @@
"universalify": "^2.0.0"
}
},
+ "fullcalendar": {
+ "version": "5.11.3",
+ "resolved": "https://registry.npmjs.org/fullcalendar/-/fullcalendar-5.11.3.tgz",
+ "integrity": "sha512-SgqiMEA+lWLyEd2jEwtIxdfx41j2CZr4KK00D2Gepj1MnGOjaEi13athnU6xvqMQXXjgJNj+vmlUP69QiuGncQ=="
+ },
"graceful-fs": {
"version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
diff --git a/package.json b/package.json
index 3e625ad3..b1c559e6 100644
--- a/package.json
+++ b/package.json
@@ -44,6 +44,7 @@
"express-session": "^1.17.1",
"file-saver": "^2.0.5",
"fs-extra": "^9.1.0",
+ "fullcalendar": "^5.11.3",
"jquery": "^3.6.0",
"jsdom": "^16.5.2",
"marked": "^4.0.10",
diff --git a/public/adminTab.html b/public/adminTab.html
new file mode 100644
index 00000000..aedabfd2
--- /dev/null
+++ b/public/adminTab.html
@@ -0,0 +1,46 @@
+
+ idk what else to put here so here's a picture of a cat:
+
+
Aspine version: (loading…)