Skip to content

Commit

Permalink
[bugfix] fix snow animation looping
Browse files Browse the repository at this point in the history
  • Loading branch information
jackd248 committed Dec 19, 2016
1 parent 92c2776 commit 13ced4b
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 28 deletions.
Binary file modified assets/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"icon": "assets/app.png",
"description": "A simple but smart menubar weather app",
"main": "src/app.js",
"electronVersion": "1.4.7",
"electronVersion": "1.4.12",
"keywords": [
"electron",
"temperature",
Expand Down Expand Up @@ -45,11 +45,11 @@
"electron-packager": "^8.0.0",
"electron-prebuilt": "^1.4.1",
"electron-installer-dmg": "0.1.2",
"electron-builder": "8.3.0",
"electron-builder": "10.8.1",
"standard": "^8.3.0"
},
"dependencies": {
"electron": "1.4.10",
"electron": "1.4.12",
"menubar": "^5.1.0",
"auto-launch": "^5.0.1",
"applescript": "^1.0.0",
Expand All @@ -59,7 +59,7 @@
"chart.js": "^2.2.1",
"countup.js": "^1.7.1",
"semver": "^5.1.0",
"superagent": "^3.1.0",
"superagent": "^3.3.1",
"moment": "^2.17.1"
}
}
4 changes: 3 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ app.on('will-quit', function () {
const mb = menubar({
index: path.join('file://', __dirname, '/main/index.html'),
icon: path.join(__dirname, '/../assets/IconTemplate.png'),
width: 580,
width: 280,
height: 480,
resizable: false,
showDockIcon: false,
Expand Down Expand Up @@ -119,6 +119,8 @@ mb.on('show', function show () {

const appPath = app.getPath('exe').split('.app/Content')[0] + '.app';

console.log(appPath)

const appLauncher = new AutoLaunch({
name: 'temps',
path: appPath,
Expand Down
1 change: 1 addition & 0 deletions src/components/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,4 @@ exports.getGeolocation = getGeolocation
exports.getNumAnimTemp = getNumAnimTemp
exports.setNumAnimTemp = setNumAnimTemp
exports.getIcon = getIcon
exports.showSnow = showSnow
20 changes: 9 additions & 11 deletions src/main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,18 @@ <h1>
</div>
<div class="form-item small">
<label class="clear">
<div class="pull-left">Show weather in menubar</div>
<div class="pull-left">Show weather in menubar
<div class="menubar-icon">(
<select>
<option value="auto">auto</option>
<option value="white">white</option>
<option value="black">black</option>
</select>)
</div>
</div>
<div class="pull-right"><input type="checkbox" name="mb-info" value="true"><span class="fit"></span></div>
</label>
</div>
<div class="form-item small">
<div class="label pull-left">Menubar icon</div>
<div class="pull-right fit menubar-icon">
<select>
<option value="auto">auto</option>
<option value="white">white</option>
<option value="black">black</option>
</select>
</div>
</div>
<div class="form-item small">
<label class="clear">
<div class="pull-left">Start at login</div>
Expand Down
20 changes: 9 additions & 11 deletions src/main/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -547,19 +547,17 @@ input[type="checkbox"][name="favorite-city"]:checked + span {
}

.menubar-icon {
padding: 0;
padding: 5px 0 0 10px;
margin: 0;
border: 1px solid #999999;
display: inline;
width: 60px;
overflow: hidden;
background-color: #fff;
background: #fff url(../../assets/dropdown@2x.png) center right no-repeat;
}

.menubar-icon select {
padding: 5px 8px;
width: 130%;
padding: 0;
border: none;
color: #000;
box-shadow: none;
background-color: transparent;
background-image: none;
Expand Down Expand Up @@ -698,7 +696,7 @@ body {
.snow{
background: none;
font-family: Androgyne;
background-image: url('http://www.wearewebstars.dk/codepen/img/s1.png'), url('http://www.wearewebstars.dk/codepen/img//s2.png'), url('http://www.wearewebstars.dk/codepen/img//s3.png');
background-image: url(../../assets/s1.png), url(../../assets/s2.png), url(../../assets/s3.png);
height: 300px;
left: 0;
position: absolute;
Expand All @@ -712,19 +710,19 @@ body {
}
@keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 500px, 100px 200px, -100px 150px;}
100% {background-position: 0px 1000px, 0px 400px, 0px 300px;}
}
@-moz-keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 500px, 100px 200px, -100px 150px;}
100% {background-position: 0px 1000px, 0px 400px, 0px 300px;}
}
@-webkit-keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 500px, 100px 200px, -100px 150px;}
100% {background-position: 0px 1000px, 0px 400px, 0px 300px;}
}
@-ms-keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 500px, 100px 200px, -100px 150px;}
100% {background-position: 0px 1000px, 0px 400px, 0px 300px;}
}

#chartjs-tooltip {
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const toggleSettings = function () {
jQuery('#settings .content').fadeOut()
jQuery('#nav-icon').removeClass('open')
} else {
jQuery('#main').height('100px')
jQuery('#main').height('120px')
jQuery('#main .content').fadeOut()
jQuery('#main .actual-icon').fadeOut()
jQuery('#details').fadeOut()
Expand Down

0 comments on commit 13ced4b

Please sign in to comment.