Nav fixes

This commit is contained in:
Vincent Fiduccia
2018-04-30 12:09:56 -07:00
parent f350061195
commit 81cd32fa07
4 changed files with 28 additions and 16 deletions
+9 -9
View File
@@ -15,7 +15,7 @@ enableRobotsTXT = true
identifier = "what-is-rancher"
name = "What is Rancher"
weight = "1"
pre = "<i class='material-icons'>keyboard_arrow_down</i>"
pre = "<i class=\"material-icons\">keyboard_arrow_down</i>"
[[menu.main]]
name = "Overview"
@@ -77,7 +77,7 @@ pre = "<i class='material-icons'>keyboard_arrow_down</i>"
identifier = "products"
name = "Products"
weight = "2"
pre = "<i class='material-icons'>keyboard_arrow_down</i>"
pre = "<i class=\"material-icons\">keyboard_arrow_down</i>"
[[menu.main]]
name = "Rancher"
@@ -100,7 +100,7 @@ pre = "<i class='material-icons'>keyboard_arrow_down</i>"
identifier = "learn"
name = "Learn"
weight = "4"
pre = "<i class='material-icons'>keyboard_arrow_down</i>"
pre = "<i class=\"material-icons\">keyboard_arrow_down</i>"
[[menu.main]]
name = "Blog"
@@ -127,7 +127,7 @@ pre = "<i class='material-icons'>keyboard_arrow_down</i>"
name = "Forums"
url = "https://forums.rancher.com/"
parent = "learn"
pre = "<i class='material-icons'>launch</i>"
pre = "<i class=\"material-icons\">launch</i>"
[[menu.main]]
#name = "Learning Resources"
@@ -141,7 +141,7 @@ identifier = "about"
name = "About"
url = "/about/"
weight = "5"
pre = "<i class='material-icons'>keyboard_arrow_down</i>"
pre = "<i class=\"material-icons\">keyboard_arrow_down</i>"
[[menu.main]]
name = "About Us"
@@ -175,24 +175,24 @@ pre = "<i class='material-icons'>keyboard_arrow_down</i>"
#footer menu#
[[menu.footer]]
identifier = "about"
pre = "<i class='material-icons'>info_outline</i>"
pre = "<i class=\"material-icons\">info_outline</i>"
name = "About"
url = "/about/"
[[menu.footer]]
identifier = "contact"
pre = "<i class='material-icons'>chat_bubble_outline</i>"
pre = "<i class=\"material-icons\">chat_bubble_outline</i>"
name = "Contact"
url = "/contact/"
[[menu.footer]]
identifier = "privacy"
pre = "<i class='material-icons'>fingerprint</i>"
pre = "<i class=\"material-icons\">fingerprint</i>"
name = "Privacy"
url = "/privacy/"
[[menu.footer]]
identifier = "careers"
pre = "<i class='material-icons'>people_outline</i>"
pre = "<i class=\"material-icons\">people_outline</i>"
name = "Careers"
url = "/careers/"
+1 -1
View File
@@ -1,5 +1,5 @@
---
title: Upgrading RancherOS
title: Upgrading
weight: 3
---
+9 -3
View File
@@ -8,16 +8,22 @@
{{ define "main" }}
<div class="wrapper">
{{ partial "docs-nav.html" . }}
{{ $showSidebar := (gt (len ($.Scratch.Get "secondLevel").Sections) 0) }}
{{ $secondLevel := ($.Scratch.Get "secondLevel") }}
{{ $.Scratch.Set "showSidebar" false }}
{{ with $secondLevel }}
{{ if (gt (len .Sections) 0) }}
{{ $.Scratch.Set "showSidebar" true }}
{{end}}
{{end}}
<div class="row m-t-sm">
{{ if $showSidebar }}
{{ if ($.Scratch.Get "showSidebar") }}
<aside class="col-sm-3 col-xs-12">
{{ partial "docs-side-nav.html" . }}
</aside>
{{end}}
<article class="{{ if $showSidebar }} col-sm-6 {{else}} col-md-9 p-r-lg {{end}} col-xs-12">
<article class="{{ if ($.Scratch.Get "showSidebar") }} col-sm-6 {{else}} col-md-9 p-r-lg {{end}} col-xs-12">
<div class="main-content ">
+9 -3
View File
@@ -1,16 +1,21 @@
{{ $.Scratch.Set "topLevel" . }}
{{ $.Scratch.Set "secondLevel" . }}
{{ range .Site.Sections }}
{{if $.CurrentSection}}
{{ if .IsAncestor $.CurrentSection }}
{{ $.Scratch.Set "topLevel" . }}
{{end}}
{{end}}
{{end}}
<nav class="row middle-xs between-xs">
<div class="pull-left p-v-xs col-md-2s">
<ul class="dropdown sub-menu unstyled">
<li>
<a href="{{ .URL }}" class="btn bg-link p-a-0">
<a href="{{ ($.Scratch.Get "topLevel").Permalink }}" class="btn bg-link p-a-0">
<span class="p-h-xs">
{{ range .Site.Sections }}
{{if $.CurrentSection}}
{{ if .IsAncestor $.CurrentSection }}
{{ $.Scratch.Set "topLevel" . }}
{{ .Params.shortTitle }}
{{end}}
{{end}}
@@ -32,6 +37,7 @@
<!-- tabs -->
<ul class="tabs col-md-10">
{{ $topLevel := .Scratch.Get "topLevel"}}
<li class="{{if (eq .Permalink $topLevel.Permalink)}}active{{end}}"><a href="{{$topLevel.Permalink}}"><i class="material-icons" style="position: relative; top: -2px;">home</i></a></li>
{{ if $topLevel }}
{{ range $topLevel.Sections }}
{{ $isCurrent := .IsAncestor $.CurrentSection }}