Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Fix left navigation not showing #100

Merged
merged 2 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions _data/nav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
docs:

- title: Go database/sql tutorial
url: index.html

- title: Overview
url: overview.html

- title: Importing a Database Driver
url: importing.html

- title: Accessing the Database
url: accessing.html

- title: Retrieving Result Sets
url: retrieving.html

- title: Modifying Data and Using Transactions
url: modifying.html

- title: Using Prepared Statements
url: prepared.html

- title: Handling Errors
url: errors.html

- title: Working with NULLs
url: nulls.html

- title: Working with Unknown Columns
url: varcols.html

- title: The Connection Pool
url: connection-pool.html

- title: Surprises, Antipatterns and Limitations
url: surprises.html

- title: Related Reading and Resources
url: references.html
24 changes: 6 additions & 18 deletions _includes/leftnav.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
<div class="leftnav">
<ul class="nav nav-list">
{% for group in page.nav %}
{% capture group_url %}/{{ page.name }}/{{ group.url }}{% endcapture %}
<li class="nav-header{% if page.url == node_url %} active{% endif %}">
{% if page.url %}
<a href="{{group.url}}">{{group.name}}</a>
{% else %}
{{group.name}}
{% endif %}
</li>
{% for node in group.articles %}
{% capture node_url %}/{{ page.name }}/{{ node.url }}{% endcapture %}
{% if page.url == node_url %}
<li class="active"><a href="{{node.url}}">{{node.title}}</a></li>
{% else %}
<li><a href="{{node.url}}">{{node.title}}</a></li>
{% endif %}
{% endfor %}
{% endfor %}
{% for doc in site.data.nav.docs %}
{% assign curr_url = page.url | remove_first: "/" %}
<li class="{% if doc.url == 'index.html' %}nav-header{% endif %} {% if curr_url == doc.url %}active{% endif %}">
<a href="{{ doc.url }}">{{ doc.title }}</a>
</li>
{% endfor %}
</ul>
<hr />
<div class="license">
Expand Down