Commit b2a04c538fc24c4135578df64174a2be68ab72c3
1 parent
2f459e2b
Exists in
master
and in
1 other branch
Clean project
Showing
9 changed files
with
9 additions
and
157 deletions
Show diff stats
gulp/server.js
| ... | ... | @@ -29,8 +29,8 @@ function browserSyncInit(baseDir, browser) { |
| 29 | 29 | server.middleware = [proxyMiddleware('http://localhost:3000/api', {changeOrigin:true}), |
| 30 | 30 | proxyMiddleware('http://localhost:3000/myprofile', {changeOrigin:true}), |
| 31 | 31 | proxyMiddleware('http://localhost:3000/designs', {changeOrigin:true}), |
| 32 | - proxyMiddleware('http://localhost:3000/images', {changeOrigin:true}), | |
| 33 | - proxyMiddleware('http://localhost:3000/assets', {changeOrigin:true})]; | |
| 32 | + proxyMiddleware('http://localhost:3000/images', {changeOrigin:true})]; | |
| 33 | + // proxyMiddleware('http://localhost:3000/assets', {changeOrigin:true})]; | |
| 34 | 34 | |
| 35 | 35 | browserSync.instance = browserSync.init({ |
| 36 | 36 | startPath: '/', | ... | ... |
src/app/components/malarkey/malarkey.directive.js
| ... | ... | @@ -1,75 +0,0 @@ |
| 1 | -(function() { | |
| 2 | - 'use strict'; | |
| 3 | - | |
| 4 | - angular | |
| 5 | - .module('angular') | |
| 6 | - .directive('acmeMalarkey', acmeMalarkey); | |
| 7 | - | |
| 8 | - /** @ngInject */ | |
| 9 | - function acmeMalarkey(malarkey) { | |
| 10 | - var directive = { | |
| 11 | - restrict: 'E', | |
| 12 | - scope: { | |
| 13 | - extraValues: '=' | |
| 14 | - }, | |
| 15 | - template: ' ', | |
| 16 | - link: linkFunc, | |
| 17 | - controller: MalarkeyController, | |
| 18 | - controllerAs: 'vm' | |
| 19 | - }; | |
| 20 | - | |
| 21 | - return directive; | |
| 22 | - | |
| 23 | - function linkFunc(scope, el, attr, vm) { | |
| 24 | - var watcher; | |
| 25 | - var typist = malarkey(el[0], { | |
| 26 | - typeSpeed: 40, | |
| 27 | - deleteSpeed: 40, | |
| 28 | - pauseDelay: 800, | |
| 29 | - loop: true, | |
| 30 | - postfix: ' ' | |
| 31 | - }); | |
| 32 | - | |
| 33 | - el.addClass('acme-malarkey'); | |
| 34 | - | |
| 35 | - angular.forEach(scope.extraValues, function(value) { | |
| 36 | - typist.type(value).pause().delete(); | |
| 37 | - }); | |
| 38 | - | |
| 39 | - watcher = scope.$watch('vm.contributors', function() { | |
| 40 | - angular.forEach(vm.contributors, function(contributor) { | |
| 41 | - typist.type(contributor.login).pause().delete(); | |
| 42 | - }); | |
| 43 | - }); | |
| 44 | - | |
| 45 | - scope.$on('$destroy', function () { | |
| 46 | - watcher(); | |
| 47 | - }); | |
| 48 | - } | |
| 49 | - | |
| 50 | - /** @ngInject */ | |
| 51 | - function MalarkeyController($log, githubContributor) { | |
| 52 | - var vm = this; | |
| 53 | - | |
| 54 | - vm.contributors = []; | |
| 55 | - | |
| 56 | - activate(); | |
| 57 | - | |
| 58 | - function activate() { | |
| 59 | - return getContributors().then(function() { | |
| 60 | - $log.info('Activated Contributors View'); | |
| 61 | - }); | |
| 62 | - } | |
| 63 | - | |
| 64 | - function getContributors() { | |
| 65 | - return githubContributor.getContributors(10).then(function(data) { | |
| 66 | - vm.contributors = data; | |
| 67 | - | |
| 68 | - return vm.contributors; | |
| 69 | - }); | |
| 70 | - } | |
| 71 | - } | |
| 72 | - | |
| 73 | - } | |
| 74 | - | |
| 75 | -})(); |
src/app/components/malarkey/malarkey.directive.spec.js
| ... | ... | @@ -1,45 +0,0 @@ |
| 1 | -(function() { | |
| 2 | - 'use strict'; | |
| 3 | - | |
| 4 | - /** | |
| 5 | - * @todo Complete the test | |
| 6 | - * This example is not perfect. | |
| 7 | - * The `link` function is not tested. | |
| 8 | - * (malarkey usage, addClass, $watch, $destroy) | |
| 9 | - */ | |
| 10 | - describe('directive malarkey', function() { | |
| 11 | - var $log; | |
| 12 | - var vm; | |
| 13 | - var el; | |
| 14 | - | |
| 15 | - beforeEach(module('angular')); | |
| 16 | - beforeEach(inject(function($compile, $rootScope, githubContributor, $q, _$log_) { | |
| 17 | - $log = _$log_; | |
| 18 | - | |
| 19 | - spyOn(githubContributor, 'getContributors').and.callFake(function() { | |
| 20 | - return $q.when([{}, {}, {}, {}, {}, {}]); | |
| 21 | - }); | |
| 22 | - | |
| 23 | - el = angular.element('<acme-malarkey extra-values="[\'Poney\', \'Monkey\']"></acme-malarkey>'); | |
| 24 | - | |
| 25 | - $compile(el)($rootScope.$new()); | |
| 26 | - $rootScope.$digest(); | |
| 27 | - vm = el.isolateScope().vm; | |
| 28 | - })); | |
| 29 | - | |
| 30 | - it('should be compiled', function() { | |
| 31 | - expect(el.html()).not.toEqual(null); | |
| 32 | - }); | |
| 33 | - | |
| 34 | - it('should have isolate scope object with instanciate members', function() { | |
| 35 | - expect(vm).toEqual(jasmine.any(Object)); | |
| 36 | - | |
| 37 | - expect(vm.contributors).toEqual(jasmine.any(Array)); | |
| 38 | - expect(vm.contributors.length).toEqual(6); | |
| 39 | - }); | |
| 40 | - | |
| 41 | - it('should log a info', function() { | |
| 42 | - expect($log.info.logs).toEqual(jasmine.stringMatching('Activated Contributors View')); | |
| 43 | - }); | |
| 44 | - }); | |
| 45 | -})(); |
src/app/components/malarkey/malarkey.scss
| ... | ... | @@ -1,25 +0,0 @@ |
| 1 | -.acme-malarkey { | |
| 2 | - text-transform: capitalize; | |
| 3 | - color: #cb3837; | |
| 4 | - | |
| 5 | - &:after { | |
| 6 | - animation: cursor-blink 0.4s linear infinite; | |
| 7 | - content: "|"; | |
| 8 | - color: #cb3837; | |
| 9 | - } | |
| 10 | -} | |
| 11 | - | |
| 12 | -@keyframes cursor-blink { | |
| 13 | - 1% { | |
| 14 | - opacity: 0; | |
| 15 | - } | |
| 16 | - 40% { | |
| 17 | - opacity: 0; | |
| 18 | - } | |
| 19 | - 60% { | |
| 20 | - opacity: 1; | |
| 21 | - } | |
| 22 | - 100% { | |
| 23 | - opacity: 1; | |
| 24 | - } | |
| 25 | -} |
src/app/components/navbar/navbar.html
| 1 | 1 | <nav class="navbar navbar-static-top navbar-inverse"> |
| 2 | 2 | <div class="container-fluid"> |
| 3 | 3 | <div class="navbar-header"> |
| 4 | - <a class="navbar-brand" href="https://github.com/Swiip/generator-gulp-angular"> | |
| 5 | - <span class="glyphicon glyphicon-home"></span> Gulp Angular | |
| 4 | + <a class="navbar-brand" ng-href="/"> | |
| 5 | + <span class="noosfero-logo"><img src="assets/images/logo-noosfero.png"></span> Noosfero | |
| 6 | 6 | </a> |
| 7 | 7 | </div> |
| 8 | 8 | |
| 9 | 9 | <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> |
| 10 | 10 | <ul class="nav navbar-nav"> |
| 11 | 11 | <li class="active"><a ng-href="#">Home</a></li> |
| 12 | - <li><a ng-href="#">About</a></li> | |
| 13 | - <li><a ng-href="#">Contact</a></li> | |
| 14 | 12 | </ul> |
| 15 | 13 | |
| 16 | - <ul class="nav navbar-nav navbar-right acme-navbar-text"> | |
| 17 | - <li>Application was created {{ vm.relativeDate }}.</li> | |
| 14 | + <ul class="nav navbar-nav navbar-right"> | |
| 15 | + <li><a ng-href="#">Login</a></li> | |
| 18 | 16 | </ul> |
| 19 | 17 | </div> |
| 20 | 18 | </div> | ... | ... |
src/app/components/navbar/navbar.scss
src/app/index.constants.js
7.08 KB
src/favicon.ico