Loading lib/jsduck/guides.rb +4 −2 Original line number Diff line number Diff line Loading @@ -63,8 +63,9 @@ module JsDuck # Creates table of contents at the top of guide by looking for <h2> elements in HTML. def add_toc(guide, html) toc = [ "<div class='toc'>\n", "<p><strong>Contents</strong></p>\n", "<ul class='toc'>\n", "<ol>\n", ] new_html = [] i = 0 Loading @@ -77,7 +78,8 @@ module JsDuck new_html << line end end toc << "</ul>\n" toc << "</ol>\n" toc << "</div>\n" # Inject TOC at below first heading new_html.insert(1, toc) new_html.flatten.join Loading template/app/controller/Guides.js +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ Ext.define('Docs.controller.Guides', { this.handleUrlClick(el.href, event); }, this, { preventDefault: true, delegate: 'ul.toc > li > a' delegate: '.toc a' }); } } Loading template/resources/sass/viewport.scss +9 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,15 @@ #center-container .guide-container { padding: 10px; font-size: 14px; // Table of contents for guides // Similar styles to class docs sidebar .toc { float: right; background-color: #f7f7f7; border: solid 1px #e8e8e8; padding: 10px 20px; margin: 0 14px; @include border-radius(5px); } h1 { background: url(../images/doc-m.png) no-repeat -5px -5px; padding: 10px 0 10px 55px; Loading Loading
lib/jsduck/guides.rb +4 −2 Original line number Diff line number Diff line Loading @@ -63,8 +63,9 @@ module JsDuck # Creates table of contents at the top of guide by looking for <h2> elements in HTML. def add_toc(guide, html) toc = [ "<div class='toc'>\n", "<p><strong>Contents</strong></p>\n", "<ul class='toc'>\n", "<ol>\n", ] new_html = [] i = 0 Loading @@ -77,7 +78,8 @@ module JsDuck new_html << line end end toc << "</ul>\n" toc << "</ol>\n" toc << "</div>\n" # Inject TOC at below first heading new_html.insert(1, toc) new_html.flatten.join Loading
template/app/controller/Guides.js +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ Ext.define('Docs.controller.Guides', { this.handleUrlClick(el.href, event); }, this, { preventDefault: true, delegate: 'ul.toc > li > a' delegate: '.toc a' }); } } Loading
template/resources/sass/viewport.scss +9 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,15 @@ #center-container .guide-container { padding: 10px; font-size: 14px; // Table of contents for guides // Similar styles to class docs sidebar .toc { float: right; background-color: #f7f7f7; border: solid 1px #e8e8e8; padding: 10px 20px; margin: 0 14px; @include border-radius(5px); } h1 { background: url(../images/doc-m.png) no-repeat -5px -5px; padding: 10px 0 10px 55px; Loading