2023-11-06 16:42:56 +00:00
|
|
|
<div class="adev-page-content" [class.adev-nav-open]="showNavigationDropdown()">
|
|
|
|
|
<ng-container *ngTemplateOutlet="tutorialNav" />
|
2025-05-26 23:12:36 +00:00
|
|
|
@if (shouldRenderContent()) {
|
|
|
|
|
<div #content class="docs-tutorial-content" [class.adev-nav-open]="showNavigationDropdown()">
|
2023-11-06 16:42:56 +00:00
|
|
|
<!-- Tutorial Nav: Current Tutorial Title and Nav Buttons -->
|
|
|
|
|
<ng-container *ngTemplateOutlet="tutorialNav" />
|
|
|
|
|
|
|
|
|
|
<!-- Tutorial Content -->
|
|
|
|
|
@if (documentContent(); as documentContent) {
|
2025-09-13 06:34:32 +00:00
|
|
|
<main
|
|
|
|
|
docsViewer
|
2025-05-26 23:12:36 +00:00
|
|
|
[docContent]="documentContent"
|
2025-09-13 06:34:32 +00:00
|
|
|
class="docs-viewer docs-viewer-scroll-margin-large"
|
|
|
|
|
></main>
|
2023-11-06 16:42:56 +00:00
|
|
|
}
|
2025-05-26 23:12:36 +00:00
|
|
|
</div>
|
|
|
|
|
}
|
2023-11-06 16:42:56 +00:00
|
|
|
|
|
|
|
|
<!-- Split View Resizer -->
|
|
|
|
|
<button
|
2025-09-13 06:34:32 +00:00
|
|
|
type="button"
|
2023-11-06 16:42:56 +00:00
|
|
|
role="separator"
|
|
|
|
|
#resizer
|
|
|
|
|
class="adev-tutorial-resizer"
|
|
|
|
|
[class.adev-tutorial-resizer-hidden]="!shouldRenderEmbeddedEditor() || !shouldRenderContent()"
|
|
|
|
|
></button>
|
|
|
|
|
|
|
|
|
|
<!-- Embedded Editor -->
|
|
|
|
|
@if (shouldRenderEmbeddedEditor()) {
|
2025-05-26 23:12:36 +00:00
|
|
|
<div #editor class="docs-tutorial-editor" [class.adev-split-tutorial]="shouldRenderContent()">
|
2023-11-06 16:42:56 +00:00
|
|
|
@if (embeddedEditorComponent) {
|
2025-05-26 23:12:36 +00:00
|
|
|
<ng-container
|
|
|
|
|
*ngComponentOutlet="embeddedEditorComponent; inputs:{restrictedMode:restrictedMode()}"
|
|
|
|
|
/>
|
2023-11-06 16:42:56 +00:00
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Tutorial Nav Template -->
|
|
|
|
|
<ng-template #tutorialNav>
|
|
|
|
|
<div class="adev-tutorial-nav-container">
|
|
|
|
|
<div class="adev-tutorial-nav" [class.adev-nav-open]="showNavigationDropdown()">
|
|
|
|
|
<!-- Toggle Nav Button -->
|
2025-09-13 06:34:32 +00:00
|
|
|
<button type="button" class="adev-unfold-button" (click)="toggleNavigationDropdown($event)">
|
2023-11-06 16:42:56 +00:00
|
|
|
<docs-icon>unfold_more</docs-icon>
|
|
|
|
|
<div class="adev-current-tutorial">
|
|
|
|
|
<span>{{ tutorialName() }}</span>
|
|
|
|
|
<span>{{ stepName() }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<!-- Reveal Answer Button -->
|
|
|
|
|
@if (shouldRenderRevealAnswer()) {
|
|
|
|
|
<button
|
2025-09-13 06:34:32 +00:00
|
|
|
type="button"
|
2023-11-06 16:42:56 +00:00
|
|
|
#revealAnswerButton
|
|
|
|
|
(click)="answerRevealed() ? handleResetAnswer() : handleRevealAnswer()"
|
|
|
|
|
[disabled]="!canRevealAnswer()"
|
2024-01-31 17:02:46 +00:00
|
|
|
class="docs-reveal-answer-button adev-reveal-desktop-button docs-primary-btn"
|
2023-11-06 16:42:56 +00:00
|
|
|
[attr.text]="answerRevealed() ? 'Reset' : 'Reveal Answer'"
|
|
|
|
|
[attr.aria-label]="answerRevealed() ? 'Reset' : 'Reveal Answer'"
|
|
|
|
|
[class.adev-reset-answer-button]="answerRevealed()"
|
|
|
|
|
>
|
|
|
|
|
{{ answerRevealed() ? 'Reset' : 'Reveal Answer' }}
|
|
|
|
|
</button>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<!-- Download code -->
|
|
|
|
|
@if (localTutorialZipUrl()) {
|
2025-05-26 23:12:36 +00:00
|
|
|
<a [download]="stepName() + '.zip'" [href]="localTutorialZipUrl()">
|
2025-09-13 06:34:32 +00:00
|
|
|
<button type="button" class="adev-download-button docs-primary-btn">
|
2023-11-06 16:42:56 +00:00
|
|
|
<docs-icon>download</docs-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div class="adev-nav-arrows">
|
|
|
|
|
@if (previousStepPath) {
|
|
|
|
|
<a [routerLink]="previousStepPath">
|
2025-09-13 06:34:32 +00:00
|
|
|
<button type="button" class="docs-primary-btn">
|
2023-11-06 16:42:56 +00:00
|
|
|
<docs-icon>chevron_left</docs-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
}
|
|
|
|
|
@if (!previousStepPath) {
|
2025-09-13 06:34:32 +00:00
|
|
|
<button type="button" class="docs-primary-btn" disabled>
|
2023-11-06 16:42:56 +00:00
|
|
|
<docs-icon>chevron_left</docs-icon>
|
|
|
|
|
</button>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (nextStepPath) {
|
|
|
|
|
<a [routerLink]="nextStepPath">
|
2025-09-13 06:34:32 +00:00
|
|
|
<button type="button" class="docs-primary-btn">
|
2023-11-06 16:42:56 +00:00
|
|
|
<docs-icon>chevron_right</docs-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
}
|
|
|
|
|
@if (!nextStepPath) {
|
2025-09-13 06:34:32 +00:00
|
|
|
<button type="button" class="docs-primary-btn" disabled>
|
2023-11-06 16:42:56 +00:00
|
|
|
<docs-icon>chevron_right</docs-icon>
|
|
|
|
|
</button>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Reveal Answer Button: for smaller container -->
|
|
|
|
|
<div class="adev-reveal-mobile-button-container">
|
|
|
|
|
@if (shouldRenderRevealAnswer()) {
|
|
|
|
|
<button
|
2025-09-13 06:34:32 +00:00
|
|
|
type="button"
|
2023-11-06 16:42:56 +00:00
|
|
|
#revealAnswerButton
|
|
|
|
|
(click)="answerRevealed() ? handleResetAnswer() : handleRevealAnswer()"
|
|
|
|
|
[disabled]="!canRevealAnswer()"
|
2024-01-31 17:02:46 +00:00
|
|
|
class="docs-reveal-answer-button adev-reveal-mobile-button docs-primary-btn"
|
2023-11-06 16:42:56 +00:00
|
|
|
[attr.text]="answerRevealed() ? 'Reset' : 'Reveal Answer'"
|
|
|
|
|
[attr.aria-label]="answerRevealed() ? 'Reset' : 'Reveal Answer'"
|
|
|
|
|
[class.adev-reset-answer-button]="answerRevealed()"
|
|
|
|
|
>
|
|
|
|
|
{{ answerRevealed() ? 'Reset' : 'Reveal Answer' }}
|
|
|
|
|
</button>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Tutorial Nav: List -->
|
|
|
|
|
@if (showNavigationDropdown()) {
|
2025-05-26 23:12:36 +00:00
|
|
|
<div class="adev-tutorial-nav-list-dropdown" (docsClickOutside)="hideNavigationDropdown()">
|
2023-11-06 16:42:56 +00:00
|
|
|
<docs-navigation-list
|
|
|
|
|
[isDropdownView]="true"
|
|
|
|
|
[navigationItems]="tutorialNavigationItems()"
|
|
|
|
|
class="adev-nav-list"
|
|
|
|
|
/>
|
|
|
|
|
@if (nextTutorialPath()) {
|
|
|
|
|
<a [routerLink]="'/' + nextTutorialPath()">Next Tutorial</a>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</ng-template>
|