diff --git a/.eslintrc.json b/.eslintrc.json index 537ab8c..a242ad8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -27,7 +27,7 @@ "func-names": 1, "indent": ["error", 2, { "SwitchCase": 1 }], "lines-around-comment": ["error", { "beforeBlockComment": true, "allowArrayStart": true }], - "max-len": [1, 120, 2], // 2 spaces per tab, max 80 chars per line + "max-len": [1, 180, 2], // 2 spaces per tab, max 80 chars per line "new-cap": 1, "newline-before-return": "error", "no-array-constructor": 1, diff --git a/notes/directions.json b/notes/directions.json new file mode 100644 index 0000000..33a9025 --- /dev/null +++ b/notes/directions.json @@ -0,0 +1,269 @@ +{ + "@lang": "en-US", + "ResultSet": { + "@version": "2.0", + "@lang": "en-US", + "Error": "0", + "ErrorMessage": "No error", + "Locale": "en-US", + "Result": { + "yahoo_driving_directions": { + "routeHandle": "0", + "address": [ + { + "type": "Origin", + "lat": "55.872407", + "lon": "-3.549003", + "line1": "", + "line2": "", + "line3": "", + "line4": "", + "country": "" + }, + { + "type": "Destination", + "lat": "55.942673", + "lon": "-4.556334", + "line1": "", + "line2": "", + "line3": "", + "line4": "", + "country": "" + } + ], + "total_distance": "81363", + "total_time": "62.0", + "total_time_with_traffic": "68.0", + "boundingbox": { + "north": "55.942587", + "south": "55.832605", + "east": "-3.540913", + "west": "-4.556462" + }, + "route_id": "AIIACAAAAB4AAABSAAAAmQAAAJ4AAAB42mOYx8DAxMQABBVvKmufOO1OZ4CCuPnVYiuYF9kw/P8PEfiwnwEJcAHxoivLljMxFHUfqmnjPQHXaBBfI+bCsMgKj8bvHSxVjECL4YJpsZcOdANpUXaGwzI1DFxASQYJBicgCQAvuB+Jc1TTsQ==", + "directions": { + "route_leg": [ + { + "@type": "PrivateRouteLeg", + "number": "1", + "lat": "55.872313", + "lon": "-3.547393", + "distance": "98", + "description": "Head northeast. Go for 98 m.", + "time": "0", + "time_with_traffic": "0", + "turn_angle": "0", + "exit_num": "", + "man_type": "0", + "street": ", " + }, + { + "@type": "PrivateRouteLeg", + "number": "2", + "lat": "55.872978", + "lon": "-3.546385", + "distance": "252", + "description": "Take the 3rd exit from roundabout. Go for 252 m.", + "time": "1", + "time_with_traffic": "1", + "turn_angle": "-90", + "exit_num": "", + "man_type": "29", + "street": ", " + }, + { + "@type": "PrivateRouteLeg", + "number": "3", + "lat": "55.872967", + "lon": "-3.543209", + "distance": "127", + "description": "Take the 2nd exit from Brotherton Roundabout roundabout. Go for 127 m.", + "time": "1", + "time_with_traffic": "1", + "turn_angle": "-90", + "exit_num": "", + "man_type": "29", + "street": ", " + }, + { + "@type": "PrivateRouteLeg", + "number": "4", + "lat": "55.873493", + "lon": "-3.541557", + "distance": "2453", + "description": "Take the 1st exit from Rosebank Roundabout roundabout onto Simpson Parkway. Go for 2.5 km.", + "time": "3", + "time_with_traffic": "3", + "turn_angle": "-90", + "exit_num": "", + "man_type": "29", + "street": ", SIMPSON PARKWAY" + }, + { + "@type": "PrivateRouteLeg", + "number": "5", + "lat": "55.885177", + "lon": "-3.557704", + "distance": "432", + "description": "Turn left onto A705. Go for 432 m.", + "time": "1", + "time_with_traffic": "1", + "turn_angle": "-90", + "exit_num": "", + "man_type": "9", + "street": "A705, " + }, + { + "@type": "PrivateRouteLeg", + "number": "6", + "lat": "55.886142", + "lon": "-3.563454", + "distance": "623", + "description": "Take the 2nd exit from Toll Roundabout roundabout onto Starlaw Road (A779). Go for 623 m.", + "time": "1", + "time_with_traffic": "1", + "turn_angle": "-90", + "exit_num": "", + "man_type": "29", + "street": "A779, STARLAW ROAD" + }, + { + "@type": "PrivateRouteLeg", + "number": "7", + "lat": "55.889865", + "lon": "-3.570009", + "distance": "1652", + "description": "Take the 1st exit from Tailend Roundabout roundabout onto Starlaw Road (A779). Go for 1.7 km.", + "time": "2", + "time_with_traffic": "2", + "turn_angle": "-90", + "exit_num": "", + "man_type": "29", + "street": "A779, STARLAW ROAD" + }, + { + "@type": "PrivateRouteLeg", + "number": "8", + "lat": "55.890005", + "lon": "-3.596199", + "distance": "49437", + "description": "Take the 1st exit from Starlaw West Roundabout roundabout onto M8 toward Glasgow. Go for 49.4 km.", + "time": "33", + "time_with_traffic": "33", + "turn_angle": "-90", + "exit_num": "", + "man_type": "29", + "street": "M8, ", + "sign": "Glasgow" + }, + { + "@type": "PrivateRouteLeg", + "number": "9", + "lat": "55.84886", + "lon": "-4.306791", + "distance": "14959", + "description": "Keep right onto M8. Go for 15.0 km.", + "time": "10", + "time_with_traffic": "10", + "turn_angle": "30", + "exit_num": "", + "man_type": "23", + "street": "M8, " + }, + { + "@type": "PrivateRouteLeg", + "number": "10", + "lat": "55.898191", + "lon": "-4.483388", + "distance": "1391", + "description": "Take exit 30 toward Erskine Bridge/Erskine/Bishopton onto M898. Go for 1.4 km.", + "time": "1", + "time_with_traffic": "1", + "turn_angle": "-30", + "exit_num": "", + "man_type": "17", + "street": "M898, ", + "sign": "Bishopton, Erskine, Erskine Bridge" + }, + { + "@type": "PrivateRouteLeg", + "number": "11", + "lat": "55.90745", + "lon": "-4.473388", + "distance": "2509", + "description": "Keep right onto A898 toward Erskine Br./Glasgow/Crianlarich/(A82). Go for 2.5 km.", + "time": "2", + "time_with_traffic": "2", + "turn_angle": "30", + "exit_num": "", + "man_type": "23", + "street": "A898, ", + "sign": "(A82), Crianlarich, Erskine Br., Glasgow" + }, + { + "@type": "PrivateRouteLeg", + "number": "12", + "lat": "55.923564", + "lon": "-4.450718", + "distance": "3714", + "description": "Take ramp onto Great Western Road (A82) toward Crianlarich. Go for 3.7 km.", + "time": "3", + "time_with_traffic": "3", + "turn_angle": "-30", + "exit_num": "", + "man_type": "19", + "street": "A82, GREAT WESTERN ROAD", + "sign": "Crianlarich" + }, + { + "@type": "PrivateRouteLeg", + "number": "13", + "lat": "55.931783", + "lon": "-4.502968", + "distance": "1656", + "description": "Take the 2nd exit from Dunglass Roundabout roundabout onto Dumbarton Road (A82) toward Crianlarich/Dumbarton. Go for 1.7 km.", + "time": "2", + "time_with_traffic": "2", + "turn_angle": "-90", + "exit_num": "", + "man_type": "29", + "street": "A82, DUMBARTON ROAD", + "sign": "Crianlarich, Dumbarton" + }, + { + "@type": "PrivateRouteLeg", + "number": "14", + "lat": "55.935098", + "lon": "-4.526989", + "distance": "2060", + "description": "Turn left onto Glasgow Road (A814) toward Dumbarton/Town Centre/H'burgh. Go for 2.1 km.", + "time": "3", + "time_with_traffic": "3", + "turn_angle": "-90", + "exit_num": "", + "man_type": "9", + "street": "A814, GLASGOW ROAD", + "sign": "Dumbarton, H'burgh, Town Centre" + }, + { + "@type": "PrivateRouteLeg", + "number": "15", + "lat": "55.942587", + "lon": "-4.556462", + "distance": "0", + "description": "Arrive at Glasgow Road (A814). Your destination is on the right.", + "time": "0", + "time_with_traffic": "0", + "turn_angle": "0", + "exit_num": "", + "man_type": "2", + "street": ", " + } + ] + }, + "copy_right": "Copyright © 2018 Yahoo! Inc. All rights reserved. © Navteq" + }, + "geocode_results": null + } + } +} diff --git a/package-lock.json b/package-lock.json index a015e17..2b7f6c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,7 +52,7 @@ }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { diff --git a/src/css/common.css b/src/css/common.css index 91e2386..2f18c92 100644 --- a/src/css/common.css +++ b/src/css/common.css @@ -87,6 +87,55 @@ body { color: rgb(236, 110, 5) } + .temp21 { + color: #ea5a24; + } + + .temp22 { + color: #e4572b; + } + + .temp23 { + color: #e14a29; + } + + .temp24 { + color: #e04127; + } + + .temp25 { + color: #d9372b; + } + + .temp26 { + color: #d63129; + } + + .temp27 { + color: #d12b2b; + } + + .temp28 { + color: #cd282f; + } + + .temp29 { + color: #c82432; + } + + .temp30 { + color: #c32334; + } + + .temp31 { + color: #be2138; + } + + .temp32, .temp33, .temp34, .temp35 { + color: #b9203b; + } + + .day { font-family: "Roboto Slab", "Helvetica Neue", Helvetica, Arial, sans-serif; text-transform: uppercase; diff --git a/src/css/custom.scss b/src/css/custom.scss index 08dce64..cf71a2b 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -284,6 +284,56 @@ li { color: rgb(236, 110, 5) } +.temp21 { + color: #ea5a24; +} + +.temp22 { + color: #e4572b; +} + +.temp23 { + color: #e14a29; +} + +.temp24 { + color: #e04127; +} + +.temp25 { + color: #d9372b; +} + +.temp26 { + color: #d63129; +} + +.temp27 { + color: #d12b2b; +} + +.temp28 { + color: #cd282f; +} + +.temp29 { + color: #c82432; +} + +.temp30 { + color: #c32334; +} + +.temp31 { + color: #be2138; + } + +.temp32, .temp33, .temp34, .temp35 { + color: #b9203b; +} + + + .day { font-family: "Roboto Slab", "Helvetica Neue", Helvetica, Arial, sans-serif; text-transform: uppercase; diff --git a/src/service-worker.js b/src/service-worker.js index e154e0b..4c56a64 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -const CACHE_VERSION = { 'version': '0.0.704' }; +const CACHE_VERSION = { 'version': '0.0.705' }; const dataCacheName = 'jubileeData-v1'; const cacheName = 'jubilee-final-1'; const filesToCache = [ diff --git a/src/v1/js/Forecast.js b/src/v1/js/Forecast.js index 746ba23..648b70e 100644 --- a/src/v1/js/Forecast.js +++ b/src/v1/js/Forecast.js @@ -4,6 +4,7 @@ const Backbone = require('backbone'); const request = require('request'); const { get, isEmpty } = require('lodash'); const { createPanel, addPanel } = require('./libs/panel'); +const templates = require('./libs/templates'); const ForecastModel = Backbone.Model.extend({ 'defaults': function (obj) { @@ -58,82 +59,6 @@ const ForecastView = Backbone.View.extend({ this.eventBus.on('showForecast', this.showForecastPanel, this); }, - 'templateCurrently': _.template(` -