Skip to content

Commit

Permalink
Hooking up nav to real TOC data, formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johndmulhausen committed Feb 16, 2017
1 parent b5c9366 commit f478f1b
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 1,764 deletions.
23 changes: 0 additions & 23 deletions _includes/global-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,3 @@ <h1>Docker's Documentation</h1>
</div>
</div>
</div>
<!-- nav-secondary -->
<nav class="nav-secondary-tabs" data-spy="affix" data-offset-top="410">
<div class="container-fluid">
<div class="search-form">
<form class="navbar-form navbar-left">
<!-- <input type="text" class="form-control" id ="search" placeholder="Search Documentation"> -->
<form class="search-form form-inline ng-pristine ng-valid" id="searchForm" action="/search/">
<input class="search-field form-control ds-input" id="st-search-input" value="" name="q" placeholder="Search the docs" type="search" autocomplete="off" spellcheck="false" dir="auto" style="position: relative; vertical-align: top;">
<div id="autocompleteContainer">
<div id="autocompleteResults"></div>
</div>
<!-- <button type="submit" class="search-submit btn btn-default">Search</button> -->
</form>
</div>
<div id="tabs">
<ul class="tabs nav navbar-nav">
{% include treebuilder.html %}
</ul>
</div>

</div>
</nav>
</header>
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</ul>
</div>
<div class="ctrl-right">
<a href="#menu-toggle" id="menu-toggle"><i class="fa fa-outdent" aria-hidden="true"></i></a>
<a href="javascript:void(0)" id="menu-toggle"><i class="fa fa-outdent" aria-hidden="true"></i></a>
<!-- varsion -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand Down
1 change: 0 additions & 1 deletion _includes/noindex.html

This file was deleted.

38 changes: 0 additions & 38 deletions _includes/side-menu-alt.html

This file was deleted.

128 changes: 1 addition & 127 deletions _includes/side-menu.html
Original file line number Diff line number Diff line change
@@ -1,132 +1,6 @@
<!-- <div class="toggle-mode">
<div class="icon">
<i class="fa fa-sun-o" aria-hidden="true"></i>
</div>
<div class="toggle-switch">
<label class="switch">
<input type="checkbox" id="switch-style">
<div class="slider round"></div>
</label>
</div>
<div class="icon">
<i class="fa fa-moon-o" aria-hidden="true"></i>
</div>
</div>
<div class="nav-sidebar navbar-collapse collapse">
<ul class="nav navbar-collapse" id="stacked-menu">
{% if page.tree == false %}
<li><a href="/">Back to the index</a></li>
{% else %} {{ leftnav }} {% endif %}
<li>
<a data-target="#item2" data-toggle="collapse" data-parent="#stacked-menu">Get Started<span class="caret arrow"></span></a>
<ul class="nav collapse" id="item2">
{% assign foundBranch="false" %}{% for item in tree %}{% if item.sectiontitle %}{% if foundBranch=="false" %}{% capture treeString %}{{ item.section | downcase }}{% endcapture %}{% capture pageURLString %}"{{ page.url }}"{% endcapture %}{% else %}{% assign
treeString="" %}{% endif %}
<li class="leaf {% if treeString contains pageURLString %}{% assign foundBranch=" true "%}menu-open{% else %}menu-closed{% endif %}"><a href="javascript:void(0)" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>{{ item.sectiontitle }}</a>
<ul class="nav-sub">{% assign tree = item.section %}{% include tree.html %}</ul>{% else %}
<li><a href="{{ item.path }}" class="{% if item.path == page.url and item.nosync != true %}active currentPage{% endif %}">{{ item.title }}</a></li>{% endif %}{% endfor %}
<li><a href="#">Learn Docker</a></li>
<li><a href="#">Docker Basics</a></li>
<li><a href="#">Define and deploy your app</a></li>
</ul>
</li>
<li><a href="#">Docker ID</a></li>
</ul>
</div> -->

<div class="toggle-mode">
<div class="icon">
<i class="fa fa-sun-o" aria-hidden="true"></i>
</div>
<div class="toggle-switch">
<label class="switch">
<input type="checkbox" id="switch-style">
<div class="slider round"></div>
</label>
</div>
<div class="icon">
<i class="fa fa-moon-o" aria-hidden="true"></i>
</div>
</div>
<div class="nav-sidebar navbar-collapse collapse">
<ul class="nav navbar-collapse" id="stacked-menu">
<li><a href="default">Welcome to the Docs</a></li>
<li>
<a data-target="#item1" data-toggle="collapse" data-parent="#stacked-menu" class="active">Get Docker<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item1">
<li><a href="#">Install Docker Engine</a></li>
<li><a href="#" class="active">Docker for Mac</a></li>
</ul>
</li>
<li>
<a data-target="#item2" data-toggle="collapse" data-parent="#stacked-menu">Get Started<span class="caret arrow"></span></a>
<ul class="nav collapse" id="item2">
<li><a href="#">Learn Docker</a></li>
<li><a href="#">Docker Basics</a></li>
<li><a href="#">Define and deploy your app</a></li>
</ul>
</li>
<li><a href="#">Docker ID</a></li>
<li><a href="#">Docker Engine</a></li>
<li><a data-target="#item3" data-toggle="collapse" data-parent="#stacked-menu">Docker for Windows<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item3">
<li><a href="docker-for-windows/">Getting Started</a></li>
<li><a href="docker-for-windows/troubleshoot/" class="">Logs and Troubleshooting</a></li>
<li><a href="docker-for-windows/faqs/">FAQs</a></li>
<li><a href="docker-for-windows/examples/">Example Applications</a></li>
<li><a href="docker-for-windows/opensource/">Open Source Licensing</a></li>
<li><a href="docker-for-windows/release-notes/">Release Notes</a></li>
</ul>
</li>
<li><a data-target="#item4" data-toggle="collapse" data-parent="#stacked-menu">Nav Item<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item4">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a data-target="#item5" data-toggle="collapse" data-parent="#stacked-menu">Nav Item<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item5">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a data-target="#item6" data-toggle="collapse" data-parent="#stacked-menu">Nav Item<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item6">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a data-target="#item7" data-toggle="collapse" data-parent="#stacked-menu">Nav Item<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item7">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a data-target="#item8" data-toggle="collapse" data-parent="#stacked-menu">Nav Item<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item8">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a data-target="#item9" data-toggle="collapse" data-parent="#stacked-menu">Nav Item<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item9">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a data-target="#item10" data-toggle="collapse" data-parent="#stacked-menu">Nav Item<span class="caret arrow"></span></a>
<ul class="nav collapse left-submenu" id="item10">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
{{ leftnav }}
</ul>
<!-- end sidebar nav -->
</div>
10 changes: 9 additions & 1 deletion _includes/tree.html
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
{% assign foundBranch="false" %}{% for item in tree %}{% if item.sectiontitle %}{% if foundBranch=="false" %}{% capture treeString %}{{ item.section | downcase }}{% endcapture %}{% capture pageURLString %}"{{ page.url }}"{% endcapture %}{% else %}{% assign treeString="" %}{% endif %}<li data-toggle="collapse" data-parent="#stacked-menu" {% if treeString contains pageURLString %}{% assign foundBranch="true"%}menu-open{% else %}menu-closed{% endif %}"><a href="javascript:void(0)" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>{{ item.sectiontitle }}</a><ul class="nav-sub">{% assign tree = item.section %}{% include tree.html %}</ul>{% else %}<li class="leaf"><a href="{{ item.path }}" class="{% if item.path == page.url and item.nosync != true %}active currentPage{% endif %}">{{ item.title }}</a></li>{% endif %}{% endfor %}
{% assign foundBranch="false" %}
{% for item in tree %}
{% if item.sectiontitle %}{% if foundBranch=="false" %}{% capture treeString %}{{ item.section | downcase }}{% endcapture %}{% capture pageURLString %}"{{ page.url }}"{% endcapture %}{% else %}{% assign treeString="" %}{% endif %}
<li><a data-target="#item{{ forloop.index }}" data-toggle="collapse" data-parent="#stacked-menu"{% if treeString contains pageURLString %}{% assign foundBranch="true"%} class="active" aria-expanded="true"{% else %} class="collapsed" aria-expanded="false"{% endif %}>{{ item.sectiontitle }}<span class="caret arrow"></span></a>
<ul class="nav collapse{% if foundBranch == "true" %} in{% endif %}" id="#item{{ forloop.index }}" aria-expanded="{% if foundBranch == "true" %}true{% else %}false{% endif %}">{% assign tree = item.section %}{% include tree.html %}</ul>
</li>
{% else %}
<li><a href="{{ item.path }}"{% if item.path == page.url and item.nosync != true %} class="active currentPage"{% endif %}>{{ item.title }}</a></li>
{% endif %}{% endfor %}
49 changes: 29 additions & 20 deletions _layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
{% if site.GH_ENV == "gh_pages" %}<meta name="robots" content="noindex">{% endif %}
<meta property="og:type" content="website">
<meta property="og:updated_time" content="{% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}">
<meta property="og:image" content="https://www.docker.com/sites/default/files/social/docker-facebook-share.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@docker_docs">
<meta name="twitter:url" content="https://twitter.com/docker_docs">
<meta name="twitter:title" content="{{ page.title }}">
<meta name="twitter:image:src" content="https://www.docker.com/sites/default/files/social/docker-twitter-share.png">
<meta property="article:published_time" content="{% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="{% if page.keywords %}{{ page.keywords }}{% else %}docker, docker open source, docker platform, distributed applications, microservices, containers, docker containers, docker software, docker virtualization{% endif %}">
Expand All @@ -72,10 +78,11 @@
{% seo %}
{% if page.hide_from_sitemap %}<meta name="robots" content="noindex" />{% endif %}
</head>
<body>
<header>
{% include header.html %}
</header>
<body class="html front not-logged-in no-sidebars page-node page-node- page-node-1 node-type-front-page path-docker ng-scope short retina-display all_loaded" ng-app="Docker" ng-controller="DockerController" style="">
<header>
{% if page.landing == true %}{% include global-header.html %}{% endif %}
{% include header.html %}
</header>

<div id="wrapper">
<main class="main" id="page-content-wrapper">
Expand Down Expand Up @@ -117,6 +124,7 @@ <h1>{{ page.title }}</h1>{% endif %} {% if page.advisory %}
</div>
{% endif %}
</section>

<script language="javascript">
var x = document.links.length;
var baseHref = document.getElementsByTagName('base')[0].href
Expand All @@ -142,17 +150,6 @@ <h1>{{ page.title }}</h1>{% endif %} {% if page.advisory %}
<div id="sidebar-wrapper">
<div class="toc-nav">
<section class="section" id="RightColumnSection">
<span class="title_section">
<div id="search-div">
<form class="search-form form-inline ng-pristine ng-valid" id="searchForm" action="/search/">
<input class="search-field form-control ds-input" id="st-search-input" value="" name="q" placeholder="Search the docs" type="search" autocomplete="off" spellcheck="false" dir="auto" style="position: relative; vertical-align: top;">
<div id="autocompleteContainer">
<div id="autocompleteResults"></div>
</div>
<button type="submit" class="search-submit btn btn-default">Search</button>
</form>
</div>
</span>
<div id="feedback-links">
<ul>
{% if edit_url != "" %}
Expand All @@ -162,6 +159,20 @@ <h1>{{ page.title }}</h1>{% endif %} {% if page.advisory %}
<li><a href="https://www.docker.com/docker-support-services">&#x0003F;&nbsp;Get support</a></li>
</ul>
</div>
<div class="toggle-mode">
<div class="icon">
<i class="fa fa-sun-o" aria-hidden="true"></i>
</div>
<div class="toggle-switch">
<label class="switch">
<input type="checkbox" id="switch-style">
<div class="slider round"></div>
</label>
</div>
<div class="icon">
<i class="fa fa-moon-o" aria-hidden="true"></i>
</div>
</div>
{% unless page.notoc %} {% assign my_min = page.toc_min | default: site.toc_min | default: 2 %} {% assign my_max = page.toc_max | default: site.toc_max | default: 3 %} {% assign my_name = page.url | default: "unnamed" %}
<div id="side-toc">
<div id="side-toc-title">On this page:</div>
Expand All @@ -186,12 +197,10 @@ <h1>{{ page.title }}</h1>{% endif %} {% if page.advisory %}
<script>
hljs.initHighlightingOnLoad();
</script>
<!-- <script src="/js/alljs.js"></script> -->
<!-- <script async="" src="/js/app.js"></script> -->
<script async="" src="/js/anchorlinks.js"></script>
<script async="" src="/js/jquery.js"></script>
<script async="" src="/js/menu.js"></script>
<script src="/js/jquery.js"></script>
<script async="" defer src="/js/menu.js"></script>
<script async="" src="/js/bootstrap.min.js"></script>
<script async="" src="/js/docs.js"></script>
<script async="" defer src="/js/docs.js"></script>
</body>
</html>
Loading

0 comments on commit f478f1b

Please sign in to comment.