Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandoche Adittane committed Jul 19, 2016
2 parents 2232878 + 010c92e commit 09a1b28
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .grunt/grunt-gh-pages/gh-pages/src
Submodule src updated from 96417b to 54c3af
1 change: 1 addition & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<script src="scripts/controllers/contact.js"></script>
<script src="scripts/services/botsdata.js"></script>
<script src="scripts/directives/botbar.js"></script>
<script src="scripts/services/analyticsservice.js"></script>
<!-- endbuild -->
</body>
</html>
14 changes: 5 additions & 9 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ angular
.otherwise({
redirectTo: '/alex'
});
}).run(['$rootScope', '$location', '$window', function($rootScope, $location, $window){
$rootScope
.$on('$stateChangeSuccess',
function(event){
if (!$window.ga)
return;
$window.ga('send', 'pageview', { page: $location.path() });
});
}]);
}).run(function($rootScope, $location, analyticsService) {
$rootScope.$on('$routeChangeSuccess', function() {
analyticsService.recordPageview($location.url());
});
});
16 changes: 16 additions & 0 deletions app/scripts/services/analyticsservice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

/**
* @ngdoc service
* @name happybotsApp.analyticsService
* @description
* # analyticsService
* Service in the happybotsApp.
*/
angular.module('happybotsApp')
.service('analyticsService', function () {
this.recordPageview = function(url) {
ga('set', 'page', url);
ga('send', 'pageview');
};
});
19 changes: 18 additions & 1 deletion app/styles/_bot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,26 @@
@media (max-width: $screen-sm-min) {

.bot {

padding-top: 35px;

.btn {
padding: 6px 12px;
font-size: 14px;

.img-bg {
height: 14px;
width: 14px;
}
}

h1 {
text-transform: uppercase;
font-size: 3rem;
font-size: 2.5rem;
}

h2 {
font-size: 2rem;
}
}

Expand Down
6 changes: 2 additions & 4 deletions app/styles/_socialbuttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
@media (max-width: $screen-sm-min) {

.social-center {
.social { text-align: center; }
.social ul { display:inline-table; }
.social li { display:inline; }
margin-bottom: 100px;
display: none;
}


}

.social {
Expand Down
11 changes: 11 additions & 0 deletions app/styles/_wip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,21 @@
@media (max-width: $screen-sm-min) {

.wip {

h2 {
font-size: 2rem;
}

.img-responsive {
padding-top: 20px;
padding-left: 50px;
padding-right: 50px;
}

.text {
font-size: 1.4rem;
}

}

}
18 changes: 18 additions & 0 deletions test/spec/services/analyticsservice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

describe('Service: analyticsService', function () {

// load the service's module
beforeEach(module('happybotsApp'));

// instantiate service
var analyticsService;
beforeEach(inject(function (_analyticsService_) {
analyticsService = _analyticsService_;
}));

it('should do something', function () {
expect(!!analyticsService).toBe(true);
});

});

0 comments on commit 09a1b28

Please sign in to comment.