From a23aca8f02358a0fa35988148bae10798d5fe0b3 Mon Sep 17 00:00:00 2001 From: Sandoche Adittane Date: Tue, 19 Jul 2016 17:34:54 +0200 Subject: [PATCH 1/3] google analytics bug fixed --- .grunt/grunt-gh-pages/gh-pages/src | 2 +- app/index.html | 1 + app/scripts/app.js | 14 +++++--------- app/scripts/services/analyticsservice.js | 16 ++++++++++++++++ test/spec/services/analyticsservice.js | 18 ++++++++++++++++++ 5 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 app/scripts/services/analyticsservice.js create mode 100644 test/spec/services/analyticsservice.js diff --git a/.grunt/grunt-gh-pages/gh-pages/src b/.grunt/grunt-gh-pages/gh-pages/src index 96417b1..54c3af6 160000 --- a/.grunt/grunt-gh-pages/gh-pages/src +++ b/.grunt/grunt-gh-pages/gh-pages/src @@ -1 +1 @@ -Subproject commit 96417b1836232740cc63c448573d77b1f2562f99 +Subproject commit 54c3af6466eef2878207c41a174d5a4480d9b618 diff --git a/app/index.html b/app/index.html index b34cde3..3890bcf 100644 --- a/app/index.html +++ b/app/index.html @@ -86,6 +86,7 @@ + diff --git a/app/scripts/app.js b/app/scripts/app.js index 48f2aeb..2b21975 100644 --- a/app/scripts/app.js +++ b/app/scripts/app.js @@ -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()); + }); + }); diff --git a/app/scripts/services/analyticsservice.js b/app/scripts/services/analyticsservice.js new file mode 100644 index 0000000..4e3d9ac --- /dev/null +++ b/app/scripts/services/analyticsservice.js @@ -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'); + }; + }); diff --git a/test/spec/services/analyticsservice.js b/test/spec/services/analyticsservice.js new file mode 100644 index 0000000..94e3c71 --- /dev/null +++ b/test/spec/services/analyticsservice.js @@ -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); + }); + +}); From ef4a9ebcd35406ab4f291fab2b3757ddf374299e Mon Sep 17 00:00:00 2001 From: Sandoche Adittane Date: Tue, 19 Jul 2016 17:47:15 +0200 Subject: [PATCH 2/3] bot page made more responsive --- app/styles/_bot.scss | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/styles/_bot.scss b/app/styles/_bot.scss index 370a5a2..5ce2b0a 100644 --- a/app/styles/_bot.scss +++ b/app/styles/_bot.scss @@ -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; } } From 010c92e86c39fd920cd788de30e6a389fecaebfb Mon Sep 17 00:00:00 2001 From: Sandoche Adittane Date: Tue, 19 Jul 2016 17:56:34 +0200 Subject: [PATCH 3/3] wip page made responsive --- app/styles/_socialbuttons.scss | 6 ++---- app/styles/_wip.scss | 11 +++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/styles/_socialbuttons.scss b/app/styles/_socialbuttons.scss index 500ea9d..affa904 100644 --- a/app/styles/_socialbuttons.scss +++ b/app/styles/_socialbuttons.scss @@ -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 { diff --git a/app/styles/_wip.scss b/app/styles/_wip.scss index f4955e6..524ee11 100644 --- a/app/styles/_wip.scss +++ b/app/styles/_wip.scss @@ -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; + } + } }