diff --git a/.env b/.env deleted file mode 100644 index 6ce384e..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -BROWSER=none diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..78dcf21 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,19 @@ +{ + "extends": ["standard", "react-app"], + "rules": { + "array-bracket-spacing": "error", + "no-lonely-if": "warn", + "arrow-parens": "error", + "no-var": "error", + "prefer-const": "error", + "max-len": [ + "warn", + { + "code": 155, + "tabWidth": 2, + "ignoreComments": true + } + ], + "quote-props": "warn" + } +} \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md deleted file mode 100644 index 4deb8d5..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Witchery: Resurrected Website - -The source code for https://witchery.msrandom.net diff --git a/package.json b/package.json index 038a86c..f822fa2 100644 --- a/package.json +++ b/package.json @@ -1,33 +1,19 @@ { "name": "witchery-resurrected-web", "version": "0.1.0", - "private": true, - "dependencies": { - "@material-ui/core": "^4.12.1", - "@material-ui/icons": "^4.11.2", - "@testing-library/jest-dom": "^5.11.4", - "@testing-library/react": "^11.1.0", - "@testing-library/user-event": "^12.1.10", - "caniuse-lite": "^1.0.30001332", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-infinite-scroller": "^1.2.4", - "react-router": "^5.2.0", - "react-router-dom": "^5.2.0", - "react-scripts": "4.0.3", - "web-vitals": "^1.0.1" - }, + "description": "Witchery: Resurrected aims to recreate and improve the popular Witchery Minecraft mod in modern versions; with a focus on customizability.", "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" + "dev": "react-scripts start", + "build": "react-scripts build" }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] + "repository": { + "type": "git", + "url": "git+https://github.com/WitcheryResurrected/WitcheryResurrectedWeb.git" + }, + "author": "msrandom", + "license": "MIT", + "bugs": { + "url": "https://github.com/WitcheryResurrected/WitcheryResurrectedWeb/issues" }, "browserslist": { "production": [ @@ -40,5 +26,17 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "keywords": [], + "dependencies": { + "@material-ui/core": "^4.12.4", + "@material-ui/icons": "^4.11.3", + "eslint": "^8.14.0", + "eslint-config-react-app": "^7.0.1", + "eslint-config-standard": "^17.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "react-router-dom": "^6.3.0", + "react-scripts": "^5.0.1" } } diff --git a/public/assets/css/main.css b/public/assets/css/main.css deleted file mode 100644 index 32c5959..0000000 --- a/public/assets/css/main.css +++ /dev/null @@ -1,33 +0,0 @@ -@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap'); - -body { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - overflow-x: hidden; - -webkit-font-smoothing: antialiased; - font-family: 'Roboto', sans-serif; - - background-color: #171719; - color: #fbf8ec; -/* background-image: url("/assets/images/background.png"); - background-attachment: fixed; - background-size: cover; - background-position: center; - background-repeat: no-repeat;*/ -} - -#root { - width: 100%; - height: 100%; - overflow-y: auto; -} - -.content { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; -} diff --git a/public/assets/images/favicon.ico b/public/assets/images/favicon.ico index 0de03a4..6e12242 100644 Binary files a/public/assets/images/favicon.ico and b/public/assets/images/favicon.ico differ diff --git a/public/index.html b/public/index.html index 24df46a..8422651 100644 --- a/public/index.html +++ b/public/index.html @@ -1,22 +1,24 @@ - + - - - - + + + + - - - + + + Witchery: Resurrected + -
+ +
diff --git a/public/assets/manifest.json b/public/manifest.json similarity index 100% rename from public/assets/manifest.json rename to public/manifest.json diff --git a/src/App.js b/src/App.js deleted file mode 100644 index 5f19c9d..0000000 --- a/src/App.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react"; -import {BrowserRouter} from "react-router-dom"; -import {Route, Switch} from "react-router"; -import {NavbarComponent} from "./components/NavbarComponent"; - -import HomePage from "./pages/HomePage"; -import DownloadsPage from "./pages/DownloadsPage"; -import AdminPage from "./pages/AdminPage"; -import AboutPage from "./pages/AboutPage"; - -export default class App extends React.Component { - - render() { - return ( -
- - - - - - - - - - - -
- ); - } -} \ No newline at end of file diff --git a/src/assets/fonts/ChildWitch-z8ABL.ttf b/src/assets/fonts/ChildWitch-z8ABL.ttf new file mode 100644 index 0000000..0578b5c Binary files /dev/null and b/src/assets/fonts/ChildWitch-z8ABL.ttf differ diff --git a/src/assets/images/404.png b/src/assets/images/404.png new file mode 100644 index 0000000..d289115 Binary files /dev/null and b/src/assets/images/404.png differ diff --git a/public/assets/images/background.png b/src/assets/images/background.png similarity index 100% rename from public/assets/images/background.png rename to src/assets/images/background.png diff --git a/src/assets/images/bat_bauble.png b/src/assets/images/bat_bauble.png new file mode 100644 index 0000000..e73e505 Binary files /dev/null and b/src/assets/images/bat_bauble.png differ diff --git a/src/assets/images/candle_bauble.png b/src/assets/images/candle_bauble.png new file mode 100644 index 0000000..41b22cf Binary files /dev/null and b/src/assets/images/candle_bauble.png differ diff --git a/public/assets/images/logo.png b/src/assets/images/logo.png similarity index 100% rename from public/assets/images/logo.png rename to src/assets/images/logo.png diff --git a/src/assets/images/potion_bauble.png b/src/assets/images/potion_bauble.png new file mode 100644 index 0000000..9d36c50 Binary files /dev/null and b/src/assets/images/potion_bauble.png differ diff --git a/src/assets/images/skull_bauble.png b/src/assets/images/skull_bauble.png new file mode 100644 index 0000000..40ea6b1 Binary files /dev/null and b/src/assets/images/skull_bauble.png differ diff --git a/src/assets/videos/background.webm b/src/assets/videos/background.webm new file mode 100644 index 0000000..19f7091 Binary files /dev/null and b/src/assets/videos/background.webm differ diff --git a/src/client/AdminPanel.jsx b/src/client/AdminPanel.jsx new file mode 100644 index 0000000..9042a4a --- /dev/null +++ b/src/client/AdminPanel.jsx @@ -0,0 +1,154 @@ +import React from 'react' + +import './styles/AdminPanel.css' + +class Dependency extends React.Component { + id = `${this.props.fileID}.dependencies[${this.props.index}]` + + render () { + return ( +
+ + + + {this.props.children} +
+ ) + } +} + +class File extends React.Component { + id = `files[${this.props.index}]` + + state = { + dependencies: [] + } + + render () { + return ( +
+ {this.props.children} + + + + + + + +
+
+ {this.state.dependencies} +
+ + +
+
+ ) + } + + addDep (e) { + if (e) e.preventDefault() + + const key = parseInt(this.state.dependencies[this.state.dependencies.length - 1]?.key || -1) + 1 + + this.setState({ + dependencies: [ + ...this.state.dependencies, + + + + ] + }) + } + + removeDep (id, e) { + if (e) e.preventDefault() + + const index = this.state.dependencies.findIndex((f) => parseInt(f.key) === id) + + this.setState({ + dependencies: [ + ...this.state.dependencies.slice(0, index), + ...this.state.dependencies.slice(index + 1) + ] + }) + } +} + +class AdminPanel extends React.Component { + state = { + files: [] + } + + componentDidMount () { + return this.addFile() + } + + render () { + return ( +
+
+
+ +