diff --git a/hackatonApp/scss/home-items.scss b/hackatonApp/scss/home-items.scss new file mode 100644 index 0000000..a6edb8e --- /dev/null +++ b/hackatonApp/scss/home-items.scss @@ -0,0 +1,179 @@ +$home-category-bg: $theme-color-3; +$home-category-color: #FFFFFF; + +//home entries +$entry-heading-color: $theme-color-3; +$entry-title-color: #FFFFFF; + +$entry-excerpt-lines: 5; +$entry-font-size: 14px; + +$home-categories-img-ratio: 1 1; + +// Merge maps +$pre-img-ratios: append($pre-img-ratios, $home-categories-img-ratio); + +.category-homes-view +{ + background-color: $content-bg !important; + + .category-homes + { + .item + { + padding-left: 60px; + } + + .item .thumbnail-outer + { + position: absolute; + left: 10px; + width: 40px; + + .thumbnail + { + width: 100%; + } + } + + .item .title + { + font-weight: 500; + } + + .item .description + { + color: lighten($content-color, 35%); + } + } +} +.homes-categories-view +{ + background-color: $content-bg !important; + + .categories-list + { + @include flex-wrap(wrap); + } + + .home-category + { + // THIS IS FUCKING AWESOME: http://caniuse.com/#feat=viewport-units + @include calc(height, "50vw - 15px"); + box-shadow: 0 1px 3px rgba(darken($home-category-bg, 30%), 0.3); + border-radius: 2px; + position: relative; + display: block; + + .category-image + { + width: 100%; + height: 100%; + border-radius: 2px; + } + + .category-bg + { + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + -webkit-box-shadow: 0px 5px 10px 0px rgba(50, 50, 50, 0.5); + -moz-box-shadow: 0px 5px 10px 0px rgba(50, 50, 50, 0.5); + box-shadow: 0px 5px 10px 0px rgba(50, 50, 50, 0.5); + background-color: #FF4C4C; + } + + .category-title + { + color: $home-category-color; + position: absolute; + top: 2px; + left: 8px; + font-weight: 500; + text-transform: capitalize; + } + } +} +.home-entries-view +{ + background-color: $content-bg !important; + + .entry-heading + { + padding-top: 8px; + padding-bottom: 8px; + background-color: darken($entry-heading-color, 10%); + border-color: #000; + + .entry-title + { + color: $entry-title-color; + } + + .entry-author + { + font-weight: 500; + } + } + + .entry-content + { + padding-top: 8px; + padding-bottom: 0px; + + .entry-excerpt + { + overflow: hidden; + text-overflow: ellipsis; + @include display(flex); + @include flex-direction(column); + -webkit-line-clamp: $entry-excerpt-lines; /* number of lines to show */ + line-height: $entry-font-size + 4; /* fallback */ + font-size: $entry-font-size; /* fallback */ + max-height: ($entry-font-size + 4) * $entry-excerpt-lines; /* fallback */ + + * + { + font-size: inherit !important; + } + } + + .entry-actions + { + padding: 10px 0px; + + .col + { + padding:0px; + } + + .actions + { + .button-icon + { + min-height: initial; + line-height: 28px; + padding: 0px; + vertical-align: middle; + margin-right: 10px; + } + + .button-icon:before + { + font-size: 28px; + line-height: 28px; + } + } + + .read-more + { + .button + { + margin:0px; + } + } + } + } +} diff --git a/hackatonApp/scss/ionic.app.scss b/hackatonApp/scss/ionic.app.scss index 4b2ed9b..d72674f 100644 --- a/hackatonApp/scss/ionic.app.scss +++ b/hackatonApp/scss/ionic.app.scss @@ -56,3 +56,4 @@ @import "scss/forms/forms.styles"; @import "scss/settings/settings.styles"; +@import "scss/home-items"; diff --git a/hackatonApp/scss/sidemenu/side-menu.styles.scss b/hackatonApp/scss/sidemenu/side-menu.styles.scss index ee0c2b8..598e0c5 100644 --- a/hackatonApp/scss/sidemenu/side-menu.styles.scss +++ b/hackatonApp/scss/sidemenu/side-menu.styles.scss @@ -42,11 +42,22 @@ ion-side-menu ion-item.item:first-child { border-top:none; + .icon:before + { + background-image: url("/img/icons/park2.png"); + background-repeat: no-repeat; + } } ion-item.item:last-child { border-bottom:none; + + .icon:before + { + color:red; + + } } .heading-item diff --git a/hackatonApp/www/home-categories.json b/hackatonApp/www/home-categories.json new file mode 100644 index 0000000..b0eb0cf --- /dev/null +++ b/hackatonApp/www/home-categories.json @@ -0,0 +1,22 @@ +[ + { + "id":"booking", + "title":"Prenota", + "image":"img/feeds/news.jpg" + }, + { + "id":"addticketwithphoto", + "title":"Aggiungi un biglietto", + "image":"img/feeds/sports.jpg" + }, + { + "id":"shop", + "title":"Spendi i crediti", + "image":"img/feeds/business.jpg" + }, + { + "id":"ranks", + "title":"Classifica", + "image":"img/feeds/entertainment.jpg" + } +] diff --git a/hackatonApp/www/img/icons/park2.png b/hackatonApp/www/img/icons/park2.png new file mode 100644 index 0000000..da8de81 Binary files /dev/null and b/hackatonApp/www/img/icons/park2.png differ diff --git a/hackatonApp/www/img/laura.jpg b/hackatonApp/www/img/laura.jpg new file mode 100644 index 0000000..338b8cb Binary files /dev/null and b/hackatonApp/www/img/laura.jpg differ diff --git a/hackatonApp/www/js/app.js b/hackatonApp/www/js/app.js index 73f5005..966457c 100644 --- a/hackatonApp/www/js/app.js +++ b/hackatonApp/www/js/app.js @@ -238,15 +238,6 @@ angular.module('your_app_name', [ }) //OTHERS - .state('app.settings', { - url: "/settings", - views: { - 'menuContent': { - templateUrl: "views/app/settings.html", - controller: 'SettingsCtrl' - } - } - }) .state('app.forms', { url: "/forms", @@ -276,6 +267,81 @@ angular.module('your_app_name', [ } }) + .state('app.allTickets', { + url: "/allTickets", + views: { + 'menuContent': { + templateUrl: "views/app/allTickets.html", + controller: 'AllTicketsCtrl' + } + } + }) + + .state('app.settings', { + url: "/settings", + views: { + 'menuContent': { + templateUrl: "views/app/settings.html", + controller: 'SettingsCtrl' + } + } + }) + + .state('app.booking', { + url: "/booking", + views: { + 'menuContent': { + templateUrl: "views/app/booking.html", + controller: 'BookingCtrl' + } + } + }) + .state('app.addTicketWithPhoto', { + url: "/addTicketWithPhoto", + views: { + 'menuContent': { + templateUrl: "views/app/addTicketWithPhoto.html", + controller: 'AddTicketWithPhotoCtrl' + } + } + }) + .state('app.shop', { + url: "/shop", + views: { + 'menuContent': { + templateUrl: "views/app/shop.html", + controller: 'ShopCtrl' + } + } + }) + .state('app.ranks', { + url: "/ranks", + views: { + 'menuContent': { + templateUrl: "views/app/ranks.html", + controller: 'RanksCtrl' + } + } + }) + .state('app.home', { + url: "/home", + views: { + 'menuContent': { + templateUrl: "views/app/home.html", + controller: 'HomeCtrl' + } + } + }) + +.state('app.category', { + url: "/category/:categoryId", + views: { + 'menuContent': { + templateUrl: "views/app/category.html", + controller: 'CategoryCtrl' + } + } + }) ; // if none of the above states are matched, use this as the fallback diff --git a/hackatonApp/www/js/controllers.js b/hackatonApp/www/js/controllers.js index 7ebbdd5..91b918e 100644 --- a/hackatonApp/www/js/controllers.js +++ b/hackatonApp/www/js/controllers.js @@ -7,10 +7,17 @@ angular.module('your_app_name.controllers', []) // APP .controller('AppCtrl', function($scope, $ionicConfig) { + $scope.user={}; + $scope.user.name="Laura"; + $scope.user.surname="Rossi"; + $scope.user.email="laura.rossi@email.it"; + $scope.user.telephone="3477608470"; + $scope.user.picture="img/laura.jpg"; + $scope.user.score="15463"; }) //LOGIN -.controller('LoginCtrl', function($scope, $state, $templateCache, $q, $rootScope) { +/*.controller('LoginCtrl', function($scope, $state, $templateCache, $q, $rootScope) { $scope.doLogIn = function(){ $state.go('app.feeds-categories'); }; @@ -27,9 +34,26 @@ angular.module('your_app_name.controllers', []) $scope.selected_tab = data.title; }); -}) +})*/ +.controller('LoginCtrl', function($scope, $state, $templateCache, $q, $rootScope) { + $scope.doLogIn = function(){ + $state.go('app.home'); + }; -.controller('SignupCtrl', function($scope, $state) { + $scope.user = {}; + + $scope.user.email = "tuaemail@dominio.com"; + $scope.user.pin = "12345"; + + // We need this for the form validation + $scope.selected_tab = ""; + + $scope.$on('my-tabs-changed', function (event, data) { + $scope.selected_tab = data.title; + }); + +}) +/*.controller('SignupCtrl', function($scope, $state) { $scope.user = {}; $scope.user.email = "john@doe.com"; @@ -37,16 +61,35 @@ angular.module('your_app_name.controllers', []) $scope.doSignUp = function(){ $state.go('app.feeds-categories'); }; +})*/ +.controller('SignupCtrl', function($scope, $state) { + $scope.user = {}; + + $scope.user.email = "tuaemail@dominio.com"; + + $scope.doSignUp = function(){ + $state.go('app.home'); + }; }) -.controller('ForgotPasswordCtrl', function($scope, $state) { +/*.controller('ForgotPasswordCtrl', function($scope, $state) { $scope.recoverPassword = function(){ $state.go('app.feeds-categories'); }; + $scope.user = {}; +})*/ + +.controller('ForgotPasswordCtrl', function($scope, $state) { + $scope.recoverPassword = function(){ + //$state.go('app.home'); + alert("non implementato"); + }; + $scope.user = {}; }) + .controller('RateApp', function($scope) { $scope.rateApp = function(){ if(ionic.Platform.isIOS()){ @@ -216,6 +259,8 @@ angular.module('your_app_name.controllers', []) }); }) + + //this method brings posts for a source provider .controller('FeedEntriesCtrl', function($scope, $stateParams, $http, FeedList, $q, $ionicLoading, BookMarkService) { $scope.feed = []; @@ -461,5 +506,44 @@ angular.module('your_app_name.controllers', []) window.plugins.socialsharing.share(null, null, $scope.images); }; }) +.controller('BookingCtrl', function($scope, $http) { +}) +.controller('RanksCtrl', function($scope, $http) { +}) +.controller('ShopCtrl', function($scope, $http) { + console.log("icic"); +}) +.controller('BookingCtrl', function($scope, $http) { +}) +.controller('AddTicketWithCtrl', function($scope, $http) { +}) +.controller('AllTicketsCtrl', function($scope, $http) { +}) +.controller('HomeCtrl', function($scope, $http) { + + $scope.home_categories = []; + + $http.get('home-categories.json').success(function(response) { + $scope.home_categories = response; + }); + console.log("HOME"); +}) +.controller('CategoryCtrl', function($scope, $http, $stateParams) { + $scope.category_sources = []; + + $scope.categoryId = $stateParams.categoryId; + + $http.get('home-categories.json').success(function(response) { + var category = _.find(response, {id: $scope.categoryId}); + $scope.categoryTitle = category.title; + $scope.category_sources = category.home_sources; + }); +}) +.controller('HomeEntriesCtrl', function($scope, $stateParams, $http, $q, $ionicLoading) { + $scope.home = []; + + var categoryId = $stateParams.categoryId, + sourceId = $stateParams.sourceId; +}) ; diff --git a/hackatonApp/www/js/factories.js b/hackatonApp/www/js/factories.js index 798010e..d794111 100644 --- a/hackatonApp/www/js/factories.js +++ b/hackatonApp/www/js/factories.js @@ -209,4 +209,5 @@ angular.module('your_app_name.factories', []) }; }) + ; diff --git a/hackatonApp/www/js/services.js b/hackatonApp/www/js/services.js index 3d6b9bf..b916dbc 100644 --- a/hackatonApp/www/js/services.js +++ b/hackatonApp/www/js/services.js @@ -224,4 +224,6 @@ angular.module('your_app_name.services', []) }) + + ; diff --git a/hackatonApp/www/views/app/addTicketWithPhoto.html b/hackatonApp/www/views/app/addTicketWithPhoto.html new file mode 100644 index 0000000..eefe39d --- /dev/null +++ b/hackatonApp/www/views/app/addTicketWithPhoto.html @@ -0,0 +1,35 @@ + + + Bookmarks + + +
+
+
+ +

There's nothing here yet. Start exploring!

+
+
+
+ +
+
diff --git a/hackatonApp/www/views/app/allTickets.html b/hackatonApp/www/views/app/allTickets.html new file mode 100644 index 0000000..0f33389 --- /dev/null +++ b/hackatonApp/www/views/app/allTickets.html @@ -0,0 +1,38 @@ + + + + + + Bookmarks + + +
+
+
+ +

There's nothing here yet. Start exploring!

+
+
+
+ +
+
diff --git a/hackatonApp/www/views/app/booking.html b/hackatonApp/www/views/app/booking.html new file mode 100644 index 0000000..eefe39d --- /dev/null +++ b/hackatonApp/www/views/app/booking.html @@ -0,0 +1,35 @@ + + + Bookmarks + + +
+
+
+ +

There's nothing here yet. Start exploring!

+
+
+
+ +
+
diff --git a/hackatonApp/www/views/app/category.html b/hackatonApp/www/views/app/category.html new file mode 100644 index 0000000..de8be83 --- /dev/null +++ b/hackatonApp/www/views/app/category.html @@ -0,0 +1,48 @@ + + + + Settings + + + + + diff --git a/hackatonApp/www/views/app/home-entries.html b/hackatonApp/www/views/app/home-entries.html new file mode 100644 index 0000000..aa70b09 --- /dev/null +++ b/hackatonApp/www/views/app/home-entries.html @@ -0,0 +1,34 @@ + + + {{sourceTitle}} + + + + + + +
+
+
+

+ +
+
+

+
+
+ +
+ +
+
+
+
+
+
diff --git a/hackatonApp/www/views/app/home.html b/hackatonApp/www/views/app/home.html new file mode 100644 index 0000000..5c9e687 --- /dev/null +++ b/hackatonApp/www/views/app/home.html @@ -0,0 +1,29 @@ + + + + + + Home + + +
+ +
+ +

Punti {{user.score}}

+

dkdkdk

+
+
+ +
+
diff --git a/hackatonApp/www/views/app/ranks.html b/hackatonApp/www/views/app/ranks.html new file mode 100644 index 0000000..eefe39d --- /dev/null +++ b/hackatonApp/www/views/app/ranks.html @@ -0,0 +1,35 @@ + + + Bookmarks + + +
+
+
+ +

There's nothing here yet. Start exploring!

+
+
+
+ +
+
diff --git a/hackatonApp/www/views/app/shop.html b/hackatonApp/www/views/app/shop.html new file mode 100644 index 0000000..42d7a22 --- /dev/null +++ b/hackatonApp/www/views/app/shop.html @@ -0,0 +1,50 @@ + + + + + + Settings + + + + + diff --git a/hackatonApp/www/views/app/side-menu.html b/hackatonApp/www/views/app/side-menu.html index bcc15bf..116b457 100644 --- a/hackatonApp/www/views/app/side-menu.html +++ b/hackatonApp/www/views/app/side-menu.html @@ -3,10 +3,7 @@ - - - + @@ -14,26 +11,38 @@ - +
- +
-

Hi Brynn

-

Welcome back

+

Ciao {{user.name}}.

+

Bentornata!

- + + + + + + + + + + + + +