Skip to content

Commit

Permalink
Merge master branch with taxi-route
Browse files Browse the repository at this point in the history
  • Loading branch information
philawsophizing committed May 16, 2017
2 parents ea79904 + 8b59225 commit cbcc834
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
],
"rules": {
"linebreak-style": 0
},
"globals": {
"L": true
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
npm-debug.log
.eslintrc.json
.eslintcache
.eslintrc.json
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"handlebars": "^4.0.8",
"hapi": "^16.1.1",
"inert": "^4.2.0",
"leaflet": "^1.0.3",
"vision": "^4.1.1"
},
"devDependencies": {
Expand Down
Binary file added public/images/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion public/main.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
/* eslint-env browser */
console.log('OY');

setTimeout(() => {
const mymap = L.map('mapid', {
center: [32.699, 35.303],
zoomControl: false,
attributionControl: false,
zoom: 15,
});

L.tileLayer(
'https://api.mapbox.com/styles/v1/mapbox/light-v9/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1Ijoia2FyeXVtIiwiYSI6ImNqMjAzNGU4ZjAxa3EycW4xazFxcHZ6a2QifQ.m_dNO1l1sMkM7r4d5nlRRQ').addTo(mymap);
}, 50);
39 changes: 36 additions & 3 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ body {
width: auto;
}

/* Car Route */


/* Taxi Route */

.price {
Expand Down Expand Up @@ -158,3 +155,39 @@ body {
height: 90%;
width: auto;
}

/* Car Route */

#mapid {
margin-top: 3%;
height: 70%;
width: 100%;
}

.splash-button-car {
background-color: white;
height: 7%;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 4%;
}

.arrived-button {
text-decoration: none;
color: #6E9FEF;
font-weight: bolder;
font-size: 1.5rem;
padding: 0em 1em;
line-height: 2em;
}

.back-button {
color: white;
float: left;
font-size: 4rem;
margin-left: 1rem;
left: 0%;
bottom: 4%;
position: absolute;
}
12 changes: 12 additions & 0 deletions src/routes/carPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const carRouteHandler = (request, reply) => {
reply.view('car-route', {
title: 'Private Parking',
tagLine: 'ElMutran Parking',
});
};

module.exports = {
method: 'GET',
path: '/car',
handler: carRouteHandler,
};
2 changes: 2 additions & 0 deletions src/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const homeHandler = require('./home.js');
const staticHandler = require('./static.js');
const taxiHandler = require('./taxi.js');
const carHandler = require('./carPage.js');

module.exports = [
homeHandler,
staticHandler,
taxiHandler,
carHandler,
];
13 changes: 13 additions & 0 deletions src/views/car-route.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="app-shell">

{{> header}}
<div id="mapid"></div>
<div class="splash-button-car">
<a href="/walk" class="arrived-button">ARRIVED</a>
</div>
<a href="/"><i class="fa fa-arrow-left back-button"></i></a>
</div>

<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-A7vV8IFfih/D732iSSKi20u/ooOfj/AGehOKq0f4vLT1Zr2Y+RX7C+w8A1gaSasGtRUZpF/NZgzSAu4/Gc41Lg=="
crossorigin=""></script>
7 changes: 5 additions & 2 deletions src/views/layout/default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ=="
crossorigin=""/>
<link href="https://fonts.googleapis.com/css?family=Economica|Roboto+Condensed" rel="stylesheet">

<title>PAS</title>
</head>
<body>

{{{content}}}

<script type="text/javascript" src="/main.js"></script>
<script type="text/javascript" src="/main.js"></script>
</body>
</html>
9 changes: 6 additions & 3 deletions src/views/splash.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@

<div class="app-shell">
{{> header}}
<p class="intro-text">Welcome!<br />How will you be arriving?</p>

<div class="button-container">
<div class="splash-button"><img class="transport-type" src="/images/car-4-128.jpg" alt="arriving by car"></div>
<a href="/car"><div class="splash-button"><img class="transport-type" src="/images/car-4-128.jpg" alt="arriving by car"></div></a>

<!-- when we make the bus route page we need to add the a tag here -->
<div class="splash-button"><img class="transport-type" src="/images/bus-128.jpg" alt="arriving by bus"></div>

<!-- when we add the taxi route we need to add the a tag here -->
<div class="splash-button btn-3"><img class="transport-type" src="/images/taxi-128.jpg" alt="arriving by taxi"></div>
</div>
</div>

0 comments on commit cbcc834

Please sign in to comment.