Skip to content

Commit

Permalink
Merge pull request #145 from BoatsAreRockable/nwjs-013
Browse files Browse the repository at this point in the history
Merge Nwjs-013 branch with master
  • Loading branch information
Charlie Lee committed Apr 26, 2016
2 parents e4d5579 + 28fb276 commit 5c2dc2b
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 189 deletions.
9 changes: 5 additions & 4 deletions app/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<div class="content">
<h1>Boats Animator</h1>
<h2><span id="app-version"></span></h2>
<p>Boats Animator is a free cross-platform stop motion animation program created using HTML5, JavaScript, and WebRTC. Want to help out? <a href="#" onclick="gui.Shell.openExternal('https://github.com/BoatsAreRockable/animator/issues')">Report any issues</a> you come across or <a href="#" onclick="gui.Shell.openExternal('https://github.com/BoatsAreRockable/animator/blob/master/CONTRIBUTING.md')">contribute code</a>!</p>
<button onclick="gui.Shell.openExternal('https://github.com/BoatsAreRockable/animator/blob/master/LICENSE')"><i class="fa fa-legal"></i><span>License</span></button>
<button onclick="gui.Shell.openExternal('https://github.com/BoatsAreRockable/animator/graphs/contributors')"><i class="fa fa-list-ul"></i><span>Credits</span></button>
<button onclick="gui.Shell.openExternal('http://charlielee.uk/animator')"><i class="fa fa-tv"></i><span>Website</span></button>
<p>Boats Animator is a free cross-platform stop motion animation program created using HTML5, JavaScript, and WebRTC. Want to help out? <a href="#" onclick="utils.openURL('https://github.com/BoatsAreRockable/animator/issues')">Report any issues</a> you come across or <a href="#" onclick="utils.openURL('https://github.com/BoatsAreRockable/animator/blob/master/CONTRIBUTING.md')">contribute code</a>!</p>
<button onclick="utils.openURL('https://github.com/BoatsAreRockable/animator/blob/master/LICENSE')"><i class="fa fa-legal"></i><span>License</span></button>
<button onclick="utils.openURL('https://github.com/BoatsAreRockable/animator/graphs/contributors')"><i class="fa fa-list-ul"></i><span>Credits</span></button>
<button onclick="utils.openURL('http://charlielee.uk/animator')"><i class="fa fa-tv"></i><span>Website</span></button>
</div>
</div>

Expand All @@ -27,6 +27,7 @@ <h2><span id="app-version"></span></h2>
</ul>
</div>

<script src="js/utils.js"></script>
<script src="js/about.js" async></script>
</body>
</html>
7 changes: 1 addition & 6 deletions app/animator.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,10 @@ <h2><i class="fa fa-download fa-fw"></i> Export</h2>
<li>Frame <span id="current-frame">0</span> of <span id="num-of-frames">0</span></li>
<li id="current-frame-rate"><span></span> FPS</li>
<li class="no-pipe" id="current-mode"><span></span> mode</li>
<li id="statusBar-dev" class="no-pipe">
<!--Debugging Options-->
<button id="btn-open-dev-tools">Dev tools</button>
<button id="btn-reload-page">Refresh</button>
</li>
</ul>
</div>

<script src="js/utils.js"></script>
<script src="js/utils.js"></script>
<script src="js/main.js"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion app/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ a:active {
}

.content p {
margin: 0 0 4em 0;
/* nw-TODO bottom margin should be set back to 4em when nw.js/issues/4627 is fixed */
margin: 0 0 3em 0;
}

/* ======= Buttons ======== */
Expand Down
15 changes: 10 additions & 5 deletions app/css/animator.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ body {
height: 100%;
}

img { -webkit-user-drag: none; }

/* ========== TEXT STYLING ============== */

a {
color: #D9D9D9;
text-decoration: none;
cursor: pointer;
-webkit-user-drag: none;
}

/* ========== Notification bar ============== */
Expand Down Expand Up @@ -128,13 +131,20 @@ a {
}

#sidebar a,
#sidebar label,
#sidebar .sidebar-opt {
color: #d3d3d3;
cursor: pointer;
}
#sidebar a:hover,
#sidebar label:hover,
#sidebar .sidebar-opt:hover { border-bottom: 1.5px solid #d3d3d3; }

#sidebar input,
#sidebar label {
vertical-align: middle;
}

#sidebar-content {
padding-left: 1em;
padding-bottom: 1em;
Expand Down Expand Up @@ -166,8 +176,6 @@ a {
word-break: break-word;
}

#loopCheckbox { cursor: pointer; }

/* ========== VIDEO PREVIEW ============== */

#capture-window, #playback-window {
Expand Down Expand Up @@ -385,7 +393,6 @@ a {
display: inline-block;
cursor: pointer;
padding: 0 1em;
/* float: right;*/
}

#framerate-container {
Expand Down Expand Up @@ -476,8 +483,6 @@ a {
margin-left: 0.8em;
}

#statusBar-dev { float: right; }

/* ========== SCROLL BARS ============== */

::-webkit-scrollbar {
Expand Down
8 changes: 2 additions & 6 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ <h2>Projects</h2>
<button id="load-project" onclick="alert('This feature is coming soon!')"><i class="fa fa-folder-o"></i><span>Load Project</span></button>
</div>
</div>

<div id="statusBar">
<ul>
<li>Version <span id="app-version"></span></li>
<li>
<button id="btn-open-dev-tools">Dev tools</button>
<button id="btn-reload-page">Refresh</button>
</li>
<li class="no-pipe">Version <span id="app-version"></span></li>
</ul>
</div>

Expand Down
7 changes: 2 additions & 5 deletions app/js/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@

// Launcher window
var launcherVersion = document.querySelector("#app-version"),

// GUI window
gui = require("nw.gui"),
win = gui.Window.get();
win = nw.Window.get();

win.title = "About Boats Animator";
win.setShowInTaskbar(false);
Expand All @@ -20,4 +17,4 @@ win.on("minimize", function() {
});

// Get the version number from the manifest file
launcherVersion.innerHTML = gui.App.manifest.version;
launcherVersion.innerHTML = nw.App.manifest.version;
30 changes: 10 additions & 20 deletions app/js/index.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,35 @@
/*jslint browser: true, node: true, debug: true*/
/* global nw */

(function() {
"use strict";
// Launcher window
var launcherVersion = document.querySelector("#app-version"),
let win = nw.Window.get(),
newsFeed = require("./js/newsfeed"),
qAppVersion = document.querySelector("#app-version");

// GUI window
gui = require("nw.gui"),
win = gui.Window.get(),
// Get the version number from the manifest file
qAppVersion.innerHTML = nw.App.manifest.version;

// Node modules
file = require("./js/file"),
newsFeed = require("./js/newsfeed");
// Display the latest news
newsFeed.load("http://charlielee.uk/api/core/get_category_posts/?id=12");

/**
* Occurs when "New Project" is pressed
*/
function openAnimator() {
gui.Window.open("animator.html", {
nw.Window.open("animator.html", {
position: "center",
width: 1050,
height: 715,
min_width: 590,
min_height: 500,
toolbar: false,
focus: true,
icon: "icons/icon.png",
});
win.close();
}

// Get the version number from the manifest file
launcherVersion.innerHTML = gui.App.manifest.version;

// Load the news feed
newsFeed.load("http://charlielee.uk/api/core/get_category_posts/?id=12");

// Start a new project
// Open the animator
document.querySelector("#new-project").addEventListener("click", openAnimator);

// Developer buttons
document.querySelector("#btn-open-dev-tools").addEventListener("click", utils.showDev);
document.querySelector("#btn-reload-page").addEventListener("click", utils.reloadPage);
}());

0 comments on commit 5c2dc2b

Please sign in to comment.