Skip to content

Commit

Permalink
Implement horizontal navigation bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannu Pelkonen committed Apr 7, 2015
1 parent 79d692b commit 10eda60
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 208 deletions.
1 change: 0 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ gulp.task('dev', ['dev:static', 'dev:applystyles', 'dev:generate'], function() {
});
gulp.watch('README.md', ['dev:generate']);
gulp.watch('lib/styleguide.js', ['dev:generate']);
gulp.watch('lib/app/**', ['dev:generate']);
});

gulp.task('build', ['sass', 'js:app', 'js:vendor', 'html', 'assets']);
Expand Down
12 changes: 10 additions & 2 deletions lib/app/js/controllers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ angular.module('sgApp')
$scope.socketService = Socket;

// Check if section is a main section
$scope.filterMainSections = function(section) {
return /^[0-9]+$/.test(section.reference);
$scope.filterMainSections = function() {
return function(section) {
return !!section.reference && /^[A-Za-z0-9_-]+$/.test(section.reference);
}
};

$scope.filterSubsections = function(parentSection) {
return function(section) {
return new RegExp('^' + parentSection.reference + '\.').test(section.reference);
}
}

// Toggle all markup boxes visible/hidden state
$scope.toggleMarkup = function() {
$scope.markupSection.isVisible = !$scope.markupSection.isVisible;
Expand Down
1 change: 1 addition & 0 deletions lib/app/sass/_styleguide_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ $content-margin: 30px;
$designer-tool-width: 30%;
$designer-tool-width-mobile: 90%;
$header-height: 90px;
$menu-height: 40px;
Loading

0 comments on commit 10eda60

Please sign in to comment.