diff --git a/build/apps/parking/garages.html b/build/apps/parking/garages.html new file mode 100755 index 00000000..5f20143e --- /dev/null +++ b/build/apps/parking/garages.html @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + diff --git a/build/apps/parking/garages_map.html b/build/apps/parking/garages_map.html new file mode 100755 index 00000000..2cf8fc5e --- /dev/null +++ b/build/apps/parking/garages_map.html @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +

Powered By SFPark.org

+
+ + + + diff --git a/build/apps/parking/index.html b/build/apps/parking/index.html new file mode 100755 index 00000000..06e2cd55 --- /dev/null +++ b/build/apps/parking/index.html @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ img02 +
+

Garage List

+
+
+
+ +
+ img14 +
+

Garage Map

+
+
+
+
+
+ + + + + diff --git a/build/apps/parking/react/components/garage-hours.js b/build/apps/parking/react/components/garage-hours.js new file mode 100755 index 00000000..6ce4ee56 --- /dev/null +++ b/build/apps/parking/react/components/garage-hours.js @@ -0,0 +1,34 @@ +MyComponents.Hour = React.createClass({ + render: function() { + return( +
+
+ {this.props.hour.FROM}- {this.props.hour.TO}
+ Beggining: {this.props.hour.BEG}
+ End: {this.props.hour.END} + +
+
+ ); + } +}); + +//TODO: This is a component to display an item in the hours array + // Raw props data is {JSON.stringify(this.props)} +MyComponents.GarageHours = React.createClass({ + render: function() { + + var hours = this.props.hours.map(function(h,i){ + return + }) + + return ( +
+
+ Hours + {hours} +
+
+ ); + } +}); diff --git a/build/apps/parking/react/components/garage-rates.js b/build/apps/parking/react/components/garage-rates.js new file mode 100755 index 00000000..90a13340 --- /dev/null +++ b/build/apps/parking/react/components/garage-rates.js @@ -0,0 +1,44 @@ +MyComponents.Rate = React.createClass({ + render: function() { + var desc = this.props.rate.DESC + var beginning = this.props.rate.BEG ? this.props.rate.BEG : "" + var end = this.props.rate.END ? this.props.rate.END : "" + var amount = this.props.rate.RATE + var requirement = this.props.rate.RQ + var data = "" + if(beginning != ""){ + data += (beginning + ' - ' + end + ': $' + amount + ' ' + requirement) + } + else{ + data += (desc + ': $' + amount + ' ' + requirement) + } + return ( +
+
+
    +
  • {data}
  • +
+
+
+ ); + } +}); + + +MyComponents.GarageRates = React.createClass({ + render: function() { + + var rates = this.props.rates.map(function(r,i){ + return + }) + + return ( +
+
+ Rates + { rates } +
+
+ ); + } +}); diff --git a/build/apps/parking/react/components/garage-spaces.js b/build/apps/parking/react/components/garage-spaces.js new file mode 100755 index 00000000..860272a2 --- /dev/null +++ b/build/apps/parking/react/components/garage-spaces.js @@ -0,0 +1,20 @@ +MyComponents.GarageSpaces = React.createClass({ + render: function() { + var circle_fill = "green" + if(this.props.open == 0){ + circle_fill = "red" + } + return ( +
+
    + Spaces +
    + +
    +
  • Open Spaces: {this.props.open}
  • +
  • Total Spaces: {this.props.total}
  • +
+
+ ); + } +}); diff --git a/build/apps/parking/react/components/garage-title.js b/build/apps/parking/react/components/garage-title.js new file mode 100755 index 00000000..6f23bde4 --- /dev/null +++ b/build/apps/parking/react/components/garage-title.js @@ -0,0 +1,11 @@ +MyComponents.GarageTitle = React.createClass({ + render: function() { + return ( +
+
+ {this.props.title} +
+
+ ); + } +}); diff --git a/build/apps/parking/react/components/garage.js b/build/apps/parking/react/components/garage.js new file mode 100755 index 00000000..daa55ea4 --- /dev/null +++ b/build/apps/parking/react/components/garage.js @@ -0,0 +1,23 @@ +// Dependencies: +// - MyComponents.GarageSpaces +// - MyComponents.GarageTitle +// - MyComponents.GarageHours +// - MyComponents.GarageRates + +MyComponents.Garage = React.createClass({ + render: function() { + return ( +
+ + + + +
+ ); + } +}); diff --git a/build/apps/parking/react/components/helloworld.js b/build/apps/parking/react/components/helloworld.js new file mode 100755 index 00000000..7bd4e6ff --- /dev/null +++ b/build/apps/parking/react/components/helloworld.js @@ -0,0 +1,7 @@ +MyComponents.HelloWorld = React.createClass({ + render: function() { + return ( +

Hello, world!

+ ); + } +}); diff --git a/build/apps/parking/react/components/navbar.js b/build/apps/parking/react/components/navbar.js new file mode 100755 index 00000000..6b932caa --- /dev/null +++ b/build/apps/parking/react/components/navbar.js @@ -0,0 +1,14 @@ +MyComponents.NavBar = React.createClass({ + render: function() { + return ( + + ); + } +}); diff --git a/build/apps/parking/react/components/team.js b/build/apps/parking/react/components/team.js new file mode 100755 index 00000000..3c60d0ed --- /dev/null +++ b/build/apps/parking/react/components/team.js @@ -0,0 +1,30 @@ +MyComponents.Team = React.createClass({ + render: function() { + + // inspect this.props.team to make sure we load the data correctly + console.log('members', this.props.members) + + // For each 'member' in 'team', create a
  • component to display + // information about this member. + + var members = this.props.members.map(function(member, i){ + return
  • + {member.firstname} {member.lastname} + Github +
  • + }) + + return ( +
    +
    + Team Members +
      + {members} +
    +
    +
    + ); + } +}); + + diff --git a/build/apps/parking/react/garages.snapshot.json b/build/apps/parking/react/garages.snapshot.json new file mode 100755 index 00000000..37bd800a --- /dev/null +++ b/build/apps/parking/react/garages.snapshot.json @@ -0,0 +1,1319 @@ +{ + "16th and Hoff Garage":{ + "friendlyName":"16th and Hoff Garage", + "hours":[ + { + "BEG":"8:00 AM", + "END":"12:00 AM", + "FROM":"Monday", + "TO":"Thursday" + }, + { + "BEG":"8:00 AM", + "END":"2:30 AM", + "FROM":"Friday" + }, + { + "BEG":"10:00 AM", + "END":"2:30 AM", + "FROM":"Saturday" + }, + { + "BEG":"11:00 AM", + "END":"11:00 PM", + "FROM":"Sunday" + } + ], + "open_spaces":"Unknown", + "points":[ + 37.76425207, + -122.4207729 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"1.5", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"1.5", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"2.5", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"22", + "RQ":"Flat rate" + } + ], + "total_spaces":"Unknown" + }, + "Civic Center Garage":{ + "friendlyName":"Civic Center Garage", + "hours":[ + { + "BEG":"6:00 AM", + "END":"12:00 AM", + "FROM":"Monday", + "TO":"Friday" + }, + { + "BEG":"8:00 AM", + "END":"12:00 AM", + "FROM":"Saturday" + }, + { + "BEG":"9:00 AM", + "END":"10:00 PM", + "FROM":"Sunday" + } + ], + "open_spaces":"218", + "points":[ + 37.7802465669, + -122.4177671135 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"4", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"16", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before close" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"27", + "RQ":"Flat rate" + }, + { + "DESC":"Student", + "RATE":"8", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"6", + "RQ":"Flat rate" + }, + { + "DESC":"Special Event", + "RATE":"15", + "RQ":"Flat rate", + "RR":"Applies during events at nearby venues" + } + ], + "total_spaces":"843" + }, + "Ellis OFarrell Garage":{ + "friendlyName":"Ellis OFarrell Garage", + "hours":[ + { + "BEG":"5:30 AM", + "END":"1:00 AM", + "FROM":"Sunday", + "TO":"Thursday" + }, + { + "BEG":"5:30 AM", + "END":"2:00 AM", + "FROM":"Friday", + "TO":"Saturday" + } + ], + "open_spaces":"206", + "points":[ + 37.7863925455, + -122.4071540583 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"19", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before close" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"34", + "RQ":"Flat rate" + }, + { + "DESC":"Sunday Daily Max / Lost Ticket", + "RATE":"16", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"7", + "RQ":"Flat rate" + } + ], + "total_spaces":"820" + }, + "Fifth and Mission Garage":{ + "friendlyName":"Fifth and Mission Garage", + "hours":{ + "BEG":"24 Hrs/Day", + "FROM":"7 Days/Wk" + }, + "open_spaces":"932", + "points":[ + 37.7832776731, + -122.405537559 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1.5", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"34", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"7", + "RQ":"Flat rate" + } + ], + "total_spaces":"2573" + }, + "Golden Gateway Garage":{ + "friendlyName":"Golden Gateway Garage", + "hours":[ + { + "BEG":"4:00 AM", + "END":"10:00 PM", + "FROM":"Monday", + "TO":"Friday" + }, + { + "BEG":"7:00 AM", + "END":"10:00 PM", + "FROM":"Saturday" + }, + { + "BEG":"9:00 AM", + "END":"10:00 PM", + "FROM":"Sunday" + } + ], + "open_spaces":"346", + "points":[ + 37.79544154, + -122.3986032 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"7", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"7", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"7", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"7", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at leasat 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"22", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before close" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"38", + "RQ":"Flat rate" + }, + { + "DESC":"Weekend", + "RATE":"8", + "RQ":"Flat rate", + "RR":"Sat: Enter after 7am, exit before close; Sun: Enter after 4am, exit before close" + }, + { + "DESC":"Park & Ride Validation", + "RATE":"3", + "RQ":"Flat rate", + "RR":"Weekend only until 10pm" + }, + { + "DESC":"Motorcycle", + "RATE":"7", + "RQ":"Flat rate" + } + ], + "total_spaces":"1160" + }, + "Japan Center Annex Garage":{ + "friendlyName":"Japan Center Annex Garage", + "hours":{ + "BEG":"6:30 AM", + "END":"1:30 AM", + "FROM":"7 Days/Wk" + }, + "open_spaces":"46", + "points":[ + 37.7849547433, + -122.4328661663 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"13", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before close" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"23", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"6", + "RQ":"Flat rate" + } + ], + "total_spaces":"175" + }, + "Japan Center Garage":{ + "friendlyName":"Japan Center Garage", + "hours":[ + { + "BEG":"5:00 AM", + "END":"2:30 AM", + "FROM":"Monday", + "TO":"Friday" + }, + { + "BEG":"7:00 AM", + "END":"3:00 AM", + "FROM":"Saturday", + "TO":"Sunday" + } + ], + "open_spaces":"202", + "points":[ + 37.7849220106, + -122.4301614271 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"13", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before close" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"23", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"6", + "RQ":"Flat rate" + } + ], + "total_spaces":"745" + }, + "Lombard Street Garage":{ + "friendlyName":"Lombard Street Garage", + "hours":[ + { + "BEG":"7:00 AM", + "END":"12:00 AM", + "FROM":"Sunday", + "TO":"Monday" + }, + { + "BEG":"7:00 AM", + "END":"1:00 AM", + "FROM":"Tuesday", + "TO":"Wednesday" + }, + { + "BEG":"7:00 AM", + "END":"2:30 AM", + "FROM":"Thursday" + }, + { + "BEG":"7:00 AM", + "END":"3:00 AM", + "FROM":"Friday", + "TO":"Saturday" + } + ], + "open_spaces":"59", + "points":[ + 37.7996475876, + -122.4348921128 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"2.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"1.25", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"15", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before close" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"22" + } + ], + "total_spaces":"205" + }, + "Mission Bartlett Garage":{ + "friendlyName":"Mission Bartlett Garage", + "hours":[ + { + "BEG":"7:00 AM", + "END":"12:00 AM", + "FROM":"Monday", + "TO":"Thursday" + }, + { + "BEG":"7:00 AM", + "END":"2:30 AM", + "FROM":"Friday" + }, + { + "BEG":"8:00 AM", + "END":"2:30 AM", + "FROM":"Saturday" + }, + { + "BEG":"8:00 AM", + "END":"12:00 AM", + "FROM":"Sunday" + } + ], + "open_spaces":"57", + "points":[ + 37.7568400419, + -122.4204335636 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1.5", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"4.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"2.5", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"4.5", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"24", + "RQ":"Flat rate" + } + ], + "total_spaces":"205" + }, + "Moscone Center Garage":{ + "friendlyName":"Moscone Center Garage", + "hours":[ + { + "BEG":"6:00 AM", + "END":"12:00 AM", + "FROM":"Monday", + "TO":"Thursday" + }, + { + "BEG":"6:00 AM", + "END":"2:30 AM", + "FROM":"Friday" + }, + { + "BEG":"8:00 AM", + "END":"2:30 AM", + "FROM":"Saturday" + }, + { + "BEG":"9:00 AM", + "END":"9:00 PM", + "FROM":"Sunday" + } + ], + "open_spaces":"105", + "points":[ + 37.78452379, + -122.3994795 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"2.5", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"4.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"12", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am, exit before close (does not apply on major event days)" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"27" + } + ], + "total_spaces":"752" + }, + "Performing Arts Garage":{ + "friendlyName":"Performing Arts Garage", + "hours":{ + "BEG":"6:00 AM", + "END":"12:00 AM", + "FROM":"Monday", + "TO":"Friday" + }, + "open_spaces":"60", + "points":[ + 37.77810302, + -122.4225312 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"2", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"4", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"13", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before close" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"20", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"6", + "RQ":"Flat rate" + }, + { + "DESC":"Special Event", + "RATE":"15", + "RQ":"Flat rate", + "RR":"Applies during events at nearby venues" + } + ], + "total_spaces":"600" + }, + "St Marys Square Garage":{ + "friendlyName":"St Marys Square Garage", + "hours":{ + "BEG":"24 Hrs/Day", + "FROM":"7 Days/Wk" + }, + "open_spaces":"119", + "points":[ + 37.79199927, + -122.4045476 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"4", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"4.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"3.5", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"Weekends 9am-6pm", + "RATE":"1.5", + "RQ":"Off per hr" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Early Bird", + "RATE":"23", + "RQ":"Flat rate", + "RR":"Mon-Fri: Enter before 8:30am and exit before Midnight" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"39", + "RQ":"Flat rate" + } + ], + "total_spaces":"392" + }, + "Sutter Stockton Garage":{ + "friendlyName":"Sutter Stockton Garage", + "hours":{ + "BEG":"24 Hrs/Day", + "FROM":"7 Days/Wk" + }, + "open_spaces":"365", + "points":[ + 37.7897829226, + -122.4068556189 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"4", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"1", + "RQ":"Per hour" + }, + { + "DESC":"Sunday 9am-6pm", + "RATE":"1", + "RQ":"Off per hr" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"36", + "RQ":"Flat rate" + }, + { + "DESC":"Sunday Daily Max / Lost Ticket", + "RATE":"18", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"7", + "RQ":"Flat rate" + } + ], + "total_spaces":"1650" + }, + "Union Square Garage":{ + "friendlyName":"Union Square Garage", + "hours":{ + "BEG":"24 Hrs/Day", + "FROM":"7 Days/Wk" + }, + "open_spaces":"134", + "points":[ + 37.7876789151, + -122.407447946 + ], + "rates":[ + { + "BEG":"12:00 AM", + "END":"9:00 AM", + "RATE":"2.5", + "RQ":"Per hour" + }, + { + "BEG":"9:00 AM", + "END":"12:00 PM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "BEG":"12:00 PM", + "END":"3:00 PM", + "RATE":"5.5", + "RQ":"Per hour" + }, + { + "BEG":"3:00 PM", + "END":"6:00 PM", + "RATE":"4", + "RQ":"Per hour" + }, + { + "BEG":"6:00 PM", + "END":"12:00 AM", + "RATE":"3", + "RQ":"Per hour" + }, + { + "DESC":"AM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Enter before 8:30am (stay at least 3 hours)" + }, + { + "DESC":"PM Off-Peak", + "RATE":"2", + "RQ":"Off total", + "RR":"Mon-Fri: Exit after 6:30pm (stay at least 3 hours)" + }, + { + "DESC":"Daily Maximum / Lost Ticket", + "RATE":"36", + "RQ":"Flat rate" + }, + { + "DESC":"Motorcycle", + "RATE":"7", + "RQ":"Flat rate" + } + ], + "total_spaces":"670" + }, + "_geofire":{ + "16th and Hoff Garage":{ + "g":"9q8yy4zbtn", + "l":[ + 37.76425207, + -122.4207729 + ] + }, + "Civic Center Garage":{ + "g":"9q8yymdjgk", + "l":[ + 37.7802465669, + -122.4177671135 + ] + }, + "Ellis OFarrell Garage":{ + "g":"9q8yywccdw", + "l":[ + 37.7863925455, + -122.4071540583 + ] + }, + "Fifth and Mission Garage":{ + "g":"9q8yyw5p81", + "l":[ + 37.7832776731, + -122.405537559 + ] + }, + "Golden Gateway Garage":{ + "g":"9q8znb2n3u", + "l":[ + 37.79544154, + -122.3986032 + ] + }, + "Japan Center Annex Garage":{ + "g":"9q8yvyx176", + "l":[ + 37.7849547433, + -122.4328661663 + ] + }, + "Japan Center Garage":{ + "g":"9q8yyn9147", + "l":[ + 37.7849220106, + -122.4301614271 + ] + }, + "Lombard Street Garage":{ + "g":"9q8zjcjwuj", + "l":[ + 37.7996475876, + -122.4348921128 + ] + }, + "Mission Bartlett Garage":{ + "g":"9q8yy32jt1", + "l":[ + 37.7568400419, + -122.4204335636 + ] + }, + "Moscone Center Garage":{ + "g":"9q8yywrqv3", + "l":[ + 37.78452379, + -122.3994795 + ] + }, + "Performing Arts Garage":{ + "g":"9q8yyjq9kk", + "l":[ + 37.77810302, + -122.4225312 + ] + }, + "St Marys Square Garage":{ + "g":"9q8yyxgdr7", + "l":[ + 37.79199927, + -122.4045476 + ] + }, + "Sutter Stockton Garage":{ + "g":"9q8yyx6j3w", + "l":[ + 37.7897829226, + -122.4068556189 + ] + }, + "Union Square Garage":{ + "g":"9q8yyx195t", + "l":[ + 37.7876789151, + -122.407447946 + ] + }, + "i":{ + "9q8yvyx176:Japan Center Annex Garage":true, + "9q8yy32jt1:Mission Bartlett Garage":true, + "9q8yy4zbtn:16th and Hoff Garage":true, + "9q8yyjq9kk:Performing Arts Garage":true, + "9q8yymdjgk:Civic Center Garage":true, + "9q8yyn9147:Japan Center Garage":true, + "9q8yyw5p81:Fifth and Mission Garage":true, + "9q8yywccdw:Ellis OFarrell Garage":true, + "9q8yywrqv3:Moscone Center Garage":true, + "9q8yyx195t:Union Square Garage":true, + "9q8yyx6j3w:Sutter Stockton Garage":true, + "9q8yyxgdr7:St Marys Square Garage":true, + "9q8zjcjwuj:Lombard Street Garage":true, + "9q8znb2n3u:Golden Gateway Garage":true + }, + "l":{ + "16th and Hoff Garage":[ + 37.76425207, + -122.4207729 + ], + "Civic Center Garage":[ + 37.7802465669, + -122.4177671135 + ], + "Ellis OFarrell Garage":[ + 37.7863925455, + -122.4071540583 + ], + "Fifth and Mission Garage":[ + 37.7832776731, + -122.405537559 + ], + "Golden Gateway Garage":[ + 37.79544154, + -122.3986032 + ], + "Japan Center Annex Garage":[ + 37.7849547433, + -122.4328661663 + ], + "Japan Center Garage":[ + 37.7849220106, + -122.4301614271 + ], + "Lombard Street Garage":[ + 37.7996475876, + -122.4348921128 + ], + "Mission Bartlett Garage":[ + 37.7568400419, + -122.4204335636 + ], + "Moscone Center Garage":[ + 37.78452379, + -122.3994795 + ], + "Performing Arts Garage":[ + 37.77810302, + -122.4225312 + ], + "St Marys Square Garage":[ + 37.79199927, + -122.4045476 + ], + "Sutter Stockton Garage":[ + 37.7897829226, + -122.4068556189 + ], + "Union Square Garage":[ + 37.7876789151, + -122.407447946 + ] + } + } +} \ No newline at end of file diff --git a/build/apps/parking/react/index.html b/build/apps/parking/react/index.html new file mode 100755 index 00000000..cdf16c83 --- /dev/null +++ b/build/apps/parking/react/index.html @@ -0,0 +1,134 @@ + + + + + Parking App in ReactJS + + + + + + + + + + + + + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + diff --git a/build/apps/parking/react/lib/react-dom-server.js b/build/apps/parking/react/lib/react-dom-server.js new file mode 100755 index 00000000..5a39e799 --- /dev/null +++ b/build/apps/parking/react/lib/react-dom-server.js @@ -0,0 +1,42 @@ +/** + * ReactDOMServer v0.14.7 + * + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js +;(function(f) { + // CommonJS + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = f(require('react')); + + // RequireJS + } else if (typeof define === "function" && define.amd) { + define(['react'], f); + + // + + + + + + + +
    + +

    My Favorite Cities

    +
    + +
    +
    +
    + + + + diff --git a/build/apps/resume/clear-day.png b/build/apps/resume/clear-day.png new file mode 100644 index 00000000..11449a81 Binary files /dev/null and b/build/apps/resume/clear-day.png differ diff --git a/build/apps/resume/clear-night.png b/build/apps/resume/clear-night.png new file mode 100644 index 00000000..cbad7ffe Binary files /dev/null and b/build/apps/resume/clear-night.png differ diff --git a/build/apps/resume/cloudy.png b/build/apps/resume/cloudy.png new file mode 100644 index 00000000..6d407e8e Binary files /dev/null and b/build/apps/resume/cloudy.png differ diff --git a/build/apps/resume/fog.png b/build/apps/resume/fog.png new file mode 100644 index 00000000..d296638c Binary files /dev/null and b/build/apps/resume/fog.png differ diff --git a/build/apps/resume/index.html b/build/apps/resume/index.html new file mode 100644 index 00000000..a5dd5c8b --- /dev/null +++ b/build/apps/resume/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + +
    + +

    Connor McGuinness

    + +

    Programming Languages

    +
      +
    + +

    Work Experience

    +
      +
    + +

    Education

    +
      +
    + +
    + + + + \ No newline at end of file diff --git a/build/apps/resume/partly-cloudy-day.png b/build/apps/resume/partly-cloudy-day.png new file mode 100644 index 00000000..5b61d825 Binary files /dev/null and b/build/apps/resume/partly-cloudy-day.png differ diff --git a/build/apps/resume/partly-cloudy-night.png b/build/apps/resume/partly-cloudy-night.png new file mode 100644 index 00000000..5b61d825 Binary files /dev/null and b/build/apps/resume/partly-cloudy-night.png differ diff --git a/build/apps/resume/rain.png b/build/apps/resume/rain.png new file mode 100644 index 00000000..62aa9443 Binary files /dev/null and b/build/apps/resume/rain.png differ diff --git a/build/apps/resume/react/components/about.js b/build/apps/resume/react/components/about.js new file mode 100644 index 00000000..b55597ab --- /dev/null +++ b/build/apps/resume/react/components/about.js @@ -0,0 +1,20 @@ +MyComponents.About = React.createClass({ + + render: function() { + return ( +
    +
    + Connor McGuinness + +

    Major: Bachelor of the Arts in Computer Science

    +

    Certificate: Certificate in Technology, Art, & Media

    +
    + my github +
    +
    + +
    + ); + } + +}); diff --git a/build/apps/resume/react/components/city-list.js b/build/apps/resume/react/components/city-list.js new file mode 100644 index 00000000..c9372a0e --- /dev/null +++ b/build/apps/resume/react/components/city-list.js @@ -0,0 +1,35 @@ +MyComponents.City = React.createClass({ + + render: function() { + return ( +
    +
    + TODO: This is a component to display the weather of a city. + Raw props data is {JSON.stringify(this.props.city)} +
    +
    + ); + } + +}); + +MyComponents.CityList = React.createClass({ + render: function() { + + var cityElements = this.props.cities.map(function(c,i){ + return + }) + + return ( +
    +
    + TODO: This is a component to display the weather of a list of cities + Raw props data is {JSON.stringify(this.props.cities)} + + {cityElements} + +
    +
    + ); + } +}); diff --git a/build/apps/resume/react/components/navbar.js b/build/apps/resume/react/components/navbar.js new file mode 100644 index 00000000..6078a7c2 --- /dev/null +++ b/build/apps/resume/react/components/navbar.js @@ -0,0 +1,17 @@ +MyComponents.NavBar = React.createClass({ + render: function() { + return ( + + ); + } +}); diff --git a/build/apps/resume/react/components/skill-list.js b/build/apps/resume/react/components/skill-list.js new file mode 100644 index 00000000..274588ef --- /dev/null +++ b/build/apps/resume/react/components/skill-list.js @@ -0,0 +1,27 @@ +MyComponents.Skill = React.createClass({ + render: function() { + return ( +
      + {this.props.skill.name} +

      I have written code in {this.props.skill.name} for {this.props.skill.years} years

      +
    + ); + } +}); + +MyComponents.SkillList = React.createClass({ + render: function() { + + var skillElements = this.props.skills.map(function(s,i){ + return + }) + + return ( +
    +
    +
      {skillElements}
    +
    +
    + ); + } +}); diff --git a/build/apps/resume/react/components/task-list.js b/build/apps/resume/react/components/task-list.js new file mode 100644 index 00000000..0eb1c638 --- /dev/null +++ b/build/apps/resume/react/components/task-list.js @@ -0,0 +1,35 @@ +MyComponents.Task = React.createClass({ + + render: function() { + return ( +
    +
    + TODO: This is a component to display a task. + Raw props data is {JSON.stringify(this.props.task)} +
    +
    + ); + } + +}); + +MyComponents.TaskList = React.createClass({ + render: function() { + + var taskElements = this.props.tasks.map(function(t,i){ + return + }) + + return ( +
    +
    + TODO: This is a component to display a list of tasks + assigned to me. Raw props data is {JSON.stringify(this.props.tasks)} + + {taskElements} + +
    +
    + ); + } +}); diff --git a/build/apps/resume/react/index.html b/build/apps/resume/react/index.html new file mode 100644 index 00000000..5e8fd8d6 --- /dev/null +++ b/build/apps/resume/react/index.html @@ -0,0 +1,105 @@ + + + + + Connor McGuinness Resume in ReactJS + + + + + + + + + + + + + + + + + + + +
    + + +

    About Me

    +
    + +

    Skills

    +
    + +

    Tasks

    +
    + +

    Favorite Cities

    +
    +
    + + + + + + + + + + + + + + + + diff --git a/build/apps/resume/react/lib/react-dom-server.js b/build/apps/resume/react/lib/react-dom-server.js new file mode 100644 index 00000000..5a39e799 --- /dev/null +++ b/build/apps/resume/react/lib/react-dom-server.js @@ -0,0 +1,42 @@ +/** + * ReactDOMServer v0.14.7 + * + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js +;(function(f) { + // CommonJS + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = f(require('react')); + + // RequireJS + } else if (typeof define === "function" && define.amd) { + define(['react'], f); + + // + + + +
    + +

    Subscribe

    + +
    +
    + + +
    +
    + +
    +
    + Submit +
    +
    + +
    +

    Current Subscribers

    +
      +
    +
    +
    + + + + diff --git a/build/apps/resume/umbrella-2.png b/build/apps/resume/umbrella-2.png new file mode 100644 index 00000000..b5e2045c Binary files /dev/null and b/build/apps/resume/umbrella-2.png differ diff --git a/build/apps/resume/wind.png b/build/apps/resume/wind.png new file mode 100644 index 00000000..def6259d Binary files /dev/null and b/build/apps/resume/wind.png differ diff --git a/build/apps/todos/high.html b/build/apps/todos/high.html new file mode 100644 index 00000000..1333ed77 --- /dev/null +++ b/build/apps/todos/high.html @@ -0,0 +1 @@ +TODO diff --git a/build/apps/todos/inbox.html b/build/apps/todos/inbox.html new file mode 100644 index 00000000..6d1a97ba --- /dev/null +++ b/build/apps/todos/inbox.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + +
    + +

    Adding a Task

    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + Submit +
    +
    +
    + + + + diff --git a/build/apps/todos/index.html b/build/apps/todos/index.html new file mode 100644 index 00000000..054e8aef --- /dev/null +++ b/build/apps/todos/index.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + +
    + +

    Tasks

    +
    +
    + +
    + + + + diff --git a/build/apps/todos/low.html b/build/apps/todos/low.html new file mode 100644 index 00000000..1333ed77 --- /dev/null +++ b/build/apps/todos/low.html @@ -0,0 +1 @@ +TODO diff --git a/build/apps/todos/medium.html b/build/apps/todos/medium.html new file mode 100644 index 00000000..1333ed77 --- /dev/null +++ b/build/apps/todos/medium.html @@ -0,0 +1 @@ +TODO diff --git a/build/css/leaflet.label.css b/build/css/leaflet.label.css new file mode 100644 index 00000000..95e60964 --- /dev/null +++ b/build/css/leaflet.label.css @@ -0,0 +1,54 @@ +.leaflet-label { + background: rgb(235, 235, 235); + background: rgba(235, 235, 235, 0.81); + background-clip: padding-box; + border-color: #777; + border-color: rgba(0,0,0,0.25); + border-radius: 4px; + border-style: solid; + border-width: 4px; + color: #111; + display: block; + font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif; + font-weight: bold; + padding: 1px 6px; + position: absolute; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + white-space: nowrap; + z-index: 6; +} + +.leaflet-label.leaflet-clickable { + cursor: pointer; + pointer-events: auto; +} + +.leaflet-label:before, +.leaflet-label:after { + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + content: none; + position: absolute; + top: 5px; +} + +.leaflet-label:before { + border-right: 6px solid black; + border-right-color: inherit; + left: -10px; +} + +.leaflet-label:after { + border-left: 6px solid black; + border-left-color: inherit; + right: -10px; +} + +.leaflet-label-right:before, +.leaflet-label-left:after { + content: ""; +} diff --git a/build/hackathons/01-18/index.html b/build/hackathons/01-18/index.html new file mode 100644 index 00000000..356bcded --- /dev/null +++ b/build/hackathons/01-18/index.html @@ -0,0 +1,81 @@ + + + + + + + + + + + +
    +

    Hackathon: ToDos v2

    +

    Date: 01-18-2016

    +

    Objective

    +

    Your clients liked the initial version of the ToDos app you built. They came +back with a list of new requirements. Build them!

    +

    Due

    +

    Tuesday @ 11:59pm, 1/19/2016

    +

    Requirements

    +
      +
    • [ ] There should be three separate pages showing tasks with different priority values
        +
      1. high
      2. +
      3. medium
      4. +
      5. low
      6. +
      +
    • +
    • [ ] The landing page of the app (index.html) should contain +a navigation bar with links to these three pages.
    • +
    • [ ] When a task’s priority value is modified (e.g., medium –> high), all four pages +(index, low, medium, high) are automatically refreshed.
    • +
    +

    Hints

    +

    Priority

    +

    There are at least two approaches to showing tasks with different priorities on separate +pages:

    +
      +
    1. Keep the current Firebase data structure. Each page retrieves the entire list +of tasks and does its own filtering based on the priority value, or
    2. +
    3. Modify the Firebase data structure so that tasks are organized by three separate +child data locations, such as todos/low, todos/medium, and todos/high.
    4. +
    +

    Make your own decision which approach to take. You are not limited to these two +approaches. When we meet again next Monday. We will discuss the props +and cons of various approaches.

    +

    Real-time Syncing

    +
      +
    • Use Firebase.on() instead of +Firebase.once()
    • +
    • Modification of a task’s priority value can be simulated by changing the value in the Firebase +database browser GUI. Then, with all the four pages open in a browser, you should +expect their contents to refresh on their own automatically.
    • +
    + +
    + + + + diff --git a/build/hackathons/01-25/index.html b/build/hackathons/01-25/index.html new file mode 100644 index 00000000..a230a197 --- /dev/null +++ b/build/hackathons/01-25/index.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +
    +

    Date: 01-25-2016

    +

    Special Guest

    +

    Heather Dykstra and Alana Russell from Zayo will be visiting our class to give +a presentation about Zayo and a business case for our class to build apps for.

    +

    Hackathon: Demo

    +

    Objective

    +

    Demo the ToDo’s app your team has built over the first two weeks of the class.

    +

    Time

    +

    5 minutes each team

    + +
    + + + + diff --git a/build/hackathons/02-01/index.html b/build/hackathons/02-01/index.html new file mode 100644 index 00000000..c1d9e9fa --- /dev/null +++ b/build/hackathons/02-01/index.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +
    +

    Date: 02-01-2016

    +

    Hackathon: Real-time Map Mashup

    +

    Objective

    +

    Put more real-time map data on your team’s parking map.

    +

    Real-time Transit

    +

    Use the Transit Open Datasets +to plot the real-time locations of bus vehicles on your parking app’s map. +The Firebase location corresponding to the city of San Francisco is sf-muni.

    +

    Real-time Customer Locations

    +

    Write a sever-side script to simulate the behaviors of the customers of your app +who are entering and leaving the app. On your parking apps’ map, display these +simulated customers in real-time.

    +

    A skeleton script is provided at /workers/simulate-parking-customers.js.

    +

    You need to first install some NPM packages by

    +

    npm install

    +

    To run the worker, assuming you are at the root of your book, do

    +

    node workers/simulate-parking-customers.js

    +

    You should see output like this:

    +

    screen

    +

    Hints

    +
      +
    • Decide on a Firebase location to store a list of current customers.
    • +
    • Use the randomly generated name as the key.
    • +
    • Implement enter() and leave() by adding the appropriate Firebase API +calls to write and delete customers at that Firebase location of your choice.
    • +
    • Feel free to adjust the simulator parameters such as the duration.
    • +
    • On the front-end side (i.e., /apps/parking/garages_map.html), subscribe to the same Firebase location so that your +app can always show the active customers (those who have entered but have not left).
    • +
    +

    Submission

    +
      +
    • Use http://recordit.co/ to create a demo as an animated +gif. Make sure your demo clearly shows three types of real-time activities: +garages, buses, and customers.
    • +
    • Post it to #demo on Slack, along with your team members’ names.
    • +
    + +
    + + + + diff --git a/build/hackathons/02-01/screen.png b/build/hackathons/02-01/screen.png new file mode 100644 index 00000000..b8349770 Binary files /dev/null and b/build/hackathons/02-01/screen.png differ diff --git a/build/index.html b/build/index.html new file mode 100644 index 00000000..c857dceb --- /dev/null +++ b/build/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +
    +

    Book

    +

    Everything I’ve learned from UCDD 2 - Spring 2016.

    +

    Apps

    + +

    Learning

    + +

    Upcoming

    + +

    Hackathons

    + + +
    + + + + diff --git a/build/js/leaflet.label.js b/build/js/leaflet.label.js new file mode 100644 index 00000000..c9caec6e --- /dev/null +++ b/build/js/leaflet.label.js @@ -0,0 +1,9 @@ +/* + Leaflet.label, a plugin that adds labels to markers and vectors for Leaflet powered maps. + (c) 2012-2013, Jacob Toye, Smartrak + + https://github.com/Leaflet/Leaflet.label + http://leafletjs.com + https://github.com/jacobtoye +*/ +(function(t){var e=t.L;e.labelVersion="0.2.2-dev",e.Label=(e.Layer?e.Layer:e.Class).extend({includes:e.Mixin.Events,options:{className:"",clickable:!1,direction:"right",noHide:!1,offset:[12,-15],opacity:1,zoomAnimation:!0},initialize:function(t,i){e.setOptions(this,t),this._source=i,this._animated=e.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._pane=this.options.pane?t._panes[this.options.pane]:this._source instanceof e.Marker?t._panes.markerPane:t._panes.popupPane,this._container||this._initLayout(),this._pane.appendChild(this._container),this._initInteraction(),this._update(),this.setOpacity(this.options.opacity),t.on("moveend",this._onMoveEnd,this).on("viewreset",this._onViewReset,this),this._animated&&t.on("zoomanim",this._zoomAnimation,this),e.Browser.touch&&!this.options.noHide&&(e.DomEvent.on(this._container,"click",this.close,this),t.on("click",this.close,this))},onRemove:function(t){this._pane.removeChild(this._container),t.off({zoomanim:this._zoomAnimation,moveend:this._onMoveEnd,viewreset:this._onViewReset},this),this._removeInteraction(),this._map=null},setLatLng:function(t){return this._latlng=e.latLng(t),this._map&&this._updatePosition(),this},setContent:function(t){return this._previousContent=this._content,this._content=t,this._updateContent(),this},close:function(){var t=this._map;t&&(e.Browser.touch&&!this.options.noHide&&(e.DomEvent.off(this._container,"click",this.close),t.off("click",this.close,this)),t.removeLayer(this))},updateZIndex:function(t){this._zIndex=t,this._container&&this._zIndex&&(this._container.style.zIndex=t)},setOpacity:function(t){this.options.opacity=t,this._container&&e.DomUtil.setOpacity(this._container,t)},_initLayout:function(){this._container=e.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this.updateZIndex(this._zIndex)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updatePosition(),this._container.style.visibility="")},_updateContent:function(){this._content&&this._map&&this._prevContent!==this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content,this._prevContent=this._content,this._labelWidth=this._container.offsetWidth)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},_setPosition:function(t){var i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=this._labelWidth,h=e.point(this.options.offset);"right"===a||"auto"===a&&s.xn;n++)e.DomEvent.on(t,i[n],this._fireMouseEvent,this)}},_removeInteraction:function(){if(this.options.clickable){var t=this._container,i=["dblclick","mousedown","mouseover","mouseout","contextmenu"];e.DomUtil.removeClass(t,"leaflet-clickable"),e.DomEvent.off(t,"click",this._onMouseClick,this);for(var n=0;i.length>n;n++)e.DomEvent.off(t,i[n],this._fireMouseEvent,this)}},_onMouseClick:function(t){this.hasEventListeners(t.type)&&e.DomEvent.stopPropagation(t),this.fire(t.type,{originalEvent:t})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&e.DomEvent.preventDefault(t),"mousedown"!==t.type?e.DomEvent.stopPropagation(t):e.DomEvent.preventDefault(t)}}),e.BaseMarkerMethods={showLabel:function(){return this.label&&this._map&&(this.label.setLatLng(this._latlng),this._map.showLabel(this.label)),this},hideLabel:function(){return this.label&&this.label.close(),this},setLabelNoHide:function(t){this._labelNoHide!==t&&(this._labelNoHide=t,t?(this._removeLabelRevealHandlers(),this.showLabel()):(this._addLabelRevealHandlers(),this.hideLabel()))},bindLabel:function(t,i){var n=this.options.icon?this.options.icon.options.labelAnchor:this.options.labelAnchor,o=e.point(n)||e.point(0,0);return o=o.add(e.Label.prototype.options.offset),i&&i.offset&&(o=o.add(i.offset)),i=e.Util.extend({offset:o},i),this._labelNoHide=i.noHide,this.label||(this._labelNoHide||this._addLabelRevealHandlers(),this.on("remove",this.hideLabel,this).on("move",this._moveLabel,this).on("add",this._onMarkerAdd,this),this._hasLabelHandlers=!0),this.label=new e.Label(i,this).setContent(t),this},unbindLabel:function(){return this.label&&(this.hideLabel(),this.label=null,this._hasLabelHandlers&&(this._labelNoHide||this._removeLabelRevealHandlers(),this.off("remove",this.hideLabel,this).off("move",this._moveLabel,this).off("add",this._onMarkerAdd,this)),this._hasLabelHandlers=!1),this},updateLabelContent:function(t){this.label&&this.label.setContent(t)},getLabel:function(){return this.label},_onMarkerAdd:function(){this._labelNoHide&&this.showLabel()},_addLabelRevealHandlers:function(){this.on("mouseover",this.showLabel,this).on("mouseout",this.hideLabel,this),e.Browser.touch&&this.on("click",this.showLabel,this)},_removeLabelRevealHandlers:function(){this.off("mouseover",this.showLabel,this).off("mouseout",this.hideLabel,this),e.Browser.touch&&this.off("click",this.showLabel,this)},_moveLabel:function(t){this.label.setLatLng(t.latlng)}},e.Icon.Default.mergeOptions({labelAnchor:new e.Point(9,-20)}),e.Marker.mergeOptions({icon:new e.Icon.Default}),e.Marker.include(e.BaseMarkerMethods),e.Marker.include({_originalUpdateZIndex:e.Marker.prototype._updateZIndex,_updateZIndex:function(t){var e=this._zIndex+t;this._originalUpdateZIndex(t),this.label&&this.label.updateZIndex(e)},_originalSetOpacity:e.Marker.prototype.setOpacity,setOpacity:function(t,e){this.options.labelHasSemiTransparency=e,this._originalSetOpacity(t)},_originalUpdateOpacity:e.Marker.prototype._updateOpacity,_updateOpacity:function(){var t=0===this.options.opacity?0:1;this._originalUpdateOpacity(),this.label&&this.label.setOpacity(this.options.labelHasSemiTransparency?this.options.opacity:t)},_originalSetLatLng:e.Marker.prototype.setLatLng,setLatLng:function(t){return this.label&&!this._labelNoHide&&this.hideLabel(),this._originalSetLatLng(t)}}),e.CircleMarker.mergeOptions({labelAnchor:new e.Point(0,0)}),e.CircleMarker.include(e.BaseMarkerMethods),e.Path.include({bindLabel:function(t,i){return this.label&&this.label.options===i||(this.label=new e.Label(i,this)),this.label.setContent(t),this._showLabelAdded||(this.on("mouseover",this._showLabel,this).on("mousemove",this._moveLabel,this).on("mouseout remove",this._hideLabel,this),e.Browser.touch&&this.on("click",this._showLabel,this),this._showLabelAdded=!0),this},unbindLabel:function(){return this.label&&(this._hideLabel(),this.label=null,this._showLabelAdded=!1,this.off("mouseover",this._showLabel,this).off("mousemove",this._moveLabel,this).off("mouseout remove",this._hideLabel,this)),this},updateLabelContent:function(t){this.label&&this.label.setContent(t)},_showLabel:function(t){this.label.setLatLng(t.latlng),this._map.showLabel(this.label)},_moveLabel:function(t){this.label.setLatLng(t.latlng)},_hideLabel:function(){this.label.close()}}),e.Map.include({showLabel:function(t){return this.addLayer(t)}}),e.FeatureGroup.include({clearLayers:function(){return this.unbindLabel(),this.eachLayer(this.removeLayer,this),this},bindLabel:function(t,e){return this.invoke("bindLabel",t,e)},unbindLabel:function(){return this.invoke("unbindLabel")},updateLabelContent:function(t){this.invoke("updateLabelContent",t)}})})(window,document); \ No newline at end of file diff --git a/build/learning/intro/index.html b/build/learning/intro/index.html new file mode 100644 index 00000000..35a357c1 --- /dev/null +++ b/build/learning/intro/index.html @@ -0,0 +1,106 @@ + + + + + + + + + + + +
    +

    Intro

    +

    Welcome to the 2016 edition of UCDD II!

    +

    Today is introduction. We will go through the three major learning components +of this class:

    +
      +
    1. Team Learning (Due: every Friday @ 11:59pm)
    2. +
    3. Individual Learning (Due: every Sunday @ 11:59pm)
    4. +
    5. Hackathon (starts the following Monday @ 4pm)
    6. +
    +

    Team Learning

    +

    Objective

    +

    Develop a TODO list app.

    +

    Teaming

    +
      +
    • Four people per team.
    • +
    • No more than 2 graduate students on each team.
    • +
    • Teams will change every three or four weeks.
    • +
    +

    Milestones

    +
      +
    • [ ] EVERYONE should fork the Git repository of this book.
    • +
    • [ ] Get the template code in apps/todos/index.html to run
    • +
    • [ ] Modify the code to show your team’s name
    • +
    • [ ] Use your team’s own Firebase to serve the task data
    • +
    +

    Submission

    +
      +
    • The deadline is always Friday @ 11:59pm.
    • +
    • Source code is pushed to Github.
    • +
    • App is deployed at Firebase.
    • +
    • Only one person needs to be responsible for submitting by the deadline.
    • +
    +

    Individual Learning

    +

    Objective

    + +

    Submission

    +
      +
    • The deadline is always Sunday @ 11:59pm.
    • +
    • Source code is pushed to Github.
    • +
    • App is deployed at Firebase.
    • +
    • Each person is responsible for submitting his or her own work by the deadline.
    • +
    +

    Hackathon

    +

    At the beginning of each hackathon, a list of new (secret) feature requirements will +be released. Your team will be given some amount of time to add these requirements +to your app.

    +

    Feature Requirements

    +
      +
    • Use an object to represent each task (rather than using a string) so that +each task can have multiple fields.
    • +
    • Each task object should have two fields: title, and priority. Priority can be +high, medium, low.
    • +
    +

    Submission

    +
      +
    • The deadline is sometime during the class, depending on the hackathon’s level +of difficulty.
    • +
    • Your team’s updated app (with the new requirements implemented) should be deployed +at Firebase.
    • +
    +

    Presentation

    +

    After the time is up, we will have presentations from teams. Sometimes we +have time for every team to present. Sometimes we will select only a few teams.

    + +
    + + + + diff --git a/build/learning/week1/index.html b/build/learning/week1/index.html new file mode 100644 index 00000000..86f8951c --- /dev/null +++ b/build/learning/week1/index.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +
    +

    Week 1

    +

    Team Learning

    +

    Objective

    +

    Enhance your team’s TODO list app.

    +

    Requirements

    +
      +
    • [ ] Three additional fields need to be added to each task object: priority, type, and deadline.
    • +
    • [ ] Use the CSS, Components, and JavaScript provided by materializecss to make the app pretty.
    • +
    • [ ] The Firebase database must be populated with at least 10 tasks for a reasonable demo.
    • +
    +

    Individual Learning

    +
      +
    • [ ] Add more data to enrich your personal resume app. Data must include typical items that go on your resume.
    • +
    • [ ] The data must be pulled from Firebase in realtime, rather than hardcoded.
    • +
    +

    Submission

    +
      +
    • Commit/Push your source code to Github.
    • +
    • Deploy your resume app to Firebase
    • +
    +

    Hackathon

    +

    Details will be announced on Monday 4pm.

    +
      +
    • Start: Monday, 1/18 @ 4pm
    • +
    • Due: Tuesday, 1/19 @ 11:59pm
    • +
    + +
    + + + + diff --git a/build/learning/week2/index.html b/build/learning/week2/index.html new file mode 100644 index 00000000..1bcdde9d --- /dev/null +++ b/build/learning/week2/index.html @@ -0,0 +1,87 @@ + + + + + + + + + + + +
    +

    Week 2

    +

    Team Learning

    +

    Objective

    +

    ToDos App v.3

    +

    Your clients came back with even more requirements. They want to be able +to edit the tasks directly through the app (not through the Firebase dashboard).

    +

    Due

    +

    Friday @ 11:59pm, 1/22/2016

    +

    Requirements

    +
      +
    • [ ] There should be an inbox page (inbox.html) for adding a +new task.
    • +
    • [ ] Each new task should at least have the following fields:
        +
      • title
      • +
      • priority
      • +
      • assigned (someone’s Github id)
      • +
      • due (a date)
      • +
      • completed (always set to false when it’s created)
      • +
      +
    • +
    • [ ] In the main page (index.html), each task should have a complete button. When clicked, +the task is marked as complete, and the visual representation of this task should be updated +accordingly.
    • +
    +

    Individual Learning

    +

    Due

    +

    Sunday @ 11:59pm, 1/24/2016

    +

    Requirements

    +
      +
    • [ ] Add a Tasks section the main page of your resume app (index.html). +This section should displays a list of tasks assigned to you. These tasks are pulled from your team’s Firebase.
    • +
    • [ ] Create a Subscribe page (subscribe.html). +This page should have a simple text box for a visitor (e.g., prospective employer) +to enter an email address to subscribe to a mailing list. Each email address should +be stored to the Firebase. Also, the page should display all the subscribers’ emails.
    • +
    +

    Submission

    +
      +
    • Commit/Push your source code to Github.
    • +
    • Deploy your resume app to Firebase
    • +
    +

    Hackathon

    +

    Details will be announced on Monday 4pm.

    +
      +
    • Start: Monday, 1/25 @ 4pm
    • +
    • Due: Monday, 1/25 @ 6:30pm
    • +
    + +
    + + + + diff --git a/build/learning/week3/index.html b/build/learning/week3/index.html new file mode 100644 index 00000000..d1ab6717 --- /dev/null +++ b/build/learning/week3/index.html @@ -0,0 +1,106 @@ + + + + + + + + + + + +
    +

    Week 3

    +

    The main topic this week is building map-based apps backed by realtime data.

    +

    Team Learning

    +

    Teaming

    +

    We will make new teaming arrangements this week. Thank your current teammates +for their contributions during the past two weeks. Say hello to your new teammates.

    +

    Objective

    +

    Designing and building a parking app for the city of San Francisco.

    +

    Resources

    + +

    Due

    +

    Friday @ 11:59pm, 1/29/2016

    +

    Requirements

    +
      +
    • [ ] There should be a page providing a list view of all the garages and +their current statuses (garages.html).
        +
      • Nicely display and organize key information about each garage using +a styling toolkit (e.g., materializecss or something similar).
      • +
      +
    • +
    • [ ] There should be a page providing a map view of all the garage sand +their current statuses (garages_map.html).
        +
      • Use a combination of the sizes, colors, and types of markers, and text labels to visualize +important information such as the number of open parking spaces, cost …etc.
      • +
      +
    • +
    • [ ] There should be an index page that serves as a landing page to these +two pages (index.html).
    • +
    • [ ] The information on these two pages should be updated / refreshed in realtime.
    • +
    +

    Individual Learning

    +

    Objective

    +

    Add a My Favorite Cities that will display the +weather of the five major US cities that are your favorites.

    +

    Resources

    + +

    Due

    +

    Sunday @ 11:59pm, 1/31/2016

    +

    Requirements

    +
      +
    • [ ] On the cities page (cities.html), show FIVE of your favorite cities’ weather information.
    • +
    • [ ] For each city, show the weather details of this city as an item inside +<div id="cities">. Provide as much useful weather information as possible. It must look nice.
    • +
    • [ ] For each city, show a marker to indicate the location of this city on the +US map. Use colors, symbols, or sizes to visualize its current weather.
    • +
    • [ ] The information on the cities page should get refreshed automatically +in realtime when there’s an update. Hint: You may need to add markersLayerGroup.clearLayers() +somewhere to clear all the markers before redrawing the markers.
    • +
    +

    Submission

    +
      +
    • Commit/Push your source code to Github.
    • +
    • Deploy your resume app to Firebase
    • +
    + +
    + + + + diff --git a/build/learning/week4/index.html b/build/learning/week4/index.html new file mode 100644 index 00000000..56d63d26 --- /dev/null +++ b/build/learning/week4/index.html @@ -0,0 +1,107 @@ + + + + + + + + + + + +
    +

    Week 4

    +

    The main topic this week is ReactJS.

    +

    Resources

    + +

    Discussion Questions

    +
      +
    1. What is a Virtual DOM and why?
    2. +
    3. What are the advantages of your team’s ReactJS implementation of the parking +app or your own implementation of the resume app over the original implementation?
    4. +
    +

    (In our next meeting, a team will be randomly chosen to answer each question.)

    +

    Team Learning

    +

    Objective

    +

    Rebuild some key functionalities of the parking app in ReactJS.

    +

    Due

    +

    Friday @ 11:59pm, 2/4/2016

    +

    Requirements

    +
      +
    • [ ] The Team component should be fully implemented.
    • +
    • [ ] The Garage component should be fully implemented.
        +
      • [ ] The Garage Title component should be fully implemented.
      • +
      • [ ] The Garage Spaces component should be fully implemented.
      • +
      • [ ] The Garage Rates component should be fully implemented.
      • +
      • [ ] The Garage Hours component should be fully implemented.
      • +
      +
    • +
    • [ ] The app should be reasonably pretty, as close to the styling / design of your team’s original garage app as possible.
    • +
    +

    Hints:

    +
      +
    • The data for the team homework is a static JSON file, to make it simpler for you. But +for the individual homework, you will have to deal with real-time Firebase data +as before.
    • +
    • In JSX, use className instead of class when you assign a CSS label to an element.
    • +
    +

    Individual Learning

    +

    Objective

    +

    Rebuild some key functionalities of your personal resume app in ReactJS.

    +

    Due

    +

    Sunday @ 11:59pm, 2/7/2016

    +

    Requirements

    +
      +
    • [ ] The About component should be fully implemented.
        +
      • [ ] Name
      • +
      • [ ] Profile photo
      • +
      • [ ] Major or degree information
      • +
      • [ ] Github link
      • +
      +
    • +
    • [ ] The Skill List component should be fully implemented.
    • +
    • [ ] The Task List component should be fully implemented.
    • +
    • [ ] The City List component should be fully implemented.
    • +
    • [ ] Data used to populate the skill list, task list, and city list should come from +appropriate Firebase locations.
    • +
    +

    Submission

    +
      +
    • Commit/Push your source code to Github.
    • +
    • Deploy your resume app to Firebase
    • +
    + +
    + + + + diff --git a/data.json b/data.json new file mode 100644 index 00000000..eca39ed2 --- /dev/null +++ b/data.json @@ -0,0 +1,63 @@ +{ + + "bio" : { + "education" : [ "University of Colorado at Boulder", "Staples High school" ], + "work" : ["Intern at Webroot Inc.", "CU Nightride professional driver"], + "languages" : ["Javascript", "Swift"] + }, + + "todos" : { + "tasks" : { + "Go to Class" : { + "deadline" : "02/01/2016", + "priority" : "high", + "type" : "education" + }, + "Go to the store" : { + "deadline" : "03/15/2016", + "priority" : "low", + "type" : "food shopping" + }, + "Go to sleep" : { + "deadline" : "01/29/2016", + "priority" : "high", + "type" : "basic human need" + }, + "Call parents" : { + "deadline" : "04/12/2016", + "priority" : "medium", + "type" : "family/friends" + }, + "Go on a date" : { + "deadline" : "04/20/2016", + "priority" : "high", + "type" : "family/friends" + }, + "Finish UCDD2 app" : { + "deadline" : "05/10/2016", + "priority" : "medium", + "type" : "education" + }, + "Appoint team leader" : { + "deadline" : "02/21/2016", + "priority" : "low", + "type" : "education" + }, + "Discuss politics" : { + "deadline" : "01/29/2016", + "priority" : "low", + "type" : "education" + }, + "Enter hackathon" : { + "deadline" : "03/6/2016", + "priority" : "medium", + "type" : "education" + }, + "Watch movie with group members" : { + "deadline" : "04/19/2016", + "priority" : "low", + "type" : "entertainment" + } + } + } +} \ No newline at end of file diff --git a/firebase.json b/firebase.json index ad3818e3..348bb21a 100644 --- a/firebase.json +++ b/firebase.json @@ -1,5 +1,5 @@ { - "firebase": "ucdd2-book", + "firebase": "bookconnormcguinness", "public": "build", "ignore": [ "firebase.json", diff --git a/src/apps/parking/List.jpg b/src/apps/parking/List.jpg new file mode 100755 index 00000000..7dc42bad Binary files /dev/null and b/src/apps/parking/List.jpg differ diff --git a/src/apps/parking/Map.jpg b/src/apps/parking/Map.jpg new file mode 100755 index 00000000..ff0e5b28 Binary files /dev/null and b/src/apps/parking/Map.jpg differ diff --git a/src/apps/parking/background.jpg b/src/apps/parking/background.jpg new file mode 100755 index 00000000..17d898e3 Binary files /dev/null and b/src/apps/parking/background.jpg differ diff --git a/src/apps/parking/busmarker.png b/src/apps/parking/busmarker.png new file mode 100755 index 00000000..afc08fd7 Binary files /dev/null and b/src/apps/parking/busmarker.png differ diff --git a/src/apps/parking/garages.html b/src/apps/parking/garages.html old mode 100644 new mode 100755 index df7b253d..5f20143e --- a/src/apps/parking/garages.html +++ b/src/apps/parking/garages.html @@ -1,30 +1,49 @@ - - - - - - + + + + + + + + + + + + + + + + + +
    +
      +
    - - - - - - -
    +
    -

    Garages

    -
      -
    - -
    - - - - + + + diff --git a/src/apps/parking/garages_map.html b/src/apps/parking/garages_map.html old mode 100644 new mode 100755 index ddaec15a..2cf8fc5e --- a/src/apps/parking/garages_map.html +++ b/src/apps/parking/garages_map.html @@ -1,51 +1,112 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +

    Powered By SFPark.org

    +
    + + - - - - - - -
    +// create a firebase reference to the root +var ref = new Firebase('https://publicdata-transit.firebaseio.com/sf-muni'); + +var customers +var vehicles +var garages +var firstRun = true +// read data from the location san_francisco buses, realtime +ref.child('vehicles').on('value', function(snapshot){ + vehicles = snapshot.val() + markersLayerGroup.clearLayers() + if(!firstRun){ + drawBus(vehicles) + drawGarages(garages) + drawCustomers(customers) + } +}) -

    Garages Map

    -
    -
    - - - + + + diff --git a/src/apps/parking/index.html b/src/apps/parking/index.html old mode 100644 new mode 100755 index bc60bf4b..06e2cd55 --- a/src/apps/parking/index.html +++ b/src/apps/parking/index.html @@ -1 +1,103 @@ -TODO: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/apps/parking/react/background.jpg b/src/apps/parking/react/background.jpg new file mode 100755 index 00000000..17d898e3 Binary files /dev/null and b/src/apps/parking/react/background.jpg differ diff --git a/src/apps/parking/react/components/garage-hours.js b/src/apps/parking/react/components/garage-hours.js old mode 100644 new mode 100755 index d22c7385..6ce4ee56 --- a/src/apps/parking/react/components/garage-hours.js +++ b/src/apps/parking/react/components/garage-hours.js @@ -1,17 +1,20 @@ MyComponents.Hour = React.createClass({ render: function() { - return ( -
    -
    - TODO: This is a component to display an item in the hours array - Raw props data is {JSON.stringify(this.props)} + return( +
    +
    + {this.props.hour.FROM}- {this.props.hour.TO}
    + Beggining: {this.props.hour.BEG}
    + End: {this.props.hour.END} +
    ); } }); - +//TODO: This is a component to display an item in the hours array + // Raw props data is {JSON.stringify(this.props)} MyComponents.GarageHours = React.createClass({ render: function() { @@ -20,13 +23,10 @@ MyComponents.GarageHours = React.createClass({ }) return ( -
    -
    - TODO: This is a component to display the hours of this garage. - Raw props data is {JSON.stringify(this.props)} - - { hours } - +
    +
    + Hours + {hours}
    ); diff --git a/src/apps/parking/react/components/garage-rates.js b/src/apps/parking/react/components/garage-rates.js old mode 100644 new mode 100755 index c5e85bee..90a13340 --- a/src/apps/parking/react/components/garage-rates.js +++ b/src/apps/parking/react/components/garage-rates.js @@ -1,13 +1,26 @@ MyComponents.Rate = React.createClass({ render: function() { + var desc = this.props.rate.DESC + var beginning = this.props.rate.BEG ? this.props.rate.BEG : "" + var end = this.props.rate.END ? this.props.rate.END : "" + var amount = this.props.rate.RATE + var requirement = this.props.rate.RQ + var data = "" + if(beginning != ""){ + data += (beginning + ' - ' + end + ': $' + amount + ' ' + requirement) + } + else{ + data += (desc + ': $' + amount + ' ' + requirement) + } return ( -
    -
    - TODO: This is a component to display a single rate data. - Raw props data is {JSON.stringify(this.props)} -
    +
    +
    +
      +
    • {data}
    • +
    - ); +
    + ); } }); @@ -20,15 +33,12 @@ MyComponents.GarageRates = React.createClass({ }) return ( -
    -
    - TODO: This is a component to display the rates of this garage. - Raw props data is {JSON.stringify(this.props)} - - { rates } - -
    +
    +
    + Rates + { rates } +
    - ); + ); } }); diff --git a/src/apps/parking/react/components/garage-spaces.js b/src/apps/parking/react/components/garage-spaces.js old mode 100644 new mode 100755 index 1cdca99a..860272a2 --- a/src/apps/parking/react/components/garage-spaces.js +++ b/src/apps/parking/react/components/garage-spaces.js @@ -1,12 +1,20 @@ MyComponents.GarageSpaces = React.createClass({ render: function() { + var circle_fill = "green" + if(this.props.open == 0){ + circle_fill = "red" + } return ( -
    -
    - TODO: This is a component to display the number of total spaces - and open spaces. Raw data is {JSON.stringify(this.props)} -
    +
    +
      + Spaces +
      +
      - ); +
    • Open Spaces: {this.props.open}
    • +
    • Total Spaces: {this.props.total}
    • +
    +
    + ); } }); diff --git a/src/apps/parking/react/components/garage-title.js b/src/apps/parking/react/components/garage-title.js old mode 100644 new mode 100755 index 7f557e07..6f23bde4 --- a/src/apps/parking/react/components/garage-title.js +++ b/src/apps/parking/react/components/garage-title.js @@ -1,13 +1,11 @@ MyComponents.GarageTitle = React.createClass({ render: function() { return ( -
    -
    - TODO: This is a component to display the title of this garage - Raw props data is {JSON.stringify(this.props)} -

    {this.props.title}

    -
    +
    +
    + {this.props.title}
    - ); +
    + ); } }); diff --git a/src/apps/parking/react/components/garage.js b/src/apps/parking/react/components/garage.js old mode 100644 new mode 100755 index 7d61d55a..daa55ea4 --- a/src/apps/parking/react/components/garage.js +++ b/src/apps/parking/react/components/garage.js @@ -7,10 +7,7 @@ MyComponents.Garage = React.createClass({ render: function() { return ( -
    -
    - TODO: This is a component about a garage whose - raw data is {JSON.stringify(this.props.garage)} +
    -
    ); } diff --git a/src/apps/parking/react/components/helloworld.js b/src/apps/parking/react/components/helloworld.js old mode 100644 new mode 100755 diff --git a/src/apps/parking/react/components/navbar.js b/src/apps/parking/react/components/navbar.js old mode 100644 new mode 100755 index a38c6d89..6b932caa --- a/src/apps/parking/react/components/navbar.js +++ b/src/apps/parking/react/components/navbar.js @@ -1,14 +1,12 @@ MyComponents.NavBar = React.createClass({ render: function() { return ( -