Skip to content

Commit

Permalink
Remove tutorials list from sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Aug 29, 2023
1 parent e7ddf3c commit c322353
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 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
4 changes: 2 additions & 2 deletions layouts/partials/sidebar-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,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 $withChild (not $treeRoot) ) }}
{{- 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 @@ -80,7 +80,7 @@
</a>
{{ end }}
{{- end }}
{{- if $withChild }}
{{- 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>
7 changes: 5 additions & 2 deletions static/js/tutorials.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,23 @@ search.addWidgets([
})(instantsearch.widgets.refinementList)({
container: '#languages-list',
attribute: 'languages',
sortBy: ['name:asc']
}),
instantsearch.widgets.panel({
templates: { header: 'Components' },
})(instantsearch.widgets.refinementList)({
container: '#components-list',
attribute: 'viamcomponents',
operator: 'and'
operator: 'and',
sortBy: ['name:asc']
}),
instantsearch.widgets.panel({
templates: { header: 'Services' },
})(instantsearch.widgets.refinementList)({
container: '#services-list',
attribute: 'viamservices',
operator: 'and'
operator: 'and',
sortBy: ['name:asc']
}),
instantsearch.widgets.panel({
templates: { header: 'Approximate cost' },
Expand Down

0 comments on commit c322353

Please sign in to comment.