Skip to content

Commit 1415290

Browse files
Apply design changes to make the app visually more sleek and minimal
1 parent 93cb594 commit 1415290

7 files changed

+76
-31
lines changed

css/starter-template.css

+34-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
body {
2-
padding-top: 55px;
2+
padding-top: 34px;
33
overflow-y:hidden;
44
}
55
.starter-template {
6-
padding: 15px 15px;
76
text-align: center;
87
}
98

109
.full-width{
11-
width:100% !important;
10+
/*width:50% !important;*/
1211
margin-bottom: 10px;
1312
font-size: 20px;
1413
}
@@ -17,12 +16,26 @@ h1 {
1716
font-size: 80px;
1817
}
1918

19+
.btn-success{
20+
display: none;
21+
}
22+
23+
.nav > li > a {
24+
padding: 5px 5px !important;
25+
margin-right: 0 !important;
26+
color: black;
27+
}
28+
2029
.nav-tabs > li {
2130
/* width = (100 / number of tabs). This example assumes 3 tabs. */
2231
width:33.33333%;
2332
text-align: center;
2433
}
2534

35+
.nav-tabs>li.active>a{
36+
font-weight:bold;
37+
}
38+
2639
.custom-btn{
2740
color: #fff;
2841
border-color: #fff;
@@ -33,7 +46,24 @@ h1 {
3346
border-color: #fff;
3447
}
3548

36-
.navbar {min-height:20px !important}
49+
.navbar {
50+
min-height:26px;
51+
line-height:26px;
52+
}
53+
54+
.navbar-brand{
55+
float: none;
56+
text-align: center;
57+
height: 30px;
58+
padding: 10px 15px;
59+
line-height: 33px;
60+
}
61+
62+
.navbar-toggle{
63+
padding: 0px 8px;
64+
margin-top: 4px;
65+
margin-bottom: 3px;
66+
}
3767

3868
/* xs < 768 */
3969
@media screen and (max-width: 767px) {

index.html

+18-24
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,12 @@ <h1 id="time">25:00</h1>
6363

6464
<div class="starter-template">
6565
<div class="row">
66-
<div class="col-md-4">
67-
<button type="button" class="btn btn-large btn-primary full-width" id="start">Start</button>
68-
</div>
69-
<div class="col-md-4">
70-
<button type="button" id="stop" class="btn btn-large btn-success full-width">Stop</button>
71-
</div>
72-
<div class="col-md-4">
73-
<button type="button" class="btn btn-large btn-danger full-width" id="reset">Reset</button>
66+
<div>
67+
<button type="button" class="btn btn-large btn-primary full-width" id="start"><span class="glyphicon glyphicon-play"></span></button>
68+
69+
<button type="button" id="stop" class="btn btn-large btn-success full-width"><span class="glyphicon glyphicon-pause"></span></button>
70+
71+
<button type="button" class="btn btn-large btn-danger full-width" id="reset"><span class="glyphicon glyphicon-repeat"></span></button>
7472
</div>
7573
</div>
7674
</div>
@@ -91,14 +89,12 @@ <h1 id="time_short">05:00</h1>
9189

9290
<div class="starter-template">
9391
<div class="row">
94-
<div class="col-md-4">
95-
<button type="button" class="btn btn-large btn-primary full-width" id="short_start">Start</button>
96-
</div>
97-
<div class="col-md-4">
98-
<button type="button" class="btn btn-large btn-success full-width" id="short_stop">Stop</button>
99-
</div>
100-
<div class="col-md-4">
101-
<button type="button" class="btn btn-large btn-danger full-width" id="short_reset">Reset</button>
92+
<div>
93+
<button type="button" class="btn btn-large btn-primary full-width" id="short_start"><span class="glyphicon glyphicon-play"></span></button>
94+
95+
<button type="button" class="btn btn-large btn-success full-width" id="short_stop"><span class="glyphicon glyphicon-pause"></span></button>
96+
97+
<button type="button" class="btn btn-large btn-danger full-width" id="short_reset"><span class="glyphicon glyphicon-repeat"></span></button>
10298
</div>
10399
</div>
104100
</div>
@@ -119,14 +115,12 @@ <h1 id="time_long">10:00</h1>
119115

120116
<div class="starter-template">
121117
<div class="row">
122-
<div class="col-md-4">
123-
<button type="button" class="btn btn-large btn-primary full-width" id="long_start">Start</button>
124-
</div>
125-
<div class="col-md-4">
126-
<button type="button" class="btn btn-large btn-success full-width" id="long_stop">Stop</button>
127-
</div>
128-
<div class="col-md-4">
129-
<button type="button" class="btn btn-large btn-danger full-width" id="long_reset">Reset</button>
118+
<div>
119+
<button type="button" class="btn btn-large btn-primary full-width" id="long_start"><span class="glyphicon glyphicon-play"></span></button>
120+
121+
<button type="button" class="btn btn-large btn-success full-width" id="long_stop"><span class="glyphicon glyphicon-pause"></span></button>
122+
123+
<button type="button" class="btn btn-large btn-danger full-width" id="long_reset"><span class="glyphicon glyphicon-repeat"></span></button>
130124
</div>
131125
</div>
132126
</div>

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var menubar = require('menubar');
44

55
const ipcMain = require('electron').ipcMain;
66

7-
var mb = menubar({dir:__dirname, tooltip: "Pomolectron", icon:__dirname + "/res/tomato.png", width:324, height:420, resizable: false, alwaysOnTop :true});
7+
var mb = menubar({dir:__dirname, tooltip: "Pomolectron", icon:__dirname + "/res/tomato.png", width:278, height:250, resizable: false, alwaysOnTop :true});
88

99
const contextMenu = electron.Menu.buildFromTemplate([
1010
{

js/app.js

+21
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,24 @@ $('#start').click(() => {
2121
}
2222

2323
startTimer(pomodoroTime, display);
24+
$('#stop').show();
25+
$('#start').hide();
2426
})
2527

2628
$('#stop').click(() => {
2729
stopTimer();
30+
$('#start').show();
31+
$('#stop').hide();
2832
});
2933

3034
$('#reset').click(() => {
3135
minutes = 25;
3236
seconds = 60;
3337
display.textContent = "25:00";
3438
resetTimer();
39+
40+
$('#start').show();
41+
$('#stop').hide();
3542
});
3643

3744
$('#short_start').click(() => {
@@ -42,17 +49,24 @@ $('#short_start').click(() => {
4249
}
4350

4451
startTimer(pomodoroTime, display_short);
52+
$('#short_stop').show();
53+
$('#short_start').hide();
4554
})
4655

4756
$('#short_stop').click(() => {
4857
stopTimer();
58+
$('#short_start').show();
59+
$('#short_stop').hide();
4960
});
5061

5162
$('#short_reset').click(() => {
5263
minutes = 5;
5364
seconds = 60;
5465
display_short.textContent = "05:00";
5566
resetTimer(display_short);
67+
68+
$('#short_start').show();
69+
$('#short_stop').hide();
5670
});
5771

5872
$('#long_start').click(() => {
@@ -63,17 +77,24 @@ $('#long_start').click(() => {
6377
}
6478

6579
startTimer(pomodoroTime, display_long);
80+
81+
$('#long_stop').show();
82+
$('#long_start').hide();
6683
})
6784

6885
$('#long_stop').click(() => {
6986
stopTimer();
87+
$('#long_start').show();
88+
$('#long_stop').hide();
7089
});
7190

7291
$('#long_reset').click(() => {
7392
minutes = 10;
7493
seconds = 60;
7594
display_long.textContent = "10:00";
7695
resetTimer();
96+
$('#long_start').show();
97+
$('#long_stop').hide();
7798
});
7899

79100
function startTimer(duration, display) {

js/notification.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function notifyUser() {
1515
Notification.requestPermission();
1616
else {
1717
var notification = new Notification('Buzzz!! Time\'s up', {
18-
icon: 'https://raw.githubusercontent.com/amitmerchant1990/pomolectron/master/res/tomato-big.png',
18+
icon: 'res/tomato-big.png',
1919
body: "Hey there! You've been notified!"
2020
});
2121

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pomolectron",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "A pomodoro app in your menubar/tray.",
55
"main": "index.js",
66
"productName": "Pomolectron",

res/pomodoro.PNG

123 KB
Loading

0 commit comments

Comments
 (0)