-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathmain-section.hbs
39 lines (36 loc) · 1.66 KB
/
main-section.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<div data-test-course-page-header ...attributes>
<CoursePage::Header::NavigationControls
@course={{@course}}
@stepList={{@stepList}}
@currentStep={{@currentStep}}
@activeStep={{@activeStep}}
@nextStep={{@nextStep}}
@onMobileSidebarButtonClick={{@onMobileSidebarButtonClick}}
/>
<div class="mt-6">
<div class="flex flex-col items-start">
<div class="flex items-center flex-wrap gap-x-3">
<div class="text-lg sm:text-xl md:text-2xl">
{{#if (eq @currentStep.type "CourseStageStep")}}
{{! @glint-expect-error not typesafe }}
<span class="font-bold text-gray-700" data-test-step-name>{{@currentStep.courseStage.name}}</span>
<span class="font-mono text-base sm:text-lg md:text-xl">
{{! @glint-expect-error not typesafe }}
<span class="text-gray-300">#</span><span class="font-mono text-gray-400 uppercase">{{@currentStep.courseStage.slug}}</span>
</span>
{{else}}
<span class="font-bold text-gray-700" data-test-step-name>{{@currentStep.title}}</span>
{{/if}}
</div>
<div class="flex items-center md:h-[2rem] h-[1.75rem] flex-shrink-0">
<CoursePage::StepStatusPill @step={{@currentStep}} />
</div>
</div>
{{! For complete steps, we have the "You've completed this step" banner" }}
{{! For in-progress steps, users shouldn't be focused on this area anyway }}
{{#if (not (or (eq @currentStep.status "complete") (eq @currentStep.status "in_progress")))}}
<CoursePage::StepProgressIndicator @step={{@currentStep}} class="mt-2 ml-0.5" />
{{/if}}
</div>
</div>
</div>