diff --git a/build.js b/build.js index a277f9e9..b4d8f147 100644 --- a/build.js +++ b/build.js @@ -13,7 +13,8 @@ metalsmith(__dirname) .use(markdown({ smartypants: true, gfm: true, - tables: true + tables: true, + langPrefix: '' })) .use(layouts({ engine: 'handlebars', diff --git a/build/apps/garages_map.html b/build/apps/garages_map.html new file mode 100644 index 00000000..1c4b1e75 --- /dev/null +++ b/build/apps/garages_map.html @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ +
+ + + + + + \ No newline at end of file diff --git a/build/apps/parking/garages_map.html b/build/apps/parking/garages_map.html new file mode 100644 index 00000000..eb3ad617 --- /dev/null +++ b/build/apps/parking/garages_map.html @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ +
+ + + + + + \ No newline at end of file diff --git a/build/apps/parking/images/asia.png b/build/apps/parking/images/asia.png new file mode 100644 index 00000000..6dc596c4 Binary files /dev/null and b/build/apps/parking/images/asia.png differ diff --git a/build/apps/parking/images/bus.png b/build/apps/parking/images/bus.png new file mode 100644 index 00000000..6dcdf6be Binary files /dev/null and b/build/apps/parking/images/bus.png differ diff --git a/build/apps/parking/images/marker.png b/build/apps/parking/images/marker.png new file mode 100644 index 00000000..276bcd17 Binary files /dev/null and b/build/apps/parking/images/marker.png differ diff --git a/build/apps/parking/images/person.png b/build/apps/parking/images/person.png new file mode 100644 index 00000000..6e5aba6a Binary files /dev/null and b/build/apps/parking/images/person.png differ diff --git a/build/apps/parking/images/sf2.jpg b/build/apps/parking/images/sf2.jpg new file mode 100644 index 00000000..4c382451 Binary files /dev/null and b/build/apps/parking/images/sf2.jpg differ diff --git a/build/apps/parking/index.html b/build/apps/parking/index.html new file mode 100644 index 00000000..85a02402 --- /dev/null +++ b/build/apps/parking/index.html @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + +
+
+

San Francisco Parking Garages

+

A simple parking garage app that displays information on open parking garages.

+

+ +
+
+ + + + + + \ No newline at end of file diff --git a/build/apps/parking/react/components/garage-hours.js b/build/apps/parking/react/components/garage-hours.js new file mode 100644 index 00000000..8d9e5c5a --- /dev/null +++ b/build/apps/parking/react/components/garage-hours.js @@ -0,0 +1,38 @@ +// Dependencies: +// - MyComponents.GarageRates + +MyComponents.Hour = React.createClass({ + render: function() { + + var to; + if (typeof(this.props.hour.TO)!="undefined") { + to = " - " + this.props.hour.TO + } + else { + to = " " + } + + return ( + {this.props.hour.FROM}{to}{this.props.hour.BEG} - {this.props.hour.END} + ) + } +}) + +MyComponents.GarageHours = React.createClass({ + render: function() { + + var hours = this.props.hours.map(function(h, i){ + return + }) + + return ( +
+ + + {hours} +
Day of the WeekTime
+
+ ) + } +}) + diff --git a/build/apps/parking/react/components/garage-rates.js b/build/apps/parking/react/components/garage-rates.js new file mode 100644 index 00000000..4663bdb4 --- /dev/null +++ b/build/apps/parking/react/components/garage-rates.js @@ -0,0 +1,41 @@ +// Dependencies: +// - MyComponents.GarageHours + +MyComponents.Rate = React.createClass({ + render: function() { + + var beg, end, desc; + if (typeof(this.props.rate.DESC)!="undefined") { + beg = "" + end = "" + desc = this.props.rate.DESC + } + else { + desc = "" + end = " - "+this.props.rate.END + beg = this.props.rate.BEG + } + + return ( + {beg}{end}{desc}${this.props.rate.RATE} {this.props.rate.RQ.toLowerCase()} + ) + } +}) + +MyComponents.GarageRates = React.createClass({ + render: function() { + + var rates = this.props.rates.map(function(r,i){ + return + }) + + return ( +
+ + + {rates} +
TimesRate
+
+ ) + } +}) \ No newline at end of file diff --git a/build/apps/parking/react/components/garage-spaces.js b/build/apps/parking/react/components/garage-spaces.js new file mode 100644 index 00000000..dc1bcd5f --- /dev/null +++ b/build/apps/parking/react/components/garage-spaces.js @@ -0,0 +1,12 @@ +MyComponents.GarageSpaces = React.createClass({ + render: function() { + return ( +
+
+ error Open Spaces +

{this.props.open} left

+
+
+ ); + } +}); \ No newline at end of file diff --git a/build/apps/parking/react/components/garage-title.js b/build/apps/parking/react/components/garage-title.js new file mode 100644 index 00000000..90c35f81 --- /dev/null +++ b/build/apps/parking/react/components/garage-title.js @@ -0,0 +1,7 @@ +MyComponents.GarageTitle = React.createClass({ + render: function() { + return ( +

{this.props.title}

+ ); + } +}); \ No newline at end of file diff --git a/build/apps/parking/react/components/garage.js b/build/apps/parking/react/components/garage.js new file mode 100644 index 00000000..1dacf765 --- /dev/null +++ b/build/apps/parking/react/components/garage.js @@ -0,0 +1,24 @@ +// Dependencies: +// - MyComponents.GarageSpaces +// - MyComponents.GarageTitle +// - MyComponents.GarageHours +// - MyComponents.GarageRates + + +MyComponents.Garage = React.createClass({ + render: function() { + return ( +
+ + + + +
+ ); + } +}); \ No newline at end of file diff --git a/build/apps/parking/react/components/helloworld.js b/build/apps/parking/react/components/helloworld.js new file mode 100644 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 100644 index 00000000..732ef4a2 --- /dev/null +++ b/build/apps/parking/react/components/navbar.js @@ -0,0 +1,16 @@ +MyComponents.NavBar = React.createClass({ + render: function() { + return ( + + ); + } +}); \ No newline at end of file diff --git a/build/apps/parking/react/components/team.js b/build/apps/parking/react/components/team.js new file mode 100644 index 00000000..52d674d3 --- /dev/null +++ b/build/apps/parking/react/components/team.js @@ -0,0 +1,25 @@ +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.name} {member.lastname} +
  • + }) + + return ( +
    +
    + People +
      {members}
    +
    +
    + ); + } +}); \ No newline at end of file diff --git a/build/apps/parking/react/garages.snapshot.json b/build/apps/parking/react/garages.snapshot.json new file mode 100644 index 00000000..c6b7750b --- /dev/null +++ b/build/apps/parking/react/garages.snapshot.json @@ -0,0 +1 @@ +{"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 100644 index 00000000..4dd99121 --- /dev/null +++ b/build/apps/parking/react/index.html @@ -0,0 +1,89 @@ + + + + + Parking App in ReactJS + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + \ No newline at end of file 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 100644 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 Favoirte Cities

    +
      +
      +
      + + + + diff --git a/build/apps/resume/index.html b/build/apps/resume/index.html new file mode 100644 index 00000000..0162df89 --- /dev/null +++ b/build/apps/resume/index.html @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + +
      +
      +
      +
      + + Card Title +
      +
      +

      Wellcome to Yen-Teh Liu's personal website. Know more about me by viewing my linkedin and Instagram

      +
      + +
      +
      +
      + + +
        +
          +
            +
              +
                + +
                + + + + + + + + diff --git a/build/apps/resume/pictures/clear-day.png b/build/apps/resume/pictures/clear-day.png new file mode 100644 index 00000000..4a129cea Binary files /dev/null and b/build/apps/resume/pictures/clear-day.png differ diff --git a/build/apps/resume/pictures/mostly-cloudy.png b/build/apps/resume/pictures/mostly-cloudy.png new file mode 100644 index 00000000..c3cb735a Binary files /dev/null and b/build/apps/resume/pictures/mostly-cloudy.png differ diff --git a/build/apps/resume/pictures/partly-cloudy.png b/build/apps/resume/pictures/partly-cloudy.png new file mode 100644 index 00000000..ac3db3bd Binary files /dev/null and b/build/apps/resume/pictures/partly-cloudy.png differ diff --git a/build/apps/resume/pictures/rain.png b/build/apps/resume/pictures/rain.png new file mode 100644 index 00000000..2eaa3278 Binary files /dev/null and b/build/apps/resume/pictures/rain.png differ diff --git a/build/apps/resume/pictures/snow.png b/build/apps/resume/pictures/snow.png new file mode 100644 index 00000000..a2e42442 Binary files /dev/null and b/build/apps/resume/pictures/snow.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..e1dfb582 --- /dev/null +++ b/build/apps/resume/react/components/about.js @@ -0,0 +1,21 @@ +MyComponents.About = React.createClass({ + + render: function() { + return ( +
                +
                + + Tommy Liu +
                +
                +
                Major: {this.props.about.major}
                +
                School: University of Colorado Boulder
                +
                +
                +
                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..7a8a013f --- /dev/null +++ b/build/apps/resume/react/components/city-list.js @@ -0,0 +1,33 @@ +MyComponents.City = React.createClass({ + + render: function() { + return ( +
              • +

                {this.props.city.cityName}

                +
                map
                +
                + Temperature: {this.props.city.currently.temperature} F +
                + Humidity: {this.props.city.currently.humidity} +
                + Current Weather: {this.props.city.currently.summary} +
              • + ); + } + +}); + +MyComponents.CityList = React.createClass({ + render: function() { + + var cityElements = this.props.cities.map(function(c,i){ + return + }) + + return ( +
                  + {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..465487a0 --- /dev/null +++ b/build/apps/resume/react/components/navbar.js @@ -0,0 +1,16 @@ +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..9b6ad01e --- /dev/null +++ b/build/apps/resume/react/components/skill-list.js @@ -0,0 +1,25 @@ +MyComponents.Skill = React.createClass({ + + render: function() { + return ( +
              • + {this.props.skill} +
              • + ); + } + +}); + +MyComponents.SkillList = React.createClass({ + render: function() { + var skill = this.props.skills.map(function(s,i){ + return + }) + return ( +
                  + {skill} +
                + + ); + } +}); 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..df1ddc51 --- /dev/null +++ b/build/apps/resume/react/components/task-list.js @@ -0,0 +1,27 @@ +MyComponents.Task = React.createClass({ + render: function() { + return ( +
              • +

                {this.props.task.name}

                +
                {this.props.task.deadline}
                +
                {this.props.task.priority}
                +
                {this.props.task.type}
                +
              • + ); + } +}); + +MyComponents.TaskList = React.createClass({ + render: function() { + + var Task = this.props.tasks.map(function(t,i){ + return + }) + + return ( +
                  + {Task} +
                + ); + } +}); diff --git a/build/apps/resume/react/git.png b/build/apps/resume/react/git.png new file mode 100644 index 00000000..2af32ee7 Binary files /dev/null and b/build/apps/resume/react/git.png differ diff --git a/build/apps/resume/react/index.html b/build/apps/resume/react/index.html new file mode 100644 index 00000000..720bea53 --- /dev/null +++ b/build/apps/resume/react/index.html @@ -0,0 +1,118 @@ + + + + + My 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); + + // + + + +
                +
                +

                Current Subscribers

                +
                  +
                +
                +
                + + + + 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/img/an.png b/build/apps/todos/img/an.png new file mode 100644 index 00000000..0281670f Binary files /dev/null and b/build/apps/todos/img/an.png differ diff --git a/build/apps/todos/img/pei.png b/build/apps/todos/img/pei.png new file mode 100644 index 00000000..d509f440 Binary files /dev/null and b/build/apps/todos/img/pei.png differ diff --git a/build/apps/todos/img/tian.jpeg b/build/apps/todos/img/tian.jpeg new file mode 100644 index 00000000..93a1b18e Binary files /dev/null and b/build/apps/todos/img/tian.jpeg differ diff --git a/build/apps/todos/img/tom.png b/build/apps/todos/img/tom.png new file mode 100644 index 00000000..e5da485e Binary files /dev/null and b/build/apps/todos/img/tom.png differ diff --git a/build/apps/todos/img/yue.jpeg b/build/apps/todos/img/yue.jpeg new file mode 100644 index 00000000..22f97be2 Binary files /dev/null and b/build/apps/todos/img/yue.jpeg differ diff --git a/build/apps/todos/img/yun.png b/build/apps/todos/img/yun.png new file mode 100644 index 00000000..5c6cc8dd Binary files /dev/null and b/build/apps/todos/img/yun.png differ diff --git a/build/apps/todos/inbox.html b/build/apps/todos/inbox.html new file mode 100644 index 00000000..e444c4ab --- /dev/null +++ b/build/apps/todos/inbox.html @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + +
                + +

                Adding a Task

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

                Matrix's ToDos App

                + +
                +
                Team Members:
                + +   + +   + +   + +
                +

                + + + +
                +
                +
                Tasks
                + +
                + Add +
                + +
                + + +
                + +
                +
                + +
                  + +
                + + + + +
                  +
                + + + + + + + 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..71183254 --- /dev/null +++ b/build/index.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +
                +

                Book

                +

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

                +

                Apps

                + +

                Learning

                + +

                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..58063379 --- /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/firebase.json b/firebase.json index ad3818e3..9669281e 100644 --- a/firebase.json +++ b/firebase.json @@ -1,5 +1,5 @@ { - "firebase": "ucdd2-book", + "firebase": "wetravel", "public": "build", "ignore": [ "firebase.json", diff --git a/package.json b/package.json index 88d3a6c6..28f3305e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "book", + "name": "book-week9", "version": "1.0.0", "description": "", "main": "index.js", @@ -9,6 +9,7 @@ "author": "", "license": "ISC", "dependencies": { + "chance": "1.0.1", "consolidate": "^0.13.1", "debug": "^2.2.0", "firebase": "^2.4.0", @@ -25,6 +26,8 @@ "metalsmith-serve": "0.0.4", "metalsmith-watch": "^1.0.1", "node-random-name": "^1.0.1", - "nunjucks": "^2.3.0" + "nunjucks": "^2.3.0", + "react-materialize": "^0.14.2", + "react-tools": "^0.13.3" } } diff --git a/src/apps/garages_map.html b/src/apps/garages_map.html new file mode 100644 index 00000000..1c4b1e75 --- /dev/null +++ b/src/apps/garages_map.html @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                +

                +
                + +
                + +
                + +
                + + + + \ No newline at end of file diff --git a/src/apps/list.jsx b/src/apps/list.jsx new file mode 100644 index 00000000..feb8e9f8 --- /dev/null +++ b/src/apps/list.jsx @@ -0,0 +1,42 @@ + +MyComponents.Info = React.createClass({ + render: function(){ + var line = this.props.title + ': ' + this.props.value + return
                {line}
                + } +}) + +MyComponents.Time = React.createClass({ + render: function(){ + var title = _.keys(this.props.value); + var Info = _.values(this.props.value).map(function(v, k){ + return + }); + return ( + + {Info} + + ); + } +}) + +class List extends React.Component{ + render(){ + var time = this.props.data.time + console.log(time) + var list = this.props.data.list.map(function(v, k){ + return + }) + return
                +
                + + {this.props.data.day} + + {list} +
                +
                + } +} + + +MyComponents.List = List; diff --git a/src/apps/parking/garage.html b/src/apps/parking/garage.html new file mode 100644 index 00000000..ac7ef09c --- /dev/null +++ b/src/apps/parking/garage.html @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + + + + +
                +

                +
                  +
                +
                + +
                + +
                + + + \ No newline at end of file diff --git a/src/apps/parking/garages.html b/src/apps/parking/garages.html deleted file mode 100644 index df7b253d..00000000 --- a/src/apps/parking/garages.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - -
                - -

                Garages

                -
                  -
                - -
                - - - - diff --git a/src/apps/parking/garages_map.html b/src/apps/parking/garages_map.html index ddaec15a..eb3ad617 100644 --- a/src/apps/parking/garages_map.html +++ b/src/apps/parking/garages_map.html @@ -7,63 +7,138 @@ - + + + - + -
                + -

                Garages Map

                +
                +

                +
                + +
                + - + \ No newline at end of file diff --git a/src/apps/parking/images/asia.png b/src/apps/parking/images/asia.png new file mode 100644 index 00000000..6dc596c4 Binary files /dev/null and b/src/apps/parking/images/asia.png differ diff --git a/src/apps/parking/images/bus.png b/src/apps/parking/images/bus.png new file mode 100644 index 00000000..6dcdf6be Binary files /dev/null and b/src/apps/parking/images/bus.png differ diff --git a/src/apps/parking/images/marker.png b/src/apps/parking/images/marker.png new file mode 100644 index 00000000..276bcd17 Binary files /dev/null and b/src/apps/parking/images/marker.png differ diff --git a/src/apps/parking/images/person.png b/src/apps/parking/images/person.png new file mode 100644 index 00000000..6e5aba6a Binary files /dev/null and b/src/apps/parking/images/person.png differ diff --git a/src/apps/parking/images/sf2.jpg b/src/apps/parking/images/sf2.jpg new file mode 100644 index 00000000..4c382451 Binary files /dev/null and b/src/apps/parking/images/sf2.jpg differ diff --git a/src/apps/parking/index.html b/src/apps/parking/index.html index bc60bf4b..85a02402 100644 --- a/src/apps/parking/index.html +++ b/src/apps/parking/index.html @@ -1 +1,83 @@ -TODO: + + + + + + + + + + + + + + + + + + + + + +
                + +
                + +
                + +
                + + + + \ No newline at end of file diff --git a/src/apps/parking/react/components/garage-hours.js b/src/apps/parking/react/components/garage-hours.js index d22c7385..8d9e5c5a 100644 --- a/src/apps/parking/react/components/garage-hours.js +++ b/src/apps/parking/react/components/garage-hours.js @@ -1,34 +1,38 @@ +// Dependencies: +// - MyComponents.GarageRates + MyComponents.Hour = React.createClass({ render: function() { + + var to; + if (typeof(this.props.hour.TO)!="undefined") { + to = " - " + this.props.hour.TO + } + else { + to = " " + } + return ( -
                -
                - TODO: This is a component to display an item in the hours array - Raw props data is {JSON.stringify(this.props)} -
                -
                - ); + {this.props.hour.FROM}{to}{this.props.hour.BEG} - {this.props.hour.END} + ) } -}); - +}) MyComponents.GarageHours = React.createClass({ render: function() { - var hours = this.props.hours.map(function(h,i){ + var hours = this.props.hours.map(function(h, i){ return }) return (
                -
                - TODO: This is a component to display the hours of this garage. - Raw props data is {JSON.stringify(this.props)} - - { hours } - -
                + + + {hours} +
                Day of the WeekTime
                - ); + ) } -}); +}) + diff --git a/src/apps/parking/react/components/garage-rates.js b/src/apps/parking/react/components/garage-rates.js index c5e85bee..4663bdb4 100644 --- a/src/apps/parking/react/components/garage-rates.js +++ b/src/apps/parking/react/components/garage-rates.js @@ -1,16 +1,26 @@ +// Dependencies: +// - MyComponents.GarageHours + MyComponents.Rate = React.createClass({ render: function() { + + var beg, end, desc; + if (typeof(this.props.rate.DESC)!="undefined") { + beg = "" + end = "" + desc = this.props.rate.DESC + } + else { + desc = "" + end = " - "+this.props.rate.END + beg = this.props.rate.BEG + } + return ( -
                -
                - TODO: This is a component to display a single rate data. - Raw props data is {JSON.stringify(this.props)} -
                -
                - ); + {beg}{end}{desc}${this.props.rate.RATE} {this.props.rate.RQ.toLowerCase()} + ) } -}); - +}) MyComponents.GarageRates = React.createClass({ render: function() { @@ -21,14 +31,11 @@ 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} +
                TimesRate
                - ); + ) } -}); +}) \ No newline at end of file diff --git a/src/apps/parking/react/components/garage-spaces.js b/src/apps/parking/react/components/garage-spaces.js index 1cdca99a..dc1bcd5f 100644 --- a/src/apps/parking/react/components/garage-spaces.js +++ b/src/apps/parking/react/components/garage-spaces.js @@ -1,12 +1,12 @@ MyComponents.GarageSpaces = React.createClass({ render: function() { return ( -
                +
                - TODO: This is a component to display the number of total spaces - and open spaces. Raw data is {JSON.stringify(this.props)} + error Open Spaces +

                {this.props.open} left

                ); } -}); +}); \ No newline at end of file diff --git a/src/apps/parking/react/components/garage-title.js b/src/apps/parking/react/components/garage-title.js index 7f557e07..90c35f81 100644 --- a/src/apps/parking/react/components/garage-title.js +++ b/src/apps/parking/react/components/garage-title.js @@ -1,13 +1,7 @@ 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}

                ); } -}); +}); \ No newline at end of file diff --git a/src/apps/parking/react/components/garage.js b/src/apps/parking/react/components/garage.js index 7d61d55a..1dacf765 100644 --- a/src/apps/parking/react/components/garage.js +++ b/src/apps/parking/react/components/garage.js @@ -4,24 +4,21 @@ // - MyComponents.GarageHours // - MyComponents.GarageRates + MyComponents.Garage = React.createClass({ render: function() { return ( -
                -
                - TODO: This is a component about a garage whose - raw data is {JSON.stringify(this.props.garage)} - - - - -
                +
                + + + +
                ); } -}); +}); \ No newline at end of file diff --git a/src/apps/parking/react/components/navbar.js b/src/apps/parking/react/components/navbar.js index a38c6d89..732ef4a2 100644 --- a/src/apps/parking/react/components/navbar.js +++ b/src/apps/parking/react/components/navbar.js @@ -1,16 +1,16 @@ MyComponents.NavBar = React.createClass({ render: function() { return ( -