From 9033eb6bade239df2597859f72a56a02239852f6 Mon Sep 17 00:00:00 2001
From: Sting <lallegre26@gmail.com>
Date: Mon, 21 Sep 2020 10:30:53 +0200
Subject: [PATCH] MISC: Basic skeleton for client + admin interface

---
 client/index.html   | 17 +++++++++++++++++
 client/main.js      |  0
 instance/index.html |  9 ++++++++-
 instance/main.js    | 20 ++++++++++++++++++--
 4 files changed, 43 insertions(+), 3 deletions(-)
 create mode 100644 client/index.html
 create mode 100644 client/main.js

diff --git a/client/index.html b/client/index.html
new file mode 100644
index 0000000..6666216
--- /dev/null
+++ b/client/index.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+        <title>Lektor App</title>
+        <!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
+        <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
+        <link rel="stylesheet" href="../style/bootstrap-4.5.2-dist/css/bootstrap.min.css">
+        <script src="../style/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
+        
+        <!-- main file running the express app -->
+        <script src='./main.js' type='text/javascript'></script>
+    </head>
+    <body>
+        
+    </body>
+</html>
\ No newline at end of file
diff --git a/client/main.js b/client/main.js
new file mode 100644
index 0000000..e69de29
diff --git a/instance/index.html b/instance/index.html
index a61ba4c..25e5721 100644
--- a/instance/index.html
+++ b/instance/index.html
@@ -5,8 +5,15 @@
         <title>Lektor App</title>
         <!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
         <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
+        <link rel="stylesheet" href="../style/bootstrap-4.5.2-dist/css/bootstrap.min.css">
+        <script src="../style/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
+
     </head>
     <body>
-        toto
+        <div class="container">
+            <h2 class="text-center">
+                LektorApp Admin Interface
+            </h2>
+        </div>
     </body>
 </html>
diff --git a/instance/main.js b/instance/main.js
index bcd71db..eb1e11b 100644
--- a/instance/main.js
+++ b/instance/main.js
@@ -1,11 +1,12 @@
 const electron = require('electron')
 const { app, BrowserWindow } = require('electron')
 
-function createWindow () {
+function createInstanceWindow () {
   // Create the browser window.
   const win = new BrowserWindow({
     width: 800,
     height: 600,
+    frame: false,
     webPreferences: {
       nodeIntegration: true
     }
@@ -15,4 +16,19 @@ function createWindow () {
   win.loadFile('instance/index.html')
 }
 
-app.whenReady().then(createWindow)
+
+function createExpressClient (){ 
+  const win = new BrowserWindow({ show: false });
+
+  win.loadFile('client/index.html');
+}
+
+
+
+
+
+app.on('ready', () => {
+  console.log('Ready');
+  createInstanceWindow();
+  createExpressClient();
+});
-- 
GitLab