aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/partials/event.html0
-rw-r--r--public/partials/home.html5
-rw-r--r--public/partials/login.html15
-rw-r--r--public/partials/new.html20
-rw-r--r--public/scripts/app.js29
-rw-r--r--public/scripts/controllers.js39
-rw-r--r--public/stylesheets/style.css40
7 files changed, 143 insertions, 5 deletions
diff --git a/public/partials/event.html b/public/partials/event.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/public/partials/event.html
diff --git a/public/partials/home.html b/public/partials/home.html
new file mode 100644
index 0000000..3646371
--- /dev/null
+++ b/public/partials/home.html
@@ -0,0 +1,5 @@
+<h1>{{title}}</h1>
+<h2>Events</h2>
+
+<h2>New</h2>
+<input type="button" onclick="newEvent()" value="+Event"></input>
diff --git a/public/partials/login.html b/public/partials/login.html
new file mode 100644
index 0000000..f3dd614
--- /dev/null
+++ b/public/partials/login.html
@@ -0,0 +1,15 @@
+<h1>{{title}}</h1>
+
+<!--
+ Below we include the Login Button social plugin. This button uses
+ the JavaScript SDK to present a graphical Login button that triggers
+ the FB.login() function when clicked.
+-->
+
+<fb:login-button scope="public_profile,email,user_friends" onlogin="checkLoginState();">
+</fb:login-button>
+
+<input type="button" onclick="logout()" value="logout"></input>
+
+<div id="status">
+</div>
diff --git a/public/partials/new.html b/public/partials/new.html
new file mode 100644
index 0000000..08793d8
--- /dev/null
+++ b/public/partials/new.html
@@ -0,0 +1,20 @@
+<h1>New Event</h1>
+<h2>Details</h2>
+<form>
+ <div class="input-group">
+ <span class="input-group-addon">Date</span>
+ <input type="text" class="form-control" placeholder="">
+ </div>
+ <div class="input-group">
+ <span class="input-group-addon">Time</span>
+ <input type="text" class="form-control" placeholder="">
+ </div>
+ <div class="input-group">
+ <span class="input-group-addon">Location</span>
+ <input type="text" class="form-control" placeholder="">
+ </div>
+</form>
+<h2>Invitees</h2>
+<ul>
+ <li ng-repeat="friend in friends">{{friend.name}}</li>
+</ul>
diff --git a/public/scripts/app.js b/public/scripts/app.js
new file mode 100644
index 0000000..de47a22
--- /dev/null
+++ b/public/scripts/app.js
@@ -0,0 +1,29 @@
+'use strict';
+
+
+// Declare app level module which depends on filters, and services
+angular.module('app', [
+ 'ngRoute',
+ 'app.controllers'
+])
+ .config(['$routeProvider', function($routeProvider) {
+ $routeProvider
+ .when('/', {
+ templateUrl: 'partials/login.html',
+ controller: 'loginController'
+ })
+ .when('/home', {
+ templateUrl: 'partials/home.html',
+ controller: 'homeController'
+ })
+ .when('/new-event', {
+ templateUrl: 'partials/new.html',
+ controller: 'newController'
+ })
+ .when('/event', {
+ templateUrl: 'partials/event.html',
+ controller: 'eventController'
+ }).otherwise({
+ redirectTo: '/'
+ });
+ }]);
diff --git a/public/scripts/controllers.js b/public/scripts/controllers.js
new file mode 100644
index 0000000..048853e
--- /dev/null
+++ b/public/scripts/controllers.js
@@ -0,0 +1,39 @@
+'use strict';
+
+/* Controllers */
+
+angular.module('app.controllers', [])
+ .controller('loginController',
+ ['$scope', '$routeParams', '$http',
+ function($scope, $routeParams, $http) {
+ $scope.title='Login'
+ }])
+ .controller('homeController',
+ ['$scope', '$routeParams', '$http',
+ function($scope, $routeParams, $http) {
+ $scope.title='Home'
+ }])
+ .controller('newController',
+ ['$scope', '$routeParams', '$http',
+ function($scope, $routeParams, $http) {
+ $scope.title='New Event'
+
+ window.setTimeout(function(){
+ console.log('calling');
+ $http.get('https://graph.facebook.com/v2.2/'
+ + AUTH.userID + '/friends?access_token='
+ + AUTH.accessToken
+ + '&format=json&method=get&pretty=0&suppress_http_code=1')
+ .success(
+ function(data) {
+ console.log(data);
+ $scope.friends = data.data;
+ }
+ );
+ }, 3000);
+ }])
+ .controller('eventController',
+ ['$scope', '$routeParams', '$http',
+ function($scope, $routeParams, $http) {
+ $scope.title='Event'
+ }])
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
index 30e047d..edf2c4b 100644
--- a/public/stylesheets/style.css
+++ b/public/stylesheets/style.css
@@ -1,8 +1,38 @@
+/* Sticky footer styles
+-------------------------------------------------- */
+html {
+ position: relative;
+ min-height: 100%;
+}
body {
- padding: 50px;
- font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
+ /* Margin bottom by footer height */
+ margin-bottom: 60px;
+}
+.footer {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ /* Set the fixed height of the footer here */
+ height: 60px;
+}
+
+
+/* Custom page CSS
+-------------------------------------------------- */
+/* Not required for template or sticky footer method. */
+
+body > .container {
+ padding: 60px 15px 0;
+}
+.container .text-muted {
+ margin: 20px 0;
}
-a {
- color: #00B7FF;
-} \ No newline at end of file
+.footer > .container {
+ padding-right: 15px;
+ padding-left: 15px;
+}
+
+code {
+ font-size: 80%;
+}