Skip to content

Commit

Permalink
Merge pull request #14 from opendevstack/fix/custom-toc
Browse files Browse the repository at this point in the history
Remove custom TOC
  • Loading branch information
michaelsauter committed Apr 21, 2020
2 parents 7078312 + 8a704dd commit a108989
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 122 deletions.
99 changes: 0 additions & 99 deletions src/css/extensions/article-toc.css

This file was deleted.

1 change: 0 additions & 1 deletion src/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
@import "footer.css";
@import "highlight.css";
@import "print.css";
@import "extensions/article-toc.css";
6 changes: 1 addition & 5 deletions src/partials/article.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<article class="doc"><a name="section-top"></a>
<article class="doc">
{{#if (eq page.layout '404')}}
<h1 class="page">{{{or page.title 'Page Not Found'}}}</h1>
<div class="paragraph">
Expand All @@ -15,7 +15,3 @@ If you typed the URL of this page manually, please double check that you entered
{{{page.contents}}}
{{/if}}
</article>
<aside class="article-aside hidden" role="navigation">
<h3 class="toc-title">Contents</h3>
<div id="article-toc"></div>
</aside>
17 changes: 0 additions & 17 deletions src/partials/footer-scripts.hbs
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.1.1/tocbot.min.js"></script>
<script src="{{uiRootPath}}/js/site.js"></script>
<script async src="{{uiRootPath}}/js/vendor/highlight.js"></script>
<script>hljs.initHighlighting()</script>
<script>
tocbot.init( {
tocSelector: '#article-toc',
contentSelector: 'article',
headingSelector: 'h2, h3, h4, h5, h6',
collapseDepth: 6,
positionFixedSelector: '#article-toc',
scrollSmooth: false
} );
var tocList = document.getElementById( 'article-toc' ).getElementsByClassName( 'toc-list' );
if ( tocList && tocList.length > 0 && tocList[0].childNodes.length > 0 ) {
document.getElementById( 'article-toc' ).parentNode.classList.remove( 'hidden' );
}
</script>

0 comments on commit a108989

Please sign in to comment.