Skip to content

Commit

Permalink
Fix pre and next
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Dec 6, 2024
1 parent 8d76d22 commit 7c77e83
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
6 changes: 5 additions & 1 deletion assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,11 @@ a.tree-root {
clear: both;
}

#next-page > div.left-only {
#next-page > div {
flex-direction: row;
}

#next-page > div.right-only {
flex-direction: row-reverse;
}

Expand Down
2 changes: 2 additions & 0 deletions docs/manage/fleet/provision/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ images: ["/platform/provisioning-demo.gif"]
videos: ["/platform/provisioning-demo.webm", "/platform/provisioning-demo.mp4"]
tags: ["fleet management", "viam-server", "viam-agent"]
# SMEs: James, Ale
prev: "/manage/fleet/setup/"
next: "/manage/fleet/provision/provision-setup"
aliases:
- "/build/provision/"
- "/fleet/provision/"
Expand Down
1 change: 1 addition & 0 deletions docs/manage/fleet/provision/provision-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ viamresources: []
platformarea: ["fleet"]
level: "Intermediate"
date: "2024-08-21"
prev: "/manage/fleet/provision/"
# updated: "" # When the tutorial was last entirely checked
cost: "0"
---
Expand Down
25 changes: 17 additions & 8 deletions layouts/docs/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,28 @@ <h4 class="alert-heading">DRAFT</h4>
<hr>
{{ $pages := .CurrentSection.Pages.ByWeight }}
<!-- These are swapped in order -->
{{ if ($pages.Next .) }}
{{ if ($pages.Next . ) }}
<div class="row-no-margin">
{{ else }}
<div class="row-no-margin left-only">
<div class="row-no-margin {{ if not .Params.prev }}right-only{{ end }}">
{{ end }}
{{ with $pages.Next . }}
{{ if not .Params.toc_hide }}
{{ partial "nextcard.html" (dict "link" (.Page.File.Path) "class" "left" "customCanonicalLink" (.Page.Params.canonical) ) }}
{{ if .Params.prev }}
{{ partial "nextcard.html" (dict "link" (.Params.prev) "class" "left" "customCanonicalLink" (.Page.Params.canonical) ) }}
{{ else }}
{{ with $pages.Next . }}
{{ if not .Params.toc_hide }}
{{ partial "nextcard.html" (dict "link" (.Page.File.Path) "class" "left" "customCanonicalLink" (.Page.Params.canonical) ) }}
{{ end }}
{{ end }}
{{ end }}
{{ with $pages.Prev . }}
{{ if not .Params.toc_hide }}
{{ partial "nextcard.html" (dict "link" (.Page.File.Path) "class" "right" "customCanonicalLink" (.Page.Params.canonical) ) }}

{{ if .Params.next }}
{{ partial "nextcard.html" (dict "link" (.Params.next) "class" "right" "customCanonicalLink" (.Page.Params.canonical) ) }}
{{ else }}
{{ with $pages.Prev . }}
{{ if not .Params.toc_hide }}
{{ partial "nextcard.html" (dict "link" (.Page.File.Path) "class" "right" "customCanonicalLink" (.Page.Params.canonical) ) }}
{{ end }}
{{ end }}
{{ end }}
</div>
Expand Down

0 comments on commit 7c77e83

Please sign in to comment.