mirror of https://github.com/docker/docs.git
Ensure left nav visibly displays the current topic
This commit is contained in:
parent
4d6c04a994
commit
885b6b111e
|
@ -126,6 +126,17 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor %
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<script language="javascript">
|
||||
// ensure that the left nav visibly displays the current topic
|
||||
var current = document.getElementsByClassName("active currentPage");
|
||||
if (current) {
|
||||
var container = document.getElementsByClassName("col-sm-2 col-md-2 sidebar");
|
||||
if (container) {
|
||||
current[0].scrollIntoView(true);
|
||||
container[0].scrollTop -= 150;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="toc-nav">
|
||||
<div id="{% if page.landing == true %}sidebar-wrapper-home{%else%}sidebar-wrapper{% endif %}" class="{% if page.landing == true %} affix-top{%else%}sidebar-wrapper{% endif %}" {% if page.landing == true %} data-spy="affix" data-offset-top="490">{%else%}{% endif %}
|
||||
|
@ -137,7 +148,7 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor %
|
|||
<li><a href="https://github.com/docker/docker.github.io/issues/new?title=Feedback for: {{ page.path }}&assignee={% if page.assignee %}{{ page.assignee }}{% else %}{{ page.defaultassignee }}{% endif %}&body=File: [{{ page.path }}](https://docs.docker.com{{ page.url }})"
|
||||
class="nomunge"><i class="fa fa-check" aria-hidden="true"></i> Request docs changes</a></li>
|
||||
<li><a href="https://www.docker.com/docker-support-services"><i class="fa fa-question" aria-hidden="true"></i> Get support</a></li>
|
||||
<!-- day/night switch
|
||||
<!-- day/night switch
|
||||
<li>
|
||||
<div class="toggle-mode">
|
||||
<div class="icon">
|
||||
|
|
Loading…
Reference in New Issue