Merge pull request #85 from charlesprakash/contrib
Ability to hide sidebar for specific pages
This commit is contained in:
BIN
_data/.DS_Store
vendored
BIN
_data/.DS_Store
vendored
Binary file not shown.
@ -40,7 +40,8 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<!-- if you aren't using the accordion, uncomment this block:
|
||||
@ -48,9 +49,7 @@
|
||||
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
|
||||
</p>
|
||||
-->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
|
||||
<script>$("li.active").parents('li').toggleClass("active");</script>
|
||||
|
@ -62,7 +62,7 @@
|
||||
searchInput: document.getElementById('search-input'),
|
||||
resultsContainer: document.getElementById('results-container'),
|
||||
dataSource: '{{ "search.json" }}',
|
||||
searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "'", "\"}}">{title}</a></li>',
|
||||
searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "\'", "\"}}">{title}</a></li>',
|
||||
noResultsText: '{{site.data.strings.search_no_results_text}}',
|
||||
limit: 10,
|
||||
fuzzy: true,
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% include head.html %}
|
||||
<script>
|
||||
@ -78,14 +79,19 @@
|
||||
<div class="col-lg-12"> </div>
|
||||
<!-- Content Row -->
|
||||
<div class="row">
|
||||
<!-- Sidebar Column -->
|
||||
<div class="col-md-3" id="tg-sb-sidebar">
|
||||
{% assign content_col_size = "col-md-12" %}
|
||||
{% unless page.hide_sidebar %}
|
||||
<!-- Sidebar Column -->
|
||||
<div class="col-md-3" id="tg-sb-sidebar">
|
||||
{% include sidebar.html %}
|
||||
</div>
|
||||
{% assign content_col_size = "col-md-9" %}
|
||||
{% endunless %}
|
||||
|
||||
{% include sidebar.html %}
|
||||
<!-- Content Column -->
|
||||
<div class="col-md-9" id="tg-sb-content">
|
||||
{{content}}
|
||||
</div>
|
||||
<!-- Content Column -->
|
||||
<div class="{{content_col_size}}" id="tg-sb-content">
|
||||
{{content}}
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
|
BIN
css/.DS_Store
vendored
BIN
css/.DS_Store
vendored
Binary file not shown.
2
index.md
2
index.md
@ -138,6 +138,8 @@ Note that your sidebar can only have 2 levels. Given that each product has its o
|
||||
|
||||
{% include note.html content="Note that each level must have at least one topic before the next level starts. You can't have a second level that contains multiple third levels without having at least one standalone topic in the second level." %}
|
||||
|
||||
You can optionally turn off the sidebar on any page (e.g. landing pages). To turn off the sidebar for a page, you should set the page frontmatter tag as `hide_sidebar: true`.
|
||||
|
||||
For more detail on the sidebar, see [Sidebar navigation][mydoc_sidebar_navigation].
|
||||
|
||||
## Sidebar syntax
|
||||
|
BIN
js/.DS_Store
vendored
BIN
js/.DS_Store
vendored
Binary file not shown.
BIN
pages/.DS_Store
vendored
BIN
pages/.DS_Store
vendored
Binary file not shown.
Reference in New Issue
Block a user