2020-09-19 11:28:47 -07:00
|
|
|
{{ $currentTopic := .topic }}
|
|
|
|
{{ $topics := sort .module.CurrentSection.Pages ".Params.index" }}
|
|
|
|
|
|
|
|
{{ if eq .mode "sidebar" }}
|
2021-07-29 08:59:09 -07:00
|
|
|
<aside class="toc px-4">
|
2021-11-08 16:04:20 -06:00
|
|
|
<h5 class="mb-8 mt-2">Tutorials</h5>
|
2020-09-19 11:28:47 -07:00
|
|
|
<ul class="p-0">
|
|
|
|
{{ range $index, $topic := $topics }}
|
2022-06-01 10:58:20 -07:00
|
|
|
<li
|
|
|
|
class="flex items-center list-none border-gray-200
|
|
|
|
{{ if eq $currentTopic . }}font-bold{{ end }}
|
|
|
|
{{ if lt (add $index 1) (len $topics) }}pb-4 mb-4 border-b border-gray-100{{ end }}
|
|
|
|
"
|
|
|
|
>
|
2020-09-19 11:28:47 -07:00
|
|
|
<span class="w-full">
|
|
|
|
<a href="{{ .RelPermalink }}">{{ $topic.Title }}</a>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</aside>
|
|
|
|
{{ else }}
|
|
|
|
<ul class="p-0 border-4 border-gray-100 rounded">
|
|
|
|
{{ range $index, $topic := $topics }}
|
2022-06-01 10:58:20 -07:00
|
|
|
<li
|
|
|
|
class="flex items-center list-none py-3 px-4 border-gray-200
|
|
|
|
{{ if eq $currentTopic . }}font-bold{{ end }}
|
|
|
|
{{ if lt (add $index 1) (len $topics) }}border-b{{ end }}
|
|
|
|
"
|
|
|
|
>
|
2020-09-19 11:28:47 -07:00
|
|
|
<span class="w-full">
|
|
|
|
<a href="{{ .RelPermalink }}">{{ $topic.Title }}</a>
|
|
|
|
</span>
|
2021-05-27 15:46:18 -07:00
|
|
|
<span class="text-sm text-gray-600 whitespace-nowrap mx-12">
|
2020-09-19 11:28:47 -07:00
|
|
|
<i class="fas fa-stopwatch text-center w-6 text-gray-500"></i>
|
|
|
|
{{ $topic.Params.estimated_time }} minutes
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<a href="{{ .RelPermalink }}">
|
|
|
|
<i class="fas fa-chevron-circle-right text-blue-600 p-2"></i>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|