Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
junaidrsd committed Nov 28, 2016
1 parent 197373e commit c51cdd9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 33 deletions.
1 change: 1 addition & 0 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ gulp.task('dev:generate', () => {
.pipe(styleguide.generate({
title: 'SC5 Styleguide',
sideNav: false,
showMarkupSection: true,
server: true,
rootPath: outputPath,
overviewPath: 'README.md',
Expand Down
66 changes: 34 additions & 32 deletions lib/app/views/sections.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<article
sg-section
ng-repeat="section in sections.data | filter: filterSections | filter: search">
</article>
<div class="sg sg-section-links" ng-repeat="section in sections.data | filter: filterMainSections()" ng-if="isMainSection(section) && isActive(section)">
<a class="sg sg-section-link"
ng-class="{ 'active': (currentSection === section.reference), 'sub-active': (currentSection.indexOf(section.reference + '.') === 0) }"
ng-click="clearSearch()"
ui-sref="app.index.section({section: section.reference})">
</a>
<ul class="sg sg-subsection-links">
<li class="sg sg-section-list-item" ng-repeat="subsection in sections.data | filter: filterSubsections(section)">
<a class="sg sg-section-link"
ng-class="currentSection === subsection.reference ? 'active' : ''"
ng-click="clearSearch()"
ui-sref="app.index.section({section: subsection.reference})">
<span class="sg-ref">{{ subsection.reference }}</span> <span ng-bind-html="subsection.header | unsafe"></span>
<ul class="sg sg-nav-subsubsection sg-subsubsection-links">
<li class="sg sg-section-list-item" ng-repeat="subsubsection in sections.data | filter: filterSubsections(subsection)">
<a class="sg sg-section-link"
ng-class="currentSection === subsubsection.reference ? 'active' : ''"
ng-click="clearSearch()"
ui-sref="app.index.section({section: subsubsection.reference})">
<span class="sg-ref">{{ subsubsection.reference }}</span> <span ng-bind-html="subsubsection.header | unsafe"></span>
</a>
</li>
</ul>
</a>
</li>
</ul>
</div>
<section class="sg sg-after-sections" ng-bind-html="config.data.afterSections | unsafe"></section>
<section class="sg sg-sections">
<article
sg-section
ng-repeat="section in sections.data | filter: filterSections | filter: search">
</article>
<section class="sg sg-section-links" ng-repeat="section in sections.data | filter: filterMainSections()" ng-if="isMainSection(section) && isActive(section)">
<a class="sg sg-section-link"
ng-class="{ 'active': (currentSection === section.reference), 'sub-active': (currentSection.indexOf(section.reference + '.') === 0) }"
ng-click="clearSearch()"
ui-sref="app.index.section({section: section.reference})">
</a>
<ul class="sg sg-subsection-links">
<li class="sg sg-section-list-item" ng-repeat="subsection in sections.data | filter: filterSubsections(section)">
<a class="sg sg-section-link"
ng-class="currentSection === subsection.reference ? 'active' : ''"
ng-click="clearSearch()"
ui-sref="app.index.section({section: subsection.reference})">
<span class="sg-ref">{{ subsection.reference }}</span> <span ng-bind-html="subsection.header | unsafe"></span>
<ul class="sg sg-nav-subsubsection sg-subsubsection-links">
<li class="sg sg-section-list-item" ng-repeat="subsubsection in sections.data | filter: filterSubsections(subsection)">
<a class="sg sg-section-link"
ng-class="currentSection === subsubsection.reference ? 'active' : ''"
ng-click="clearSearch()"
ui-sref="app.index.section({section: subsubsection.reference})">
<span class="sg-ref">{{ subsubsection.reference }}</span> <span ng-bind-html="subsubsection.header | unsafe"></span>
</a>
</li>
</ul>
</a>
</li>
</ul>
</section>
</section>
<section class="sg sg-after-sections" ng-bind-html="config.data.afterSections | unsafe"></section>
2 changes: 1 addition & 1 deletion lib/modules/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function sanitizeOptions(opt) {
afterSections: (typeof opt.afterSections === 'object') ? opt.afterSections.join('\n') : opt.afterSections,
additionalNgDependencies: opt.additionalNgDependencies || false,
sideNav: opt.sideNav || false,
showMarkupSection: opt.showMarkupSection || true,
showMarkupSection: opt.showMarkupSection || false,
disableEncapsulation: opt.disableEncapsulation || false,
disableHtml5Mode: opt.disableHtml5Mode || (typeof opt.disableHtml5Mode === 'undefined' && !opt.server) || false,
appRoot: opt.appRoot || '',
Expand Down

0 comments on commit c51cdd9

Please sign in to comment.