From b9079cde31ac7d4d39971e955dea6542e7431305 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sat, 25 Dec 2021 03:28:35 +0100 Subject: basic frontend --- src/app/index.html | 26 ++++++++++++++++++++++++++ src/app/main.css | 36 ++++++++++++++++++++++++++++++++++++ src/index.js | 25 +++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 src/app/index.html create mode 100644 src/app/main.css create mode 100644 src/index.js 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 @@ + + + + + + +
+
+
Welcome to Viper!
+
+ + +
+
+
+
Launch:
+
+ + +
+
+
+ + + + 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(); +}) + -- cgit v1.2.3