Skip to content

Commit 22916c0

Browse files
committed
Finalize about section and add Procfile for Heroku deployment
1 parent b63167b commit 22916c0

File tree

7 files changed

+93
-32
lines changed

7 files changed

+93
-32
lines changed

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
worker: npm start

public/antony.jpg

19 KB
Loading

public/casey.jpeg

50.8 KB
Loading

public/daniel.jpeg

40.4 KB
Loading

public/index.css

+45-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ body {
2525
width: 30vw;
2626
height: 30vh;
2727
bottom: 0;
28+
z-index: 20000;
2829
background-image: linear-gradient(rgba(0,0,0,0), rgba(255,255,255,1), rgba(255,255,255,1));
2930
}
3031

@@ -36,7 +37,10 @@ body {
3637
z-index: 10001;
3738
height: 100vh;
3839
display: none;
39-
padding: 30px;
40+
overflow-y: scroll;
41+
user-select: text;
42+
-moz-user-select: text;
43+
padding-bottom: 10vh;
4044
}
4145

4246
.about-container p{
@@ -169,11 +173,49 @@ body {
169173
display: flex;
170174
align-items: center;
171175
padding: 0 1.4vw 0 0;
172-
background-color: rgba(240,240,240,0.6);
173-
box-shadow: 0px 0px 10px 10px rgba(240,240,240,0.4);
176+
background-color: rgba(255,255,255,0.6);
177+
box-shadow: 0px 0px 20px 5px rgba(255,255,255,0.4);
174178
}
175179

176180
.logo-wrapper>span {
177181
font-size: 2.0rem;
178182
color: #3cbcbb;
179183
}
184+
185+
.bluebold {
186+
color: #3cbcbb;
187+
}
188+
189+
.aboutcontent {
190+
padding: 0 4vw;
191+
}
192+
193+
.contact {
194+
padding-bottom: 15vw;
195+
}
196+
197+
.profile {
198+
padding: 0 4vw;
199+
display: flex;
200+
align-items: center;
201+
}
202+
203+
.profile>.image{
204+
margin: auto;
205+
float: left;
206+
border-radius: 100%;
207+
border: 5px solid #3cbcbb;
208+
transition: all .2s ease-in-out;
209+
}
210+
211+
.profile>.image:hover{
212+
transform: scale(1.1);
213+
}
214+
215+
.bio {
216+
font-size: 1.2rem;
217+
}
218+
219+
.profile>.image.right{
220+
float: right!important;
221+
}

server.js

+11-10
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ io.on('connection', (socket) => {
6464
});
6565

6666
socket.on('report', async (data) => {
67+
let policePhone = process.env.POLICE_PHONE || config.policePhone;
6768
if(data.police) {
6869
let body = `New crime at ${data.address} : ${data.description}`;
69-
sendText(body, config.policePhone);
70+
sendText(body, policePhone);
7071
}
7172
convertAddress(data.address)
7273
.then(
@@ -86,12 +87,12 @@ io.on('connection', (socket) => {
8687

8788
// firebase setup
8889
const fb_config = {
89-
apiKey: config.apiKey,
90-
authDomain: config.authDomain,
91-
databaseURL: config.databaseURL,
92-
projectId: config.projectId,
93-
storageBucket: config.storageBucket,
94-
messagingSenderId: config.messagingSenderId
90+
apiKey: process.env.API_KEY || config.apiKey,
91+
authDomain: process.env.AUTH_DOMAIN || config.authDomain,
92+
databaseURL: process.env.DATABASE_URL || config.databaseURL,
93+
projectId: process.env.PROJECT_ID || config.projectId,
94+
storageBucket: process.env.STORAGE_BUCKET || config.storageBucket,
95+
messagingSenderId: process.env.MESSAGING_SENDER_ID || config.messagingSenderId
9596
}
9697
firebase.initializeApp(fb_config);
9798
console.log("firebase is setup!");
@@ -286,7 +287,7 @@ function addUser(name, number){
286287
*/
287288
async function convertAddress(location){
288289
let properties = {
289-
key: config.mapquest,
290+
key: process.env.MAP_QUEST || config.mapquest,
290291
location: location
291292
}
292293
let options = {
@@ -349,8 +350,8 @@ async function findRoute(location, destination, pedestrian) {
349350
}
350351

351352
/***** Twilio API functions *****/
352-
const twilioID = config.accountSid;
353-
const authToken = config.twilioAuthToken;
353+
const twilioID = process.env.TWILIO_ID || config.accountSid;
354+
const authToken = process.env.AUTH_TOKEN || config.twilioAuthToken;
354355
const client = require('twilio')(twilioID, authToken);
355356

356357
/**

views/index.handlebars

+36-19
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,48 @@
3838
<div class="about-container">
3939
<i class="x icon" id="close-about"></i>
4040
<h1 class="heading">About</h1>
41-
<p>
42-
<!-- The purpose of <b>roadBlock</b> is to allow every individual to feel safe when traveling.
41+
<p class="aboutcontent">
4342

44-
<br />
45-
<br /> -->
46-
47-
<b>roadBlock</b> is a web app that allows you to plan your route based on safety by visually seeing the safest route & directions between two addresses based on avoiding locations with a history of crime.
48-
We use prebuilt data given from a <a href="https://data.lacity.org/A-Safe-City/Crime-Data-from-2010-to-Present/y8tr-7khq">public LA dataset</a> in order to find locations of high crime, but you can also report crimes and inform the police, allowing others to receive live updates for when your crime is reported.
43+
<b class="bluebold">roadblock</b> is a mapping service that prioritizes
44+
the user's. It provides the fastest route between two locations while
45+
simulatenously avoiding areas with a history of crime. We keep track of
46+
<a class="bluebold" href="https://data.lacity.org/A-Safe-City/Crime-Data-from-2010-to-Present/y8tr-7khq">
47+
prerecorded data
48+
</a>
49+
given by the city of Los Angeles and additionally allow users to report crimes,
50+
updating our data while simulatenously notifying law enforcement and other users.
4951

5052
<br />
5153
<br />
5254

53-
Ultimately, we strive to allow every individual to feel safe when traveling in areas of high crime rates, whether it be for a vacation or just everyday commutes.
54-
55-
<br />
56-
<br />
57-
</p>
58-
<h1 class="heading"> Creators </h1>
59-
<p class="center">
60-
Antony Nguyen | <a href="https://www.linkedin.com/in/emilyhuongnguyen/">LinkedIn</a> | <a href="https://github.com/eminguyen">GitHub</a>
61-
<br />
62-
Casey Price | <a href="https://www.linkedin.com/in/casprice/">LinkedIn</a> | <a href="https://github.com/casprice">GitHub</a>
63-
<br />
64-
Daniel Truong | <a href="https://www.linkedin.com/in/daniel-d-truong/">LinkedIn</a> | <a href="https://github.com/numberonetruong">GitHub</a>
55+
We strive to allow every individual to feel safe when traveling.
6556
</p>
57+
<div class="center contact">
58+
<div class="profile">
59+
<img class="ui small circular image" src="antony.jpg">
60+
<div class="bio">
61+
Antony Nguyen
62+
<br>
63+
<a href="https://www.linkedin.com/in/emilyhuongnguyen/">LinkedIn</a> | <a href="https://github.com/eminguyen">GitHub</a>
64+
</div>
65+
</div>
66+
<div class="profile">
67+
<div class="bio">
68+
Casey Price
69+
<br>
70+
<a href="https://www.linkedin.com/in/casprice/">LinkedIn</a> | <a href="https://github.com/casprice">GitHub</a>
71+
</div>
72+
<img class="ui small circular right image" src="casey.jpeg">
73+
</div>
74+
<div class="profile">
75+
<img class="ui small circular image" src="daniel.jpeg">
76+
<div class="bio">
77+
Daniel Truong
78+
<br>
79+
<a href="https://www.linkedin.com/in/daniel-d-truong/">LinkedIn</a> | <a href="https://github.com/numberonetruong">GitHub</a>
80+
</div>
81+
</div>
82+
</div>
6683
</div>
6784

6885
<div class="report-container">

0 commit comments

Comments
 (0)