-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2367 from codecrafters-io/highlight-language-guid…
…es-in-stage-2 CC-1480: Highlight language guides in stage 2 tutorial card
- Loading branch information
Showing
14 changed files
with
101 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 38 additions & 42 deletions
80
app/components/course-page/course-stage-step/simple-language-guide-card.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,41 @@ | ||
<div {{did-update this.loadLanguageGuides @courseStage}} {{did-insert this.loadLanguageGuides}}> | ||
{{#if this.languageGuide}} | ||
<CoursePage::InstructionsCard | ||
@contentIdentifier={{@courseStage.id}} | ||
@isCollapsedByDefault={{true}} | ||
@onExpand={{this.handleExpand}} | ||
id="language-guide-card" | ||
data-test-language-guide-card | ||
...attributes | ||
> | ||
<:header> | ||
<div class="flex items-center justify-between border-b dark:border-white/5 pb-2 mb-5 w-full"> | ||
<div class="flex items-center gap-x-3"> | ||
<h2 class="font-semibold text-lg text-gray-700 dark:text-gray-200 flex items-center"> | ||
{{@language.name}} Guide | ||
</h2> | ||
<CoursePage::InstructionsCard | ||
@contentIdentifier={{@languageGuide.id}} | ||
@isCollapsedByDefault={{true}} | ||
@onExpand={{this.handleExpand}} | ||
id="language-guide-card" | ||
data-test-language-guide-card | ||
...attributes | ||
> | ||
<:header> | ||
<div class="flex items-center justify-between border-b dark:border-white/5 pb-2 mb-5 w-full"> | ||
<div class="flex items-center gap-x-3"> | ||
<h2 class="font-semibold text-lg text-gray-700 dark:text-gray-200 flex items-center"> | ||
{{@languageGuide.language.name}} Guide | ||
</h2> | ||
|
||
<Pill @color="green" class="text-xs"> | ||
BETA | ||
<EmberTooltip @text="This is a beta feature, please send us feedback!" @side="top" /> | ||
</Pill> | ||
</div> | ||
<Pill @color="green" class="text-xs"> | ||
BETA | ||
<EmberTooltip @text="This is a beta feature, please send us feedback!" @side="top" /> | ||
</Pill> | ||
</div> | ||
|
||
<FeedbackButton | ||
@source="course_stage_language_guide" | ||
@sourceMetadata={{hash language_slug=@language.slug}} | ||
class="inline-flex" | ||
@dropdownPosition="right" | ||
data-test-feedback-button | ||
> | ||
<TertiaryButton @size="small"> | ||
Share Feedback | ||
</TertiaryButton> | ||
</FeedbackButton> | ||
</div> | ||
</:header> | ||
<FeedbackButton | ||
@source="course_stage_language_guide" | ||
@sourceMetadata={{hash language_slug=@languageGuide.language.slug}} | ||
class="inline-flex" | ||
@dropdownPosition="right" | ||
data-test-feedback-button | ||
> | ||
<TertiaryButton @size="small"> | ||
Share Feedback | ||
</TertiaryButton> | ||
</FeedbackButton> | ||
</div> | ||
</:header> | ||
|
||
<:content> | ||
<div class="prose dark:prose-invert has-prism-highlighting" {{highlight-code-blocks this.languageGuide.markdownForBeginner}}> | ||
{{markdown-to-html this.languageGuide.markdownForBeginner}} | ||
</div> | ||
</:content> | ||
</CoursePage::InstructionsCard> | ||
{{/if}} | ||
</div> | ||
<:content> | ||
<div class="prose dark:prose-invert has-prism-highlighting" {{highlight-code-blocks @languageGuide.markdownForBeginner}}> | ||
{{markdown-to-html @languageGuide.markdownForBeginner}} | ||
</div> | ||
</:content> | ||
</CoursePage::InstructionsCard> |
27 changes: 3 additions & 24 deletions
27
app/components/course-page/course-stage-step/simple-language-guide-card.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters