Skip to content

Commit

Permalink
Merge pull request #366 from eleven-labs/fix-class-nojs
Browse files Browse the repository at this point in the history
Insert class="no-js" only if Modernizer is used
  • Loading branch information
Swiip committed Feb 19, 2015
2 parents c7b3a0d + f3c3f6c commit 2a53c8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/templates/src/_index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html class="no-js" ng-app="<%= appName %>">
<html<% if (includeModernizr) { %> class="no-js"<% } %> ng-app="<%= appName %>">
<head>
<meta charset="utf-8">
<title><%= appName %></title>
Expand Down
2 changes: 2 additions & 0 deletions test/template/test-index-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ describe('gulp-angular index js template', function () {
model.includeModernizr = false;
var result = indexHtml(model);
result.should.not.match(/<!-- build:js\(src\) scripts\/modernizr.js -->/);
result.should.not.match(/<html class="no-js"/);

model.includeModernizr = true;
result = indexHtml(model);
result.should.match(/<!-- build:js\(src\) scripts\/modernizr.js -->/);
result.should.match(/<html class="no-js"/);
});

it('should insert routerHtml content', function() {
Expand Down

0 comments on commit 2a53c8a

Please sign in to comment.