Skip to content

Commit d44a485

Browse files
committed
proper home screen
1 parent ab95e08 commit d44a485

File tree

8 files changed

+50
-9
lines changed

8 files changed

+50
-9
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<body>
1111
<div class="title">
1212
<div id="title">SymbiozUtils</div>
13-
<button onclick="alert('close')" id="close">X</button>
14-
<button onClick="alert('reduce')">_</button>
13+
<button onclick="navigator.quit()" id="close">X</button>
14+
<button onClick="navigator.reduce()">_</button>
1515
<div style="clear: both;"></div>
1616
</div>
1717
<div class="nav" id="nav">
@@ -24,7 +24,7 @@
2424
const package = require('./package.json');
2525
let navigator = new require('./js/navigator.js');
2626
console.log(navigator);
27-
id('title').innerHTML = 'Symbioz Utils v' + package.version;
27+
id('title').innerHTML = 'Symbioz Utils v' + package.version + ' - Tym17.com';
2828
navigator.navigate('home', {version: package.version});
2929
// You can also require other files to run in this process
3030
//require('./renderer.js')

js/navigator.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const { shell, remote } = require('electron');
12
const Mustache = require('mustache');
23
const fs = require('fs');
34

@@ -17,6 +18,20 @@ let Navigator = {
1718

1819
makePath: function(args) {
1920
console.log(args);
21+
},
22+
23+
url: function(u) {
24+
shell.openExternal(u);
25+
},
26+
27+
quit: function() {
28+
let window = remote.getCurrentWindow();
29+
window.close();
30+
},
31+
32+
reduce: function() {
33+
let window = remote.getCurrentWindow();
34+
window.minimize();
2035
}
2136
}
2237

scss/button.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ button:hover
1515
{
1616
background: $darkorange;
1717
border-bottom: darken($darkorange, 15) solid 2px;
18+
cursor: pointer;
1819
}

scss/main.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@import 'colors';
22
@import 'button';
33
@import 'title';
4+
@import 'menu';
5+
@import 'typography';
46

57
body
68
{
@@ -19,6 +21,6 @@ body
1921
padding-left: 20px;
2022
padding-right: 20px;
2123
padding-top: 10px;
22-
padding-bottom: 10px;
24+
padding-bottom: 30px;
2325
box-sizing: border-box;
2426
}

scss/menu.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.menu
2+
{
3+
display: flex;
4+
flex-direction: column;
5+
width: 50%;
6+
margin: auto;
7+
8+
button
9+
{
10+
font-size: 17px;
11+
margin-top: 3px;
12+
margin-bottom: 3px;
13+
}
14+
}

scss/title.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
transition-duration: 0.2s;
3333
-webkit-app-region: no-drag;
3434
transition-timing-function: ease-out;
35+
border-radius: 0;
3536
}
3637

3738
button:hover

scss/typography.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@import 'colors';
2+
3+
.text-lighter
4+
{
5+
color: $darkbrown;
6+
}

templates/home.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
<h1>Symbioz Utils {{version}}</h1>
2-
<button onclick="alert('hi')">test</button>
3-
<button onclick="alert('hi')">test</button>
4-
<button onclick="alert('hi')">test</button>
5-
<button onclick="alert('hi')">test</button>
1+
<h1 style="text-align: center;">Symbioz Utils {{version}}</h1>
2+
<div style="text-align: center; margin-top: -30px; margin-bottom: 20px;" class="text-lighter">Github.com/Tym17</div>
3+
<div class="menu">
4+
<button onclick="navigator.navigate('creator')">Create account</button>
5+
<button onclick="navigator.navigate('editacc')">Edit account</button>
6+
<button onclick="navigator.navigate('character')">Character editor</button>
7+
</div>

0 commit comments

Comments
 (0)