Skip to content

Commit 8e967d5

Browse files
authored
Merge pull request #15 from ShakeGuard/dev
Milestone 1
2 parents df26ff7 + c59fb71 commit 8e967d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2972
-376
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: HTML Check
2+
3+
on:
4+
push:
5+
6+
# Example from https://github.com/Cyb3r-Jak3/html5validator-action/wiki/Getting-Started
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2 # Requried with all actions
12+
- name: Checks HTML5
13+
uses: Cyb3r-Jak3/[email protected]
14+
with:
15+
root: html/

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Project libraries, no need to commit these as long as we have
2+
# a package-lock.json file in the repo.
3+
node_modules/
4+
5+
# Secret environment files, generated by the secrets.js script.
6+
# Never commit these!
7+
.secrets/
8+

.vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "pwa-node",
6+
"request": "launch",
7+
"name": "Download fresh .secrets directory",
8+
"skipFiles": [
9+
"<node_internals>/**"
10+
],
11+
// TODO: Write proper tests!
12+
// Remove the old .secrets directory before launching the downloadSecrets script:
13+
"preLaunchTask": "Remove .secrets",
14+
"program": "${workspaceFolder}/downloadSecrets.mjs"
15+
}
16+
]
17+
}

.vscode/removeSecrets.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
echo "removeSecrets.cmd is not implemented, remove the .secrets directory manually if needed."

.vscode/removeSecrets.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
# This script assumes that it's being launched from the VSCode workspace root,
4+
# i.e. the directory containing the `.git` and `.vscode` subdirectories.
5+
# Assert that's the case, exit if it isn't:
6+
[ -d "$PWD/.git" ] || { echo ".git directory doesn't exist! Make sure you're in the correct directory." >&2; exit 1; }
7+
[ -d "$PWD/.vscode" ] || { echo ".vscode directory doesn't exist! Make sure you're in the correct directory." >&2; exit 1; }
8+
9+
# "File exists" check adapted from StackOverflow answer https://stackoverflow.com/a/42097368 by Charles Duffy.
10+
# Thanks, Charles!
11+
12+
# Remove the .secrets directory
13+
if rm -r .secrets; then
14+
echo "Removed .secrets successfully."
15+
else
16+
echo "Could not remove .secrets: does it exist?"
17+
fi

.vscode/tasks.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Remove .secrets",
6+
"type": "shell",
7+
"command": "./.vscode/removeSecrets.sh",
8+
"windows": {
9+
// TODO: Implement Windows command, as well, or just make a Node script.
10+
"command": "./.vscode/removeSecrets.cmd"
11+
},
12+
"group": "build",
13+
"presentation": {
14+
"echo": true,
15+
"reveal": "always",
16+
"focus": false,
17+
"panel": "shared",
18+
"showReuseMessage": false,
19+
"clear": false
20+
}
21+
}
22+
]
23+
}

Magnitude.js

-120
This file was deleted.

data/articles.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[{
2+
"_id": "6271bc42351af81c4150c1ef",
3+
"title": "Geophysics of the Cascadia Subduction Zone",
4+
"authorName": "Professor Smarts",
5+
"authorID": null,
6+
"datePublished": "2022-05-03T23:05:10Z",
7+
"dateModified": "2022-05-03T23:05:10Z",
8+
"fileURL": "/article/cascadia/geophysics_cascadia.html"
9+
},{
10+
"_id": "6271bc42351af81c4150c1f0",
11+
"title": "Earthquakes For Dummies",
12+
"authorName": "Professor Smarts",
13+
"authorID": null,
14+
"datePublished": "2022-05-03T23:05:10Z",
15+
"dateModified": "2022-05-03T23:05:10Z",
16+
"fileURL": "/article/earthquakes_for_dummies.html"
17+
}]

data/categories.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[{
2+
"_id": "6271bc8a351af81c4150c1f8",
3+
"categoryName": "The Cascadia Subduction Zone",
4+
"authorName": "Professor Smarts",
5+
"authorID": null,
6+
"blurb": "Learn about British Columbia's major geological feature!",
7+
"datePublished": "2022-05-03T23:05:10Z",
8+
"articles": [
9+
{
10+
"$oid": "6271bc42351af81c4150c1ef"
11+
},
12+
{
13+
"$oid": "6271bc42351af81c4150c1f0"
14+
}
15+
]
16+
}]

data/items.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[{
2+
"_id": "6271baf9351af81c4150c1e7",
3+
"type": "bandages",
4+
"prettyName": "BAND-AID Bandages",
5+
"description": "BAND-AID makes bandages, they work as bandages. Good during disasters, perhaps.",
6+
"pictureURL": "/items/<imageFile>.png"
7+
},{
8+
"_id": "6271baf9351af81c4150c1e8",
9+
"type": "flashlight",
10+
"prettyName": "Flashlight",
11+
"description": "Electricity can go out so flashlights are a must.",
12+
"pictureURL": "/items/<imageFile>.png"
13+
}]

data/users.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[{
2+
"_id": "6271b990351af81c4150c1d3",
3+
"name": "Katy Petrova",
4+
"emailAddress": "[email protected]",
5+
"pwd": "$2b$10$lkogZxP4cIm0zHyk81G3suvvu48dhZRz1I1T5kSR1Ly85VZncaz5y",
6+
"avatarURL": "/avatar/<filename>.png",
7+
"dateJoined": {
8+
"$date": {
9+
"$numberLong": "1651619110000"
10+
}
11+
},
12+
"achievements": [
13+
"gettingStarted",
14+
"planKit",
15+
"finishKit"
16+
],
17+
"admin": true
18+
},{
19+
"_id": "6271b990351af81c4150c1d4",
20+
"name": "Alex Kong",
21+
"emailAddress": "[email protected]",
22+
"pwd": "$2b$10$dpUs.qr.pi5kESAzC69AZunfR1PEPxM5i8P.ayS6K5fWnHzm0ux4m",
23+
"avatarURL": "/avatar/<filename>.png",
24+
"dateJoined": {
25+
"$date": {
26+
"$numberLong": "1651704348000"
27+
}
28+
},
29+
"achievements": [
30+
"gettingStarted",
31+
"planKit",
32+
"finishKit"
33+
],
34+
"admin": false
35+
}
36+
]

0 commit comments

Comments
 (0)