diff options
author | 0neGal <mail@0negal.com> | 2021-12-25 03:28:35 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2021-12-25 03:28:35 +0100 |
commit | b9079cde31ac7d4d39971e955dea6542e7431305 (patch) | |
tree | 5f4799a6d13186b31d821390a55a976398da47d6 | |
parent | 208e7528a2e120c954e7eb28e93510b1b9240905 (diff) | |
download | Viper-b9079cde31ac7d4d39971e955dea6542e7431305.tar.gz Viper-b9079cde31ac7d4d39971e955dea6542e7431305.zip |
basic frontend
-rw-r--r-- | src/app/index.html | 26 | ||||
-rw-r--r-- | src/app/main.css | 36 | ||||
-rw-r--r-- | src/index.js | 25 |
3 files changed, 87 insertions, 0 deletions
diff --git a/src/app/index.html b/src/app/index.html new file mode 100644 index 0000000..c2bb777 --- /dev/null +++ b/src/app/index.html @@ -0,0 +1,26 @@ +<html> + <head> + <meta name="viewport" content="width=device-width,initial-scale=1.0"> + <link rel="stylesheet" href="main.css"> + </head> + <body> + <div class="lines"> + <div class="line"> + <div class="text">Welcome to Viper!</div> + <div class="buttons"> + <button id="update">Update</button> + <button id="setpath">Game Path</button> + </div> + </div> + <div class="line"> + <div class="text">Launch:</div> + <div class="buttons"> + <button id="vanilla">Vanilla</button> + <button id="northstar">Northstar</button> + </div> + </div> + </div> + + <script src="main.js"></script> + </body> +</html> diff --git a/src/app/main.css b/src/app/main.css new file mode 100644 index 0000000..a9dbc9d --- /dev/null +++ b/src/app/main.css @@ -0,0 +1,36 @@ +:root { + --background: #4C515B; + --foreground: #DDE2EB; +} + +body, button, input { + font-size: 18px; + font-weight: 700; + overflow: hidden; + color: var(--foreground); + text-transform: uppercase; + background: var(--background); + font-family: "Roboto Mono", monospace; +} + +.line { + display: flex; + margin-top: 15px; +} + +.buttons { + margin-left: auto; + margin-right: 7px; +} + +button, .text { + border: none; + outline: none; + padding: 5px 15px; + border-radius: 50px; +} + +#update {background: #81A1C1} +#setpath {background: #5E81AC} +#vanilla {background: #656E7F} +#northstar {background: #C7777F} diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..50f2b6e --- /dev/null +++ b/src/index.js @@ -0,0 +1,25 @@ +const path = require("path"); +const { app, BrowserWindow } = require("electron"); + +function start() { + win = new BrowserWindow({ + width: 500, + height: 115, + show: false, + title: "Viper", + webPreferences: { + nodeIntegration: true, + contextIsolation: false, + }, + }); win.openDevTools() + + win.removeMenu(); + win.loadFile(__dirname + "/app/index.html"); + win.webContents.once("dom-ready", () => {win.show()}); +} + +app.on("ready", () => { + app.setPath("userData", path.join(app.getPath("cache"), app.name)); + start(); +}) + |