Skip to content

Commit

Permalink
DOCS-3412: Show left nav for tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Jan 21, 2025
1 parent 8f3410b commit 7cab9fe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2856,6 +2856,15 @@ a.tree-root {

// Top level nav END

// For tutorials, make side nav heading smaller

li.active-path.tutorial-heading > a {
color: #0000EA;
margin-top: 1rem;
font-size: 0.833rem;
font-weight: 600;
}

// Next page START

#next-page {
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ title: "Tutorials"
linkTitle: "Tutorials"
weight: 300
type: docs
layout: "tutorials"
hide_children: true
layout: "empty"
canonical: "/dev/tools/tutorials/"
sitemap:
priority: 1.0
hidden: true
Expand Down
11 changes: 11 additions & 0 deletions layouts/partials/sidebar-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
{{ end }}
{{ if $s.Params.canonical }}<i class="fas fa-external-link-alt fa-sm"></i>{{ end }}
</a>
{{ else }}
<a href="/dev/tools/tutorials/" target="{{ . }}" rel="noopener" class="">
<span> Tutorials </span>
</a>
{{ end }}
{{- end }}
{{- if (or (and $withChild (not $treeRoot) ) (not $hideChildren) ) }}
Expand Down Expand Up @@ -105,6 +109,13 @@
{{- end }}
{{- if $withChild }}
{{- if $hideChildren -}}
{{ if eq $p.Section "tutorials" }}
<li class="active-path tutorial-heading">
<a href="" title="{{ $p.Title }}" class="active">{{ $p.LinkTitle }}
</a>
<div class="td-toc" id="TableOfContents"></div>
</li>
{{ end }}
{{- else -}}
{{- $ulNr := add $ulNr 1 }}
<ul class="ul-{{ $ulNr }}">
Expand Down

0 comments on commit 7cab9fe

Please sign in to comment.