Skip to content

Commit

Permalink
closes #24 - transforma o jumbotron em uma diretiva
Browse files Browse the repository at this point in the history
  • Loading branch information
teles committed Mar 6, 2016
1 parent b151cb3 commit 42d628a
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 14 deletions.
16 changes: 16 additions & 0 deletions src/js/components/jumbotron/directives/jumbotron.directive.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function(){
'use strict';

angular.module('guest-post.jumbotron').directive('jumbotron', jumbotronDirective);

function jumbotronDirective(){
var directive = {
restrict: 'E',
templateUrl: '/js/components/jumbotron/templates/jumbotron.template.html',
scope: {},
replace: true
};
return directive;
}

})();
6 changes: 6 additions & 0 deletions src/js/components/jumbotron/jumbotron.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(function(){
'use strict';

angular.module('guest-post.jumbotron', []);
GUEST.angularDependencies.push('guest-post.jumbotron');
})();
13 changes: 13 additions & 0 deletions src/js/components/jumbotron/templates/jumbotron.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<header class="jumbotron">
<div class="jumbotron__content">
<h1 class="jumbotron__title">Blogs que aceitam guest post</h1>
<h2 class='jumbotron__subtitle'>
Mais de 150 blogs sobre assuntos variados que aceitam posts de convidados.
</h2>
<a href="/sobre" class="jumbotron__main-link">Conheça nossa proposta.</a></h2>
<span class="input-box input-box--is-extra-large">
<input type="text" placeholder="Encontre um blog" class='input-box__input'>
<i class="fa fa-search input-box__icon"></i>
</span>
</div>
</header>
15 changes: 1 addition & 14 deletions src/js/views/home/templates/home-list.template.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
<div>
<header class="jumbotron">
<div class="jumbotron__content">
<h1 class="jumbotron__title">Blogs que aceitam guest post</h1>
<h2 class='jumbotron__subtitle'>
Mais de 150 blogs sobre assuntos variados que aceitam posts de convidados.
</h2>
<a href="/sobre" class="jumbotron__main-link">Conheça nossa proposta.</a></h2>
<span class="input-box input-box--is-extra-large">
<input type="text" placeholder="Encontre um blog" class='input-box__input'>
<i class="fa fa-search input-box__icon"></i>
</span>
</div>
</header>

<jumbotron></jumbotron>
<img src="images/animat-essential/search/animat-search-color.gif" ng-if='vc.isLoadingPromise'>
<div class="blog-box-flex-list">
<blog-box blog='blog.json' ng-repeat='blog in vc.blogs' class="blog-box-flex-item"></blog-box>
Expand Down
4 changes: 4 additions & 0 deletions src/styl/module/input-box.styl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
color: #d8d8d8
font-size: 13px

&:active,
&:focus
box-shadow: 0 0 3px rgb(28, 131, 176)

&__icon
color: #ff5858
cursor: pointer
Expand Down

0 comments on commit 42d628a

Please sign in to comment.