Skip to content

Commit

Permalink
Update sidebar-tree.html
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Aug 29, 2023
1 parent 28a70c1 commit b53c69c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
17 changes: 12 additions & 5 deletions layouts/docs/tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,18 @@ <h4 class="alert-heading">Javascript</h4>
</div>
<div class="card-container">
<div class="row-no-margin">
{{ range first 20 (where .Site.Pages "Section" "tutorials") }}
{{ range .Pages }}
{{ partial "tutorialcard-no-js.html" (dict "link" (.RelPermalink)) }}
{{ end }}
{{ end }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/get-started/blink-an-led/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/get-started/try-viam-sdk/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/get-started/servo-mousemover/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/get-started/confetti-bot/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/get-started/lazy-susan/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/configure/build-a-mock-robot/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/services/accessing-and-moving-robot-arm/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/services/plan-motion-with-arm-gripper/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/services/constrain-motion/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/services/color-detection-scuttle/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/services/webcam-line-follower-robot/") }}
{{ partial "tutorialcard-no-js.html" (dict "link" "/tutorials/services/data-management-tutorial/") }}
</div>
</div>
</noscript>
Expand Down
5 changes: 2 additions & 3 deletions layouts/partials/sidebar-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
{{ $manualLink := cond (isset $s.Params "manuallink") $s.Params.manualLink ( cond (isset $s.Params "manuallinkrelref") (relref $s $s.Params.manualLinkRelref) $s.RelPermalink) -}}
{{ $manualLinkTitle := cond (isset $s.Params "manuallinktitle") $s.Params.manualLinkTitle $s.Title -}}
{{ $empty_node := $s.Params.empty_node -}}

<li class="{{ if $withChild }}nav-fold{{ end }}{{ if $activePath }} active-path{{ end }}{{ if (not (or $show $p.Site.Params.ui.sidebar_menu_foldable )) }} collapse{{ end }} {{ if $empty_node }}empty-node-submenu{{ end }}" >
{{ if (and $p.Site.Params.ui.sidebar_menu_foldable (ge $ulNr 1)) -}}
<input type="checkbox" id="{{ $mid }}-check"{{ if $activePath}} checked{{ end }}/>
Expand All @@ -67,7 +66,7 @@
<a href="{{ $manualLink }}"{{ if ne $s.LinkTitle $manualLinkTitle }} title="{{ $manualLinkTitle }}"{{ end }}{{ with $s.Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }} class="{{ if $active}} active{{ end }}{{ if $treeRoot }} tree-root{{ end }}">{{ $s.LinkTitle }}
</a>
{{- end }}
{{- if (and (and $withChild (not $treeRoot) (ne $s.Permalink "/tutorials/" ) ) ) }}
{{- if (and (and $withChild (not $treeRoot) (ne .section.File.Path "tutorials/_index.md" ) ) ) }}
<span class="menu-toggle">
{{ if (or $activePath $active) }}
<i class="fas fa-chevron-down lozad"></i>
Expand All @@ -81,7 +80,7 @@
</a>
{{ end }}
{{- end }}
{{- if (and $withChild (ne $s.Permalink "/tutorials/" ) ) }}
{{- if (and $withChild (ne .section.File.Path "tutorials/_index.md" ) ) }}
{{- $ulNr := add $ulNr 1 }}
<ul class="ul-{{ $ulNr }}">
{{ range $pages -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/tutorialcard-no-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
</a>
{{ end }}
{{ else }}
{{ warnf "Tutorial card has a bad link: %s" $link }}
{{ warnf "?Tutorial card has a bad link: %s" $link }}
{{ end }}
</div>

0 comments on commit b53c69c

Please sign in to comment.