Initial commit

This commit is contained in:
Colin McLeod
2015-04-10 12:25:47 -07:00
commit 1097ca5a42
112 changed files with 10638 additions and 0 deletions

6
app/views/component.html Normal file
View File

@@ -0,0 +1,6 @@
<div class="lbl">{{lbl}}</div>
<div class="cla">{{c.maxClass}}</div>
<div class="clear">
{{c.c.class}}{{c.c.rating}}
<div class="cla">{{c.c.mass || c.c.capacity}}T</div>
</div>

View File

@@ -0,0 +1,3 @@
<ul>
<li class="c" ng-repeat="(id,o) in opts" ng-click="use(id,o)">{{o.class}}{{o.rating}}</li>
</ul>

18
app/views/costs.html Normal file
View File

@@ -0,0 +1,18 @@
<div class="list-item" ng-class="{enabled:ship.incCost}" ng-click="toggle(ship)">
<div class="lbl">{{ship.name}}</div><div class="val">{{$r.credits(ship.cost)}}</div>
</div>
<div class="list-item" ng-class="{enabled:ship.bulkheads.incCost}" ng-click="toggle(ship.bulkheads)" ng-if="ship.bulkheads.c.cost">
<div class="lbl">{{ship.bulkheads.c.name}}</div><div class="val">{{$r.credits(ship.bulkheads.c.cost)}}</div>
</div>
<div ng-repeat="c in ship.common" ng-if="c.c.cost" class="list-item common" ng-class="{enabled:c.incCost}" ng-click="toggle(c)">
<div class="lbl">{{c.c.class}}{{c.c.rating}} {{$r.CArr[$index]}}</div><div class="val">{{$r.credits(c.c.cost)}}</div>
</div>
<div ng-repeat="c in ship.hardpoints" ng-if="c.c.cost" class="list-item hardpoints" ng-class="{enabled:c.incCost}" ng-click="toggle(c)">
<div class="lbl">{{c.c.class}}{{c.c.rating}} {{c.c.name}}</div><div class="val">{{$r.credits(c.c.cost)}}</div>
</div>
<div ng-repeat="c in ship.internal" ng-if="c.c.cost" class="list-item internal" ng-class="{enabled:c.incCost}" ng-click="toggle(c)">
<div class="lbl">{{c.c.class}}{{c.c.rating}} {{c.c.name || $r.igMap[c.c.group]}}</div><div class="val">{{$r.credits(c.c.cost)}}</div>
</div>
<div class="list-item">
<div class="lbl">Total</div><div class="val">{{$r.credits(ship.totalCost)}}</div>
</div>

12
app/views/menu.html Normal file
View File

@@ -0,0 +1,12 @@
<header>
<div class="left">
<a href="#/"><h1 class="title">Shipyard</h1></a>
</div>
<div class="right">
<a class="logo github" href="https://github.com/cmmcleod/ed-shipyard" target="_blank" title="Shipyard Github Project"></a>
<a class="logo reddit" href="https://github.com/cmmcleod/ed-shipyard" target="_blank" title="Reddit Thread"></a>
<a class="logo elite-dangerous" href="https://github.com/cmmcleod/ed-shipyard" target="_blank" title="Elite Dangerous Forum Thread"></a>
</div>
</header>

17
app/views/power.html Normal file
View File

@@ -0,0 +1,17 @@
<div ng-repeat="c in ship.common" ng-if="c.c.power || c.c.pGen" class="list-item common" ng-class="{enabled:c.enabled, consumer:c.c.power}" ng-click="toggle(c)">
<div class="lbl">{{c.c.class}}{{c.c.rating}} {{$r.CArr[$index]}}</div><div class="val">{{$r.power(c.c.power || c.c.pGen)}}</div>
</div>
<div class="list-item common consumer" ng-class="{enabled:ship.cargoScoop.enabled}" ng-click="toggle(ship.cargoScoop)">
<div class="lbl">1H Cargo Scoop</div><div class="val">{{$r.power(ship.cargoScoop.c.power)}}</div>
</div>
<div ng-repeat="c in ship.hardpoints" ng-if="c.c.power" class="list-item hardpoints" ng-class="{enabled:c.enabled, consumer:c.c.power}" ng-click="toggle(c)">
<div class="lbl">{{c.c.class}}{{c.c.rating}} {{c.c.name}}</div><div class="val">{{$r.power(c.c.power)}}</div>
</div>
<div ng-repeat="c in ship.internal" ng-if="c.c.power" class="list-item internal" ng-class="{enabled:c.enabled, consumer:c.c.power}" ng-click="toggle(c)">
<div class="lbl">{{c.c.class}}{{c.c.rating}} {{c.c.name || $r.igMap[c.c.group]}}</div><div class="val">{{$r.power(c.c.power)}}</div>
</div>
<div>Retracted: {{$r.power(ship.powerRetracted)}} ({{$r.percent(ship.powerRetracted/ship.powerAvailable)}})</div>
<div>Deployed: {{$r.power(ship.powerDeployed)}} ({{$r.percent(ship.powerDeployed/ship.powerAvailable)}})</div>

55
app/views/ship.html Normal file
View File

@@ -0,0 +1,55 @@
<fieldset id="overview">
<legend>{{ship.name}}</legend>
<div>Class: {{ship.class}}</div>
<div>Mass: {{ship.unladenMass}} - {{ship.ladenMass}} [{{ship.mass}}]T</div>
<div>Speed: {{ship.speed}} <span class="boost">[{{ship.boost}}] M/s</span></div>
<div>Agility: {{ship.agility}}</div>
<div>Shields: {{ship.shields}}</div>
<div>Armour: {{ship.armour}}</div>
<div>Fuel: {{ship.fuelCapacity}}T</div>
<div>Cargo: {{ship.cargoCapacity}}T</div>
<div>Armour: {{ship.armour}}</div>
<div>Pad Size: {{['','Small','Medium','Large'][ship.class]}}</div>
</fieldset>
<fieldset id="standard" class="component-group">
<legend>Standard</legend>
<div class="component">
<div class="lbl">Bulkheads</div>
<div class="clear">{{ship.bulkheads.c.name}}
<div class="cla">{{ship.bulkheads.c.mass}}T</div>
</div>
<div class="select">
<div class="c" ng-repeat="b in availCS.bulkheads" ng-click="ship.use(ship.bulkheads,$index,b)">{{b.name}}</div>
</div>
</div>
<div class="component" ng-repeat="c in ship.common">
<component-details c="c" lbl="CArr[$index]"></component-details>
<div component-select class="select" c="c" ship="ship" opts="availCS.common[$index]"></div>
</div>
</fieldset>
<fieldset id="hardpoints" class="component-group">
<legend>HardPoints</legend>
<div class="component" ng-repeat="h in ship.hardpoints">
<component-details c="h" lbl="HPC[h.maxClass]"></component-details>
<div component-select class="select" c="h" ship="ship" opts="availCS.getHps(h.maxClass)"></div>
</div>
</fieldset>
<fieldset id="internal" class="component-group">
<legend>Internal Compartments</legend>
<div class="component" ng-repeat="i in ship.internal">
<component-details c="i" lbl="'FIX'"></component-details>
<div class="select">
<div ng-repeat="(grp, data) in availCS.getInts(i.maxClass)">
<div class="select-group">{{grp}}</div>
<div component-select c="i" ship="ship" opts="data"></div>
</div>
</div>
</div>
</fieldset>
<div class="list" id="power-list" power-list ship="ship"></div>
<div class="list" id="cost-list" cost-list ship="ship"></div>

9
app/views/ships.html Normal file
View File

@@ -0,0 +1,9 @@
<a href="#/{{id}}" class="ship" ng-repeat="(id,s) in ships">
<h2>{{s.name}}<small>{{s.manufacturer}}</small></h2>
<div class="subtitle">
<div class="size">Class {{s.class}} / {{SZ[s.class]}}</div>
<div class="purpose">{{SP[s.group]}}</div>
</div>
{{credits(s.cost)}} Credits
</a>