-
Notifications
You must be signed in to change notification settings - Fork 28
feat(ui): force-enable dark mode and add blurred gradients #3289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rohitpaulk
wants to merge
7
commits into
main
Choose a base branch
from
force-enable-dark-mode-gradients
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2273095
feat(ui): force-enable dark mode and add blurred gradients
rohitpaulk 781a2d4
feat(ui): add blurred gradient backgrounds to course and track pages
rohitpaulk b69ffac
feat(course-card): improve layout and fix lock icon opacity
rohitpaulk e2fdad4
feat(course-card): add conditional styling for locked courses
rohitpaulk 3cb18cf
fix(course-card): ensure card content grows to fill space
rohitpaulk e0f2c3b
style(course-card): add hover effect for locked courses
rohitpaulk d494afe
fix(ui): improve dark mode styling of track cards
rohitpaulk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,99 +1,102 @@ | ||
| <LinkTo | ||
| class="group bg-white dark:bg-gray-925 p-5 rounded-md shadow-sm hover:shadow-md transition-shadow cursor-pointer flex flex-col justify-between border border-gray-200 dark:border-white/5 relative | ||
| {{if this.shouldShowLockIcon 'opacity-50 hover:opacity-100'}}" | ||
| class="flex flex-col justify-stretch group bg-white | ||
| {{if this.shouldShowLockIcon 'dark:bg-gray-950/70 hover:dark:bg-gray-925/70' 'dark:bg-gray-925/70'}} | ||
| p-5 rounded-md shadow-sm hover:shadow-md transition-shadow cursor-pointer border border-gray-200 dark:border-white/5 relative" | ||
| @route={{this.linkToRoute.name}} | ||
| @model={{this.linkToRoute.model}} | ||
| @query={{this.linkToRoute.query}} | ||
| data-test-course-card={{not this.isSkeleton}} | ||
| > | ||
| {{! Logo }} | ||
| <div class="w-8 transform scale-100 group-hover:scale-105 shrink-0 transition-transform absolute top-5 right-5"> | ||
| {{#if this.isSkeleton}} | ||
| <div class="bg-gray-100 dark:bg-gray-900 w-8 h-8 rounded-full" /> | ||
| {{else}} | ||
| <CourseLogo @course={{this.course}} /> | ||
| {{/if}} | ||
| </div> | ||
|
|
||
| {{! Text }} | ||
| <div class="mb-6"> | ||
| <div class="flex items-center mb-3 flex-wrap gap-y-2 pr-10"> | ||
| <div class="text-lg font-semibold text-gray-900 dark:text-gray-200 mr-2" data-test-course-name> | ||
| {{#if this.isSkeleton}} | ||
| <span class="inline-block bg-gray-100 dark:bg-gray-900 rounded-sm">{{#each (repeat 30)}} {{/each}}</span> | ||
| {{else}} | ||
| <span>{{this.course.name}}</span> | ||
| {{/if}} | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="text-sm leading-relaxed text-gray-600 dark:text-gray-400 pr-10" data-test-course-description> | ||
| <div class="flex flex-col grow justify-between {{if this.shouldShowLockIcon 'opacity-50 group-hover:opacity-100'}}"> | ||
| {{! Logo }} | ||
| <div class="w-8 transform scale-100 group-hover:scale-105 shrink-0 transition-transform absolute top-5 right-5"> | ||
| {{#if this.isSkeleton}} | ||
| <div> | ||
| <div class="relative inline-block w-full">{{#each (repeat 15)}} {{/each}} | ||
| <div class="absolute left-0 right-0 top-[2px] bottom-[2px] bg-gray-100 dark:bg-gray-900 rounded-sm"></div> | ||
| </div> | ||
| <div class="relative inline-block w-full">{{#each (repeat 15)}} {{/each}} | ||
| <div class="absolute left-0 right-0 top-[2px] bottom-[2px] bg-gray-100 dark:bg-gray-900 rounded-sm"></div> | ||
| </div> | ||
| </div> | ||
| <div class="bg-gray-100 dark:bg-gray-900 w-8 h-8 rounded-full" /> | ||
| {{else}} | ||
| <span>{{this.course.shortDescription}}</span> | ||
| <CourseLogo @course={{this.course}} /> | ||
| {{/if}} | ||
| </div> | ||
| </div> | ||
|
|
||
| {{! Footer }} | ||
| <div class="flex items-center justify-between"> | ||
| <div class="flex items-center gap-3"> | ||
| {{#if this.isSkeleton}} | ||
| <div class="bg-gray-100 dark:bg-gray-900 rounded-sm h-4 w-24"></div> | ||
| {{else}} | ||
| {{#if this.lastUsedRepository}} | ||
| <CourseCard::ProgressBar @course={{this.course}} @lastUsedRepository={{this.lastUsedRepository}} class="shrink-0" /> | ||
| {{else}} | ||
| {{#if this.course.releaseStatusIsAlpha}} | ||
| <div | ||
| class="text-xs text-gray-400 dark:text-gray-600 font-semibold border border-gray-300 dark:border-gray-700 rounded-sm px-1 py-0.25 mr-3" | ||
| data-test-course-alpha-label | ||
| > | ||
| ALPHA | ||
| </div> | ||
| {{else if this.course.releaseStatusIsBeta}} | ||
| <BetaCourseLabel class="mr-3" /> | ||
| {{else if (and this.course.isFree (not this.currentUser.canAccessMembershipBenefits))}} | ||
| <FreeCourseLabel @course={{this.course}} /> | ||
| {{! Text }} | ||
| <div class="mb-6"> | ||
| <div class="flex items-center mb-3 flex-wrap gap-y-2 pr-10"> | ||
| <div class="text-lg font-semibold text-gray-900 dark:text-gray-200 mr-2" data-test-course-name> | ||
| {{#if this.isSkeleton}} | ||
| <span class="inline-block bg-gray-100 dark:bg-gray-900 rounded-sm">{{#each (repeat 30)}} {{/each}}</span> | ||
| {{else}} | ||
| <div class="flex items-center"> | ||
| {{svg-jar "academic-cap" class="w-4 mr-1 fill-current text-gray-400 dark:text-gray-600"}} | ||
| <span class="text-xs text-gray-500">{{this.course.stages.length}} stages</span> | ||
| </div> | ||
| <span>{{this.course.name}}</span> | ||
| {{/if}} | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="text-sm leading-relaxed text-gray-600 dark:text-gray-400 pr-10" data-test-course-description> | ||
| {{#if this.isSkeleton}} | ||
| <div> | ||
| <div class="relative inline-block w-full">{{#each (repeat 15)}} {{/each}} | ||
| <div class="absolute left-0 right-0 top-[2px] bottom-[2px] bg-gray-100 dark:bg-gray-900 rounded-sm"></div> | ||
| </div> | ||
| <div class="relative inline-block w-full">{{#each (repeat 15)}} {{/each}} | ||
| <div class="absolute left-0 right-0 top-[2px] bottom-[2px] bg-gray-100 dark:bg-gray-900 rounded-sm"></div> | ||
| </div> | ||
| </div> | ||
| {{else}} | ||
| <span>{{this.course.shortDescription}}</span> | ||
| {{/if}} | ||
| {{/if}} | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="flex items-center"> | ||
| {{#if this.shouldShowLockIcon}} | ||
| <div class="flex items-center justify-center" data-test-lock-icon> | ||
| {{svg-jar "lock-closed" class="w-4 mr-1 fill-current text-gray-400 dark:text-gray-600"}} | ||
| </div> | ||
| {{else}} | ||
| <span class="font-bold text-teal-500 text-xs mr-2 opacity-0 group-hover:opacity-100 transition-opacity" data-test-action-text> | ||
| {{#if this.lastUsedRepository.allStagesAreComplete}} | ||
| Start Again | ||
| {{else if this.lastUsedRepository}} | ||
| Resume | ||
| {{! Footer }} | ||
| <div class="flex items-center justify-between"> | ||
| <div class="flex items-center gap-3"> | ||
| {{#if this.isSkeleton}} | ||
| <div class="bg-gray-100 dark:bg-gray-900 rounded-sm h-4 w-24"></div> | ||
| {{else}} | ||
| {{#if this.lastUsedRepository}} | ||
| <CourseCard::ProgressBar @course={{this.course}} @lastUsedRepository={{this.lastUsedRepository}} class="shrink-0" /> | ||
| {{else}} | ||
| Start | ||
| {{#if this.course.releaseStatusIsAlpha}} | ||
| <div | ||
| class="text-xs text-gray-400 dark:text-gray-600 font-semibold border border-gray-300 dark:border-gray-700 rounded-sm px-1 py-0.25 mr-3" | ||
| data-test-course-alpha-label | ||
| > | ||
| ALPHA | ||
| </div> | ||
| {{else if this.course.releaseStatusIsBeta}} | ||
| <BetaCourseLabel class="mr-3" /> | ||
| {{else if (and this.course.isFree (not this.currentUser.canAccessMembershipBenefits))}} | ||
| <FreeCourseLabel @course={{this.course}} /> | ||
| {{else}} | ||
| <div class="flex items-center"> | ||
| {{svg-jar "academic-cap" class="w-4 mr-1 fill-current text-gray-400 dark:text-gray-600"}} | ||
| <span class="text-xs text-gray-500">{{this.course.stages.length}} stages</span> | ||
| </div> | ||
| {{/if}} | ||
| {{/if}} | ||
| </span> | ||
| {{/if}} | ||
| </div> | ||
|
|
||
| {{svg-jar | ||
| "arrow-right" | ||
| class="w-4 fill-current text-gray-300 dark:text-gray-700 group-hover:text-teal-500 dark:group-hover:text-teal-500 transition-colors" | ||
| }} | ||
| {{/if}} | ||
| <div class="flex items-center"> | ||
| {{#if this.shouldShowLockIcon}} | ||
| <div class="flex items-center justify-center" data-test-lock-icon> | ||
| {{svg-jar "lock-closed" class="w-4 mr-1 fill-current text-gray-400 dark:text-gray-600"}} | ||
| </div> | ||
| {{else}} | ||
| <span class="font-bold text-teal-500 text-xs mr-2 opacity-0 group-hover:opacity-100 transition-opacity" data-test-action-text> | ||
| {{#if this.lastUsedRepository.allStagesAreComplete}} | ||
| Start Again | ||
| {{else if this.lastUsedRepository}} | ||
| Resume | ||
| {{else}} | ||
| Start | ||
| {{/if}} | ||
| </span> | ||
|
|
||
| {{svg-jar | ||
| "arrow-right" | ||
| class="w-4 fill-current text-gray-300 dark:text-gray-700 group-hover:text-teal-500 dark:group-hover:text-teal-500 transition-colors" | ||
| }} | ||
| {{/if}} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </LinkTo> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Dark mode forced on light-only routes
The
isEnabledgetter now hardcodestrue, forcing dark mode on all routes including those that only support light mode. Routes withRouteColorScheme.Light(the default) will display dark mode styling even though they may lack proper dark mode support. The commented-out original logic suggests this is temporary development code that was accidentally committed.