diff --git a/client/index.html b/client/index.html new file mode 100644 index 0000000000000000000000000000000000000000..66662165ee6a4e94417b761d4806854df88d6f95 --- /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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/instance/index.html b/instance/index.html index a61ba4c5468521a75476159e49a33fd71a6620e0..25e572150024b8be14e773eddd858208ee90dce0 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 bcd71db04b2237daf79e67663638b1f0c07676d3..eb1e11b8bb9de794422b95bc701523321e4ddd8d 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(); +});