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 @@ +
+
+ Server Data + +
Save to Server
+
+

+ idk what else to put here so here's a picture of a cat:
+ +

+ + + +
\ No newline at end of file diff --git a/public/css/home.css b/public/css/home.css index 5c37f227..514d4f61 100644 --- a/public/css/home.css +++ b/public/css/home.css @@ -1404,3 +1404,15 @@ hr { font-size: 16px; font-family: 'Poppins-Regular'; } + +#announcement-banner { + display: inline-block; + text-align: left; + width: 98%; + padding: 1em; + margin-bottom: 0.5em; + border-radius: 16px; + color: var(--black); + background: var(--white); + border: 2px solid var(--green); +} \ No newline at end of file diff --git a/public/home.html b/public/home.html index 7805ede5..ae61a1da 100644 --- a/public/home.html +++ b/public/home.html @@ -77,6 +77,12 @@

Aspine

+ +
@@ -85,7 +91,7 @@

Aspine


- +
@@ -120,7 +126,7 @@

Aspine

- +

Aspine version: (loading…)