diff --git a/app/images/bay-1920x1080.jpg b/app/images/bay-1920x1080.jpg
new file mode 100644
index 00000000..1fd003db
Binary files /dev/null and b/app/images/bay-1920x1080.jpg differ
diff --git a/app/images/ed-logo-sm.png b/app/images/ed-logo-sm.png
deleted file mode 100644
index 7e7068a7..00000000
Binary files a/app/images/ed-logo-sm.png and /dev/null differ
diff --git a/app/index.html b/app/index.html
index b3a828dc..6de2eb45 100644
--- a/app/index.html
+++ b/app/index.html
@@ -20,9 +20,9 @@
+
-
-
+
Coriolis Shipyard was created using assets and imagery from Elite: Dangerous, with the permission of Frontier Developments plc, for non-commercial purposes.
It is not endorsed by nor reflects the views or opinions of Frontier Developments and no employee of Frontier Developments was involved in the making of it.
diff --git a/app/js/config.js b/app/js/config.js
index 21ed1b4d..c412f508 100644
--- a/app/js/config.js
+++ b/app/js/config.js
@@ -13,7 +13,7 @@ angular.module('app').config(['$provide','$stateProvider', '$urlRouterProvider',
params: {
// TODO: Squash:false not working due to UI-router issue
shipId: { value: 'sidewinder', squash: false}, // Allow 'shipId' parameter to default to
- code: { value: undefined, squash: true } // Allow 'code' parameter to be empty/optional
+ code: { value: null, squash: true } // Allow 'code' parameter to be empty/optional
},
templateUrl: 'views/page-outfit.html',
controller: 'OutfitController',
diff --git a/app/js/controllers/controller-error.js b/app/js/controllers/controller-error.js
index aabc4508..65619ab4 100644
--- a/app/js/controllers/controller-error.js
+++ b/app/js/controllers/controller-error.js
@@ -1,29 +1,32 @@
angular.module('app')
-.controller('ErrorController', ['$rootScope','$scope','$stateParams', '$location', function ($rootScope, $scope, $p, $location) {
+.controller('ErrorController', ['$window','$rootScope','$scope','$stateParams', '$location', function ($window, $rootScope, $scope, $p, $location) {
$rootScope.title = 'Error';
$scope.path = $location.path();
$scope.type = $p.type || 'unknown';
+ $scope.browser = $window.navigator.appVersion;
switch ($scope.type) {
case 404:
$scope.msgPre = 'Page';
$scope.msgHighlight = $scope.path;
$scope.msgPost = 'Not Found';
- $scope.image = 'deep-space';
+ $rootScope.bodyClass = 'deep-space';
break;
case 'no-ship':
$scope.msgPre = 'Ship';
$scope.msgHighlight = $p.message;
$scope.msgPost = 'does not exist';
- $scope.image = 'thargoid';
+ $rootScope.bodyClass = 'docking-bay';
break;
case 'build-fail':
$scope.msgPre = 'Build Failure!';
$scope.image = 'ship-explode';
+ $rootScope.bodyClass = 'docking-bay';
break;
default:
$scope.msgPre = "Uh, this is bad..";
$scope.image = 'thargoid';
+ $rootScope.bodyClass = null;
}
}]);
\ No newline at end of file
diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js
index 2b9fba71..5dbfde67 100644
--- a/app/js/controllers/controller-outfit.js
+++ b/app/js/controllers/controller-outfit.js
@@ -11,7 +11,6 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s
}
$scope.buildName = $p.bn;
- $rootScope.title = ship.name + ($scope.buildName? ' - ' + $scope.buildName: '');
$scope.ship = ship;
$scope.pp = ship.common[0]; // Power Plant
$scope.th = ship.common[1]; // Thruster
@@ -25,6 +24,8 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s
$scope.availCS = Components.forShip(ship.id);
$scope.selectedSlot = null;
$scope.savedCode = Persist.getBuild(ship.id, $scope.buildName);
+ $rootScope.title = ship.name + ($scope.buildName? ' - ' + $scope.buildName: '');
+ $rootScope.bodyClass = 'docking-bay';
// for debugging
window.myScope = $scope;
@@ -62,7 +63,7 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s
} else if (type == 'i') {
ship.use(slot, e.srcElement.id, Components.internal(e.srcElement.id));
} else if (type == 'b') {
- ship.useBulkhead(slot, e.srcElement.id);
+ ship.useBulkhead(e.srcElement.id);
} else {
ship.use(slot, null, null);
}
@@ -88,9 +89,11 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s
* for this ship & with the exact name.
*/
$scope.saveBuild = function() {
- if($scope.code != $scope.savedCode) {
+ if($scope.buildName && $scope.code != $scope.savedCode) {
Persist.saveBuild(ship.id, $scope.buildName, $scope.code);
$scope.savedCode = $scope.code;
+ // Edge case TODO: comment more
+ $state.go('outfit', {shipId: ship.id, code: $scope.savedCode, bn: $scope.buildName}, {location:'replace', notify:false});
}
}
@@ -104,6 +107,10 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s
$state.go('outfit', {shipId: ship.id, code: null, bn: null}, {location:'replace', reload:true});
}
+ $scope.bnChange = function(){
+ $scope.savedCode = Persist.getBuild(ship.id, $scope.buildName);
+ }
+
$rootScope.$on('keyup', function (e, keyEvent) {
// CTRL + S or CMD + S will override the default and save the build is possible
if (keyEvent.keycode == 83 && keyEvent.ctrlKey) {
diff --git a/app/js/controllers/controller-shipyard.js b/app/js/controllers/controller-shipyard.js
index 80f37441..0e8fad10 100644
--- a/app/js/controllers/controller-shipyard.js
+++ b/app/js/controllers/controller-shipyard.js
@@ -1,3 +1,4 @@
angular.module('app').controller('ShipyardController', ['$rootScope', function ($rootScope) {
$rootScope.title = 'Coriolis - Shipyard';
+ $rootScope.bodyClass = 'docking-bay';
}]);
\ No newline at end of file
diff --git a/app/js/directives/directive-meter.js b/app/js/directives/directive-meter.js
deleted file mode 100644
index 395b59f6..00000000
--- a/app/js/directives/directive-meter.js
+++ /dev/null
@@ -1,77 +0,0 @@
-angular.module('app').directive('meter', function () {
- return {
- restrict: 'A',
- scope: {
- labels: '=',
- keys: '=',
- obj: '=',
- max: '='
- },
- link: function (scope, element) {
- var max = scope.max,
- w = 90,
- pLeft = 1,
- pBottom = 2,
- labelWidth = 45,
- bHeight = 16,
- bWidth = ((w - labelWidth) / max) - pLeft,
- h = bHeight * scope.keys.length;
-
- var data = [];
-
- for(var i = 0; i < scope.keys.length; i++) {
- data.push({name:scope.labels[i], val: scope.obj[scope.keys[i]]});
- }
-
- var svg = d3.select(element[0])
- .append('svg')
- .attr('width', w)
- .attr('height', h)
- .attr('viewBox', '0 0 ' + w + ' ' + h)
- .attr('class', 'meter')
- .attr('preserveAspectRatio', 'xMinYMin');
-
- svg.selectAll("g").data(data)
- .enter()
- .append("g")
- .attr('transform', function(d, i) {
- return 'translate(' + labelWidth + ' ' + (i * bHeight) + ')';
- })
- .each(function(d, k) {
- var g = d3.select(this);
- for (var i = 0; i < max; i++) {
- g.append('rect')
- .attr("x", i * (bWidth + pLeft))
- .attr("y", 0)
- .attr("width", bWidth)
- .attr("height", bHeight - pBottom);
- }
- });
-
- svg.selectAll("text").data(data)
- .enter()
- .append('text')
- .text(function(d) {
- return d.name;
- })
- .attr("text-anchor", "end")
- .attr("x", labelWidth - 3)
- .attr("y", function(d, i) {
- return (i * bHeight) + (bHeight) / 2;
- });
-
- function update() {
- for(var i = 0; i < data.length; i++) {
- data[i].val = scope.obj[scope.keys[i]];
- }
-
- svg.selectAll("g").data(data)
- .selectAll('rect').attr('class', function(d, i) {
- return (i + 1 <= d.val) ? 'active' : '';
- });
- }
-
- scope.$watch('obj',update);
- }
- };
-});
\ No newline at end of file
diff --git a/app/less/app.less b/app/less/app.less
index ea952540..f0337710 100644
--- a/app/less/app.less
+++ b/app/less/app.less
@@ -9,7 +9,6 @@
@import 'outfit';
@import 'select';
@import 'charts';
-@import 'meters';
@import 'error';
@@ -24,24 +23,26 @@ body {
padding: 0;
font-family: @fStandard;
overflow-x: hidden;
-}
-
-#bg {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: -1;
- opacity: 0.3;
- background-image: url(images/docking-bay.jpg);
+ background-image: none;
background-repeat: no-repeat;
- background-position: center;
+ background-position: center center fixed;
+ -webkit-background-size: cover;
+ -moz-background-size: cover;
+ -o-background-size: cover;
background-size: cover;
+
+ &.deep-space {
+ background-image: url(images/deep-space.jpg);
+ }
+
+ &.docking-bay {
+ background-image: url(images/bay-1920x1080.jpg);
+ }
}
#main {
- margin: 10px;
+ margin: 0;
+ padding: 0.5em 0.25em;
min-height: 800px;
clear: both;
}
@@ -71,22 +72,14 @@ a, a:visited {
}
footer {
+ clear: both;
font-size: 0.6em;
color: #999;
- padding: 10px 0;
- width: 100%;
+ padding: 1em;
overflow: hidden;
-}
-footer {
.right {
float: right;
text-align: right;
- margin-right: 10px;
- }
- .left {
- float: left;
- text-align: left;
- margin-left: 10px;
}
}
\ No newline at end of file
diff --git a/app/less/colors.less b/app/less/colors.less
index 372ea7a8..aed4968f 100644
--- a/app/less/colors.less
+++ b/app/less/colors.less
@@ -1,20 +1,21 @@
-@fg: #fff;
-@bg: #333;
-@primary: #FF8C0D; // Light Orange
-@secondary: #32DBDB; // Light blue
-@warning: #FF3B00; // Dark Orange
-
+// Constants for calculations
@bgDarken: 40%;
@disabledDarken: 15%;
@bgTransparency: 10%;
-@disabled: #888;
+// Foreground colors
+@fg: #fff;
+@primary: #FF8C0D; // Light Orange
+@secondary: #1FB0FF; // Light blue
+@warning: #FF3B00; // Dark Orange
+@disabled: #888; // Light grey
@primary-disabled: darken(@primary, @disabledDarken);
@secondary-disabled: darken(@secondary, @disabledDarken);
@warning-disabled: darken(@warning, @disabledDarken);
+// Background colors
+@bg: rgba(70,70,70,0.95);
@bgBlack: rgba(0,0,0,0.9);
-
-@primary-bg: fadeout(darken(@primary, 45%), 30%);
+@primary-bg: fadeout(darken(@primary, 45%), 20%);
@secondary-bg: fadeout(darken(@secondary, @bgDarken), @bgTransparency); // Brown background
@warning-bg: fadeout(darken(@warning, @bgDarken), @bgTransparency); // Dark Red
diff --git a/app/less/header.less b/app/less/header.less
index 47b27fde..23f8d35a 100644
--- a/app/less/header.less
+++ b/app/less/header.less
@@ -37,19 +37,19 @@ header {
}
.menu-list {
- width: 200%;
+ width: 250%;
font-family: @fStandard;
position: absolute;
- padding: 0 1em 1em 0;
+ margin-right: 1em;
+ padding: 0 0 1em 1em;
overflow: hidden;
background-color: @bgBlack;
font-size: 0.8em;
}
ul {
- margin: 0;
+ margin: 0.5em 1em 0 0;
padding: 0;
- margin-top: 0.5em;
line-height: 2em;
}
@@ -76,6 +76,11 @@ header {
}
}
+ .block {
+ display: block;
+ line-height: 1.5em;
+ }
+
.title {
font-size: 1.3em;
display: inline-block;
diff --git a/app/less/meters.less b/app/less/meters.less
deleted file mode 100644
index f1da75af..00000000
--- a/app/less/meters.less
+++ /dev/null
@@ -1,18 +0,0 @@
-
-svg.meter {
- text {
- fill: @warning;
- font-size: 15px;
- font-family: @fStandard;
- text-transform:uppercase;
- alignment-baseline: middle;
- }
-
- rect {
- fill: @disabled;
-
- &.active {
- fill: @warning;
- }
- }
-}
diff --git a/app/less/outfit.less b/app/less/outfit.less
index c4dfffa1..cb453150 100644
--- a/app/less/outfit.less
+++ b/app/less/outfit.less
@@ -1,8 +1,13 @@
+#outfit {
+ //width: 62em;
+ //margin: 0 auto;
+}
+
#overview {
h1 {
font-family: @fTitle;
- margin: 5px 0;
+ margin: 0.2em 0;
color: @primary;
float: left;
}
@@ -14,18 +19,22 @@
input {
background: @primary-bg;
- color: @fg;
+ color: @secondary;
+ outline: none;
border: none;
font-size: 0.8em;
line-height: 2em;
- text-transform: uppercase;
+ text-align: right;
+ &:hover, &:focus {
+ background-color: @secondary-bg;
+ }
}
}
#hardpoints {
.slot:nth-child(2n) {
clear: left;
- margin-right: 10px;
+ margin-right: 0.5em;
}
}
@@ -41,34 +50,21 @@
}
}
+u { // Unit (Mj, Km, etc)
+ font-size: 0.8em;
+ text-decoration: none;
+}
+
#summary {
.user-select-none();
float: right;
- width: 40%;
+ min-width: 40em;
+ margin: 0.25em;
border-top: 2px solid @primary;
border-bottom: 2px solid @primary;
background-color: @primary-bg;
}
-legend {
- text-transform: uppercase;
- padding: 0 5px;
- color: @warning;
- font-family: @fTitle;
-}
-
-fieldset {
- user-select: none;
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- cursor: default;
- border: 2px solid @warning-bg;
- .border-radius(5px);
- margin: 5px;
- padding: 1px 5px 5px;
-}
-
.toggle {
cursor: pointer;
}
diff --git a/app/less/shipyard.less b/app/less/shipyard.less
index a3dfec82..f77ad467 100644
--- a/app/less/shipyard.less
+++ b/app/less/shipyard.less
@@ -1,10 +1,12 @@
+#shipyard {
+ vertical-align: top;
+}
+
a.ship {
- display: block;
- float: left;
+ display: inline-block;
width: 22%;
- height: 30%;
- margin: 1% 1%;
+ margin: 1%;
background-color: @bg;
padding: 0.5%;
text-decoration: none;
diff --git a/app/less/slot.less b/app/less/slot.less
index 3d6ed99b..2a3d1587 100644
--- a/app/less/slot.less
+++ b/app/less/slot.less
@@ -1,7 +1,7 @@
.slot-group {
float: left;
- margin: 0 5px;
+ margin: 0.25em;
.user-select-none();
cursor: default;
@@ -10,7 +10,7 @@
color: @bgBlack;
background-color: @primary-disabled;
text-transform: uppercase;
- margin: 2px 0;
+ margin: 0.1em 0;
font-size: 0.8em;
padding-left: 0.5em;
}
@@ -18,9 +18,9 @@
.slot {
float: left;
- width: 230px;
+ width: 20.5em;
font-size: 0.75em;
- margin-top: 3px;
+ margin-top: 0.5em;
position: relative;
z-index: 0;
padding-right: 0.4em;
@@ -34,6 +34,7 @@
overflow: hidden;
height: 100%;
cursor: pointer;
+ text-transform: none;
}
.cb {
diff --git a/app/less/utilities.less b/app/less/utilities.less
index 647299e1..43767ddf 100644
--- a/app/less/utilities.less
+++ b/app/less/utilities.less
@@ -22,7 +22,7 @@
}
.user-select-none (){
- -webkit-touch-callout: none;
+ -webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
diff --git a/app/views/_header.html b/app/views/_header.html
index cf800c81..508beb5b 100644
--- a/app/views/_header.html
+++ b/app/views/_header.html
@@ -1,10 +1,17 @@
\ No newline at end of file
diff --git a/app/views/costs.html b/app/views/costs.html
index 421807f7..7011efde 100644
--- a/app/views/costs.html
+++ b/app/views/costs.html
@@ -10,7 +10,7 @@
{{c.c.class}}{{c.c.rating}} {{$r.CArr[$index]}}
{{$r.fCrd(c.c.cost)}}