From b2a04c538fc24c4135578df64174a2be68ab72c3 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Mon, 11 Jan 2016 14:51:26 -0300 Subject: [PATCH] Clean project --- gulp/server.js | 4 ++-- src/app/components/malarkey/malarkey.directive.js | 75 --------------------------------------------------------------------------- src/app/components/malarkey/malarkey.directive.spec.js | 45 --------------------------------------------- src/app/components/malarkey/malarkey.scss | 25 ------------------------- src/app/components/navbar/navbar.html | 10 ++++------ src/app/components/navbar/navbar.scss | 4 ++-- src/app/index.constants.js | 3 +-- src/assets/images/logo-noosfero.png | Bin 0 -> 7252 bytes src/favicon.ico | Bin 4286 -> 0 bytes 9 files changed, 9 insertions(+), 157 deletions(-) delete mode 100644 src/app/components/malarkey/malarkey.directive.js delete mode 100644 src/app/components/malarkey/malarkey.directive.spec.js delete mode 100644 src/app/components/malarkey/malarkey.scss create mode 100644 src/assets/images/logo-noosfero.png diff --git a/gulp/server.js b/gulp/server.js index efe8beb..54adfa5 100644 --- a/gulp/server.js +++ b/gulp/server.js @@ -29,8 +29,8 @@ function browserSyncInit(baseDir, browser) { server.middleware = [proxyMiddleware('http://localhost:3000/api', {changeOrigin:true}), proxyMiddleware('http://localhost:3000/myprofile', {changeOrigin:true}), proxyMiddleware('http://localhost:3000/designs', {changeOrigin:true}), - proxyMiddleware('http://localhost:3000/images', {changeOrigin:true}), - proxyMiddleware('http://localhost:3000/assets', {changeOrigin:true})]; + proxyMiddleware('http://localhost:3000/images', {changeOrigin:true})]; + // proxyMiddleware('http://localhost:3000/assets', {changeOrigin:true})]; browserSync.instance = browserSync.init({ startPath: '/', diff --git a/src/app/components/malarkey/malarkey.directive.js b/src/app/components/malarkey/malarkey.directive.js deleted file mode 100644 index 977262f..0000000 --- a/src/app/components/malarkey/malarkey.directive.js +++ /dev/null @@ -1,75 +0,0 @@ -(function() { - 'use strict'; - - angular - .module('angular') - .directive('acmeMalarkey', acmeMalarkey); - - /** @ngInject */ - function acmeMalarkey(malarkey) { - var directive = { - restrict: 'E', - scope: { - extraValues: '=' - }, - template: ' ', - link: linkFunc, - controller: MalarkeyController, - controllerAs: 'vm' - }; - - return directive; - - function linkFunc(scope, el, attr, vm) { - var watcher; - var typist = malarkey(el[0], { - typeSpeed: 40, - deleteSpeed: 40, - pauseDelay: 800, - loop: true, - postfix: ' ' - }); - - el.addClass('acme-malarkey'); - - angular.forEach(scope.extraValues, function(value) { - typist.type(value).pause().delete(); - }); - - watcher = scope.$watch('vm.contributors', function() { - angular.forEach(vm.contributors, function(contributor) { - typist.type(contributor.login).pause().delete(); - }); - }); - - scope.$on('$destroy', function () { - watcher(); - }); - } - - /** @ngInject */ - function MalarkeyController($log, githubContributor) { - var vm = this; - - vm.contributors = []; - - activate(); - - function activate() { - return getContributors().then(function() { - $log.info('Activated Contributors View'); - }); - } - - function getContributors() { - return githubContributor.getContributors(10).then(function(data) { - vm.contributors = data; - - return vm.contributors; - }); - } - } - - } - -})(); diff --git a/src/app/components/malarkey/malarkey.directive.spec.js b/src/app/components/malarkey/malarkey.directive.spec.js deleted file mode 100644 index 3be3309..0000000 --- a/src/app/components/malarkey/malarkey.directive.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -(function() { - 'use strict'; - - /** - * @todo Complete the test - * This example is not perfect. - * The `link` function is not tested. - * (malarkey usage, addClass, $watch, $destroy) - */ - describe('directive malarkey', function() { - var $log; - var vm; - var el; - - beforeEach(module('angular')); - beforeEach(inject(function($compile, $rootScope, githubContributor, $q, _$log_) { - $log = _$log_; - - spyOn(githubContributor, 'getContributors').and.callFake(function() { - return $q.when([{}, {}, {}, {}, {}, {}]); - }); - - el = angular.element(''); - - $compile(el)($rootScope.$new()); - $rootScope.$digest(); - vm = el.isolateScope().vm; - })); - - it('should be compiled', function() { - expect(el.html()).not.toEqual(null); - }); - - it('should have isolate scope object with instanciate members', function() { - expect(vm).toEqual(jasmine.any(Object)); - - expect(vm.contributors).toEqual(jasmine.any(Array)); - expect(vm.contributors.length).toEqual(6); - }); - - it('should log a info', function() { - expect($log.info.logs).toEqual(jasmine.stringMatching('Activated Contributors View')); - }); - }); -})(); diff --git a/src/app/components/malarkey/malarkey.scss b/src/app/components/malarkey/malarkey.scss deleted file mode 100644 index 62ccac1..0000000 --- a/src/app/components/malarkey/malarkey.scss +++ /dev/null @@ -1,25 +0,0 @@ -.acme-malarkey { - text-transform: capitalize; - color: #cb3837; - - &:after { - animation: cursor-blink 0.4s linear infinite; - content: "|"; - color: #cb3837; - } -} - -@keyframes cursor-blink { - 1% { - opacity: 0; - } - 40% { - opacity: 0; - } - 60% { - opacity: 1; - } - 100% { - opacity: 1; - } -} diff --git a/src/app/components/navbar/navbar.html b/src/app/components/navbar/navbar.html index 058a17e..5cf0142 100644 --- a/src/app/components/navbar/navbar.html +++ b/src/app/components/navbar/navbar.html @@ -1,20 +1,18 @@