Skip to content

feat(app): implement footer as directive #1045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions app/templates/client/app/main/main(css).css
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
.thing-form {
margin: 20px 0;
margin: 20px 0;
}

#banner {
border-bottom: none;
margin-top: -20px;
border-bottom: none;
margin-top: -20px;
}

#banner h1 {
font-size: 60px;
line-height: 1;
letter-spacing: -1px;
font-size: 60px;
line-height: 1;
letter-spacing: -1px;
}

.hero-unit {
position: relative;
padding: 30px 15px;
color: #F5F5F5;
text-align: center;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
background: #4393B9;
}

.footer {
text-align: center;
padding: 30px 0;
margin-top: 70px;
border-top: 1px solid #E5E5E5;
position: relative;
padding: 30px 15px;
color: #F5F5F5;
text-align: center;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
background: #4393B9;
}

.navbar-text {
margin-left: 15px;
}
margin-left: 15px;
}
8 changes: 1 addition & 7 deletions app/templates/client/app/main/main(html).html
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,4 @@ <h1 class="page-header">Features:</h1>
</form><% } %>
</div>

<footer class="footer">
<div class="container">
<p>Angular Fullstack v<%= pkg.version %> |
<a href="https://twitter.com/tyhenkel">@tyhenkel</a> |
<a href="https://github.com/DaftMonk/generator-angular-fullstack/issues?state=open">Issues</a></p>
</div>
</footer>
<footer></footer>
9 changes: 1 addition & 8 deletions app/templates/client/app/main/main(jade).jade
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,4 @@ header#banner.hero-unit
span.input-group-btn
button.btn.btn-primary(type='submit', ng-click='addThing()') Add New<% } %>

footer.footer
.container
p
| Angular Fullstack v<%= pkg.version %>
= ' | '
a(href='https://twitter.com/tyhenkel') @tyhenkel
= ' | '
a(href='https://github.com/DaftMonk/generator-angular-fullstack/issues?state=open') Issues
footer
33 changes: 13 additions & 20 deletions app/templates/client/app/main/main(less).less
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,25 @@
}

#banner {
border-bottom: none;
margin-top: -20px;
border-bottom: none;
margin-top: -20px;
}

#banner h1 {
font-size: 60px;
line-height: 1;
letter-spacing: -1px;
font-size: 60px;
line-height: 1;
letter-spacing: -1px;
}

.hero-unit {
position: relative;
padding: 30px 15px;
color: #F5F5F5;
text-align: center;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
background: #4393B9;
}

.footer {
text-align: center;
padding: 30px 0;
margin-top: 70px;
border-top: 1px solid #E5E5E5;
position: relative;
padding: 30px 15px;
color: #F5F5F5;
text-align: center;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
background: #4393B9;
}

.navbar-text {
margin-left: 15px;
}
margin-left: 15px;
}
33 changes: 13 additions & 20 deletions app/templates/client/app/main/main(sass).scss
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
.thing-form {
margin: 20px 0;
margin: 20px 0;
}

#banner {
border-bottom: none;
margin-top: -20px;
border-bottom: none;
margin-top: -20px;
}

#banner h1 {
font-size: 60px;
line-height: 1;
letter-spacing: -1px;
font-size: 60px;
line-height: 1;
letter-spacing: -1px;
}

.hero-unit {
position: relative;
padding: 30px 15px;
color: #F5F5F5;
text-align: center;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
background: #4393B9;
}

.footer {
text-align: center;
padding: 30px 0;
margin-top: 70px;
border-top: 1px solid #E5E5E5;
position: relative;
padding: 30px 15px;
color: #F5F5F5;
text-align: center;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
background: #4393B9;
}

.navbar-text {
margin-left: 15px;
}
}
32 changes: 13 additions & 19 deletions app/templates/client/app/main/main(stylus).styl
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
.thing-form
margin 20px 0
margin 20px 0

#banner
border-bottom none
margin-top -20px
border-bottom none
margin-top -20px

#banner h1
font-size 60px
letter-spacing -1px
line-height 1
font-size 60px
letter-spacing -1px
line-height 1

.hero-unit
background #4393B9
color #F5F5F5
padding 30px 15px
position relative
text-align center
text-shadow 0 1px 0 rgba(0, 0, 0, 0.1)

.footer
border-top 1px solid #E5E5E5
margin-top 70px
padding 30px 0
text-align center
background #4393B9
color #F5F5F5
padding 30px 15px
position relative
text-align center
text-shadow 0 1px 0 rgba(0, 0, 0, 0.1)

.navbar-text
margin-left 15px
margin-left 15px
6 changes: 6 additions & 0 deletions app/templates/client/components/footer/footer(css).css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
footer.footer {
text-align: center;
padding: 30px 0;
margin-top: 70px;
border-top: 1px solid #E5E5E5;
}
6 changes: 6 additions & 0 deletions app/templates/client/components/footer/footer(html).html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="container">
<p>Angular Fullstack v<%= pkg.version %> |
<a href="https://twitter.com/tyhenkel">@tyhenkel</a> |
<a href="https://github.com/DaftMonk/generator-angular-fullstack/issues?state=open">Issues</a>
</p>
</div>
7 changes: 7 additions & 0 deletions app/templates/client/components/footer/footer(jade).jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.container
p
| Angular Fullstack v<%= pkg.version %>
= ' | '
a(href='https://twitter.com/tyhenkel') @tyhenkel
= ' | '
a(href='https://github.com/DaftMonk/generator-angular-fullstack/issues?state=open') Issues
6 changes: 6 additions & 0 deletions app/templates/client/components/footer/footer(less).less
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
footer.footer {
text-align: center;
padding: 30px 0;
margin-top: 70px;
border-top: 1px solid #E5E5E5;
}
6 changes: 6 additions & 0 deletions app/templates/client/components/footer/footer(sass).scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
footer.footer {
text-align: center;
padding: 30px 0;
margin-top: 70px;
border-top: 1px solid #E5E5E5;
}
5 changes: 5 additions & 0 deletions app/templates/client/components/footer/footer(stylus).styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
footer.footer
border-top 1px solid #E5E5E5
margin-top 70px
padding 30px 0
text-align center
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict'

angular.module '<%= scriptAppName %>'
.directive 'footer', ->
templateUrl: 'components/footer/footer.html'
restrict: 'E',
link: (scope, element) ->
element.addClass('footer')
12 changes: 12 additions & 0 deletions app/templates/client/components/footer/footer.directive(js).js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

angular.module('<%= scriptAppName %>')
.directive('footer', function () {
return {
templateUrl: 'components/footer/footer.html',
restrict: 'E',
link: function (scope, element) {
element.addClass('footer');
}
};
});
3 changes: 3 additions & 0 deletions test/test-file-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ describe('angular-fullstack generator', function () {
'client/app/main/main.controller.' + script,
'client/app/main/main.controller.spec.' + script,
'client/assets/images/yeoman.png',
'client/components/footer/footer.' + stylesheet,
'client/components/footer/footer.' + markup,
'client/components/footer/footer.directive.' + script,
'client/components/navbar/navbar.' + markup,
'client/components/navbar/navbar.controller.' + script,
'client/components/navbar/navbar.directive.' + script,
Expand Down