mirror of
https://github.com/danbulant/ester-klient
synced 2026-05-24 12:35:44 +00:00
Working on chat & simple graphics
This commit is contained in:
parent
084fe5e0a4
commit
bee04e1339
16 changed files with 41522 additions and 18 deletions
25
index.js
25
index.js
|
|
@ -1,4 +1,4 @@
|
||||||
const { app, BrowserWindow } = require('electron')
|
const { app, protocol, session, ipcMain, globalShortcut, BrowserWindow, Menu } = require('electron');
|
||||||
|
|
||||||
var win;
|
var win;
|
||||||
|
|
||||||
|
|
@ -6,17 +6,34 @@ function createWindow() {
|
||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
|
fullscreen: true,
|
||||||
|
autoHideMenuBar: true,
|
||||||
|
kiosk: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true
|
nodeIntegration: true,
|
||||||
|
nodeIntegrationInWorker: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
globalShortcut.register('f11', () => {
|
||||||
|
//win.setKiosk(!win.isKiosk());
|
||||||
|
win.setFullScreen(!win.isFullScreen());
|
||||||
|
});
|
||||||
|
|
||||||
if (process.env.NODE_ENV == "dev") {
|
if (process.env.NODE_ENV == "dev") {
|
||||||
win.loadFile('view/index.html')
|
win.webContents.openDevTools()
|
||||||
|
|
||||||
|
globalShortcut.register('Ctrl+Alt+Escape', () => {
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
globalShortcut.register('ctrl+r', () => { });
|
||||||
|
window.onbeforeunload = (e) => {
|
||||||
|
e.returnValue = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
win.loadFile('view/index.html')
|
||||||
win.removeMenu();
|
win.removeMenu();
|
||||||
win.setMenu(null);
|
win.setMenu(null);
|
||||||
win.webContents.openDevTools()
|
|
||||||
|
|
||||||
win.on('closed', () => {
|
win.on('closed', () => {
|
||||||
win = null
|
win = null
|
||||||
|
|
|
||||||
11
view/assets/fonts/tuffy/LICENSE.txt
Normal file
11
view/assets/fonts/tuffy/LICENSE.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
We, the copyright holders of this work, hereby release it into the
|
||||||
|
public domain. This applies worldwide.
|
||||||
|
|
||||||
|
In case this is not legally possible,
|
||||||
|
|
||||||
|
We grant any entity the right to use this work for any purpose, without
|
||||||
|
any conditions, unless such conditions are required by law.
|
||||||
|
|
||||||
|
Thatcher Ulrich <tu@tulrich.com> http://tulrich.com
|
||||||
|
Karoly Barta bartakarcsi@gmail.com
|
||||||
|
Michael Evans http://www.evertype.com
|
||||||
BIN
view/assets/fonts/tuffy/Tuffy.otf
Normal file
BIN
view/assets/fonts/tuffy/Tuffy.otf
Normal file
Binary file not shown.
BIN
view/assets/fonts/tuffy/Tuffy.ttf
Normal file
BIN
view/assets/fonts/tuffy/Tuffy.ttf
Normal file
Binary file not shown.
41357
view/assets/fonts/tuffy/tuffy_regular.sfd
Normal file
41357
view/assets/fonts/tuffy/tuffy_regular.sfd
Normal file
File diff suppressed because it is too large
Load diff
BIN
view/assets/images/background.jpg
Normal file
BIN
view/assets/images/background.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,004 KiB |
BIN
view/assets/images/esterMain.png
Normal file
BIN
view/assets/images/esterMain.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 775 KiB |
17
view/assets/scripts/gridstack.js
Normal file
17
view/assets/scripts/gridstack.js
Normal file
File diff suppressed because one or more lines are too long
1
view/assets/scripts/gridstack.min.map
Normal file
1
view/assets/scripts/gridstack.min.map
Normal file
File diff suppressed because one or more lines are too long
2
view/assets/scripts/jquery.min.js
vendored
Normal file
2
view/assets/scripts/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
0
view/calendar.js
Normal file
0
view/calendar.js
Normal file
|
|
@ -8,8 +8,8 @@
|
||||||
if (typeof module === 'object') { window.module = module; module = undefined; }
|
if (typeof module === 'object') { window.module = module; module = undefined; }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
|
<script src="./assets/scripts/jquery.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/gridstack@0.5.5/dist/gridstack.all.js"></script>
|
<script src="./assets/scripts/gridstack.js"></script>
|
||||||
|
|
||||||
<script>if (window.module) module = window.module;</script>
|
<script>if (window.module) module = window.module;</script>
|
||||||
|
|
||||||
|
|
@ -17,12 +17,31 @@
|
||||||
<link rel="stylesheet" href="./main.css">
|
<link rel="stylesheet" href="./main.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="grid-stack">
|
<div class="contents">
|
||||||
<div class="grid-stack-item" data-gs-x="0" data-gs-y="0" data-gs-width="4" data-gs-height="2">
|
<div class="widgets content-item">
|
||||||
<div class="grid-stack-item-content">my first widget</div>
|
<div class="avatar">
|
||||||
|
<img class="avatar--img" id="avatar" src="assets/images/esterMain.png">
|
||||||
|
<h1 class="avatar--text" id="username">USERNAME</h1>
|
||||||
|
</div>
|
||||||
|
<div class="grid-stack">
|
||||||
|
<!-- Movable widgets, generated at runtime -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chat content-item">
|
||||||
|
<div class="chat--content">
|
||||||
|
<div class="chat--divider">
|
||||||
|
Dnes
|
||||||
|
</div>
|
||||||
|
<div class="chat--sent">
|
||||||
|
Ahoj!
|
||||||
|
</div>
|
||||||
|
<div class="chat--response">
|
||||||
|
Ahoj
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chat--form">
|
||||||
|
<input id="input" type="text" class="chat--input">
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-stack-item" data-gs-x="4" data-gs-y="0" data-gs-width="4" data-gs-height="4">
|
|
||||||
<div class="grid-stack-item-content">another widget!</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -30,7 +49,11 @@
|
||||||
$('.grid-stack').gridstack({
|
$('.grid-stack').gridstack({
|
||||||
animate: true
|
animate: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var grid = $('.grid-stack').data('gridstack');
|
||||||
|
grid.enableResize(true, true);
|
||||||
</script>
|
</script>
|
||||||
<script src="./index.js"></script>
|
<script src="./user.js"></script>
|
||||||
|
<script src="./calendar.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,16 +1,88 @@
|
||||||
html {
|
html {
|
||||||
background: url("./assets/images/scenic-landscape-1493434907dkG.jpg");
|
background: url("./assets/images/background.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
/*backdrop-filter: blur(3px);*/
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.grid-stack-item {
|
.contents {
|
||||||
backdrop-filter: blur(15px);
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.content-item {
|
||||||
|
width: 50%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.grid-stack-item-content {
|
||||||
|
backdrop-filter: blur(25px);
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
color: white;
|
color: white;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
margin: 5px;
|
||||||
|
backdrop-filter: blur(25px);
|
||||||
|
color: white;
|
||||||
|
border-radius: 140px 15px 15px 140px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.avatar--img {
|
||||||
|
height: 140;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.avatar--text {
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 145px;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-top: 56px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat--content {
|
||||||
|
height: calc(100% - 20px);
|
||||||
|
}
|
||||||
|
.chat--divider {
|
||||||
|
color: grey;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat--sent {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat--response {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.chat--input {
|
||||||
|
width: 100%;
|
||||||
|
height: 20px;
|
||||||
|
color: white;
|
||||||
|
background-color: transparent;
|
||||||
|
position: relative;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 2px solid white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat--input::focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Tuffy;
|
||||||
|
src: url("assets/fonts/tuffy/Tuffy.otf") format("opentype");
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3 {
|
||||||
|
font-family: Tuffy;
|
||||||
}
|
}
|
||||||
4
view/user.js
Normal file
4
view/user.js
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
const username = "Daniel Bulant";
|
||||||
|
|
||||||
|
var accountElement = document.getElementById("username");
|
||||||
|
accountElement.innerText = username;
|
||||||
Loading…
Reference in a new issue