mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-03 01:48:32 +02:00
Fix course next button + menu upd (#1959)
* fix the next button in the course * removing course name dependency * rename the next button * articles -> learn in the docs menu
This commit is contained in:
@@ -20,13 +20,23 @@
|
||||
<div class="d-flex justify-content-lg-end pb-3 pt-4">
|
||||
{{ $currentWeight := .Params.weight }}
|
||||
{{ $targetWeight := add $currentWeight 1 }}
|
||||
{{ $subject := site.GetPage "course" }}
|
||||
|
||||
{{ $subject := "" }}
|
||||
{{ if eq .Params.isLesson true }}
|
||||
{{/* Current page is a lesson (_index.md), parent is the course section */}}
|
||||
{{ $subject = .Parent }}
|
||||
{{ else }}
|
||||
{{/* Current page is inside a lesson, grandparent is the course section */}}
|
||||
{{ $subject = .Parent.Parent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $allLessons := where $subject.Pages ".Params.isLesson" true }}
|
||||
|
||||
{{ $allVideos := slice }}
|
||||
{{ range $lesson := $allLessons }}
|
||||
{{ $allVideos = $allVideos | append $lesson.RegularPages }}
|
||||
{{ range $video := $lesson.RegularPages }}
|
||||
{{ $allVideos = $allVideos | append $video }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $allPages := $allLessons }}
|
||||
|
||||
Reference in New Issue
Block a user