Skip to content

Commit 2273095

Browse files
committed
feat(ui): force-enable dark mode and add blurred gradients
Always enable dark mode by overriding isEnabled to true in the dark-mode service to simplify theming during development. Add three layered, animated blurred gradient backgrounds to the catalog page for enhanced visual appeal. The gradients use overlapping colored circles with spin animations and blur effects for a dynamic look.
1 parent cbc9038 commit 2273095

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

app/components/course-card/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<LinkTo
2-
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
2+
class="group bg-white dark:bg-gray-925/70 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
33
{{if this.shouldShowLockIcon 'opacity-50 hover:opacity-100'}}"
44
@route={{this.linkToRoute.name}}
55
@model={{this.linkToRoute.model}}

app/services/dark-mode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ export default class DarkModeService extends Service {
115115
* "dark route", or derived from localStorage & system preference
116116
*/
117117
get isEnabled(): boolean {
118-
return this.currentRouteSupportsDarkMode && (this.#currentRouteRequiresDarkMode || this.#isEnabledViaPreferences || this.isEnabledTemporarily);
118+
return true;
119+
// return this.currentRouteSupportsDarkMode && (this.#currentRouteRequiresDarkMode || this.#isEnabledViaPreferences || this.isEnabledTemporarily);
119120
}
120121

121122
/**

app/templates/catalog.hbs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
{{page-title "Catalog"}}
22

3+
<div class="fixed inset-0 flex items-stretch justify-stretch pointer-events-none">
4+
<div class="w-full relative overflow-hidden rounded-sm">
5+
{{! Left blurred gradient }}
6+
<div class="w-1/2 h-60 absolute -bottom-32 -left-1/4 opacity-50 animate-spin-slow filter blur-[100px]">
7+
<div class="relative">
8+
<div class="rounded-full h-60 w-full bg-purple-800"></div>
9+
<div class="absolute bottom-24 -left-24 rounded-full h-60 w-full bg-red-800"></div>
10+
<div class="absolute top-24 left-24 rounded-full h-60 w-full bg-purple-600"></div>
11+
</div>
12+
</div>
13+
14+
{{! Right blurred gradient }}
15+
<div class="w-1/2 h-60 absolute -bottom-40 -right-1/4 opacity-50 animate-spin-slow filter blur-[100px]">
16+
<div class="relative">
17+
<div class="rounded-full h-60 w-full bg-blue-600"></div>
18+
<div class="absolute bottom-24 -left-24 rounded-full h-60 w-full bg-blue-700"></div>
19+
<div class="absolute top-24 left-24 rounded-full h-60 w-full bg-purple-600"></div>
20+
</div>
21+
</div>
22+
23+
{{! Center blurred gradient }}
24+
{{!-- <div class="w-1/2 h-60 absolute top-0 left-1/4 right-1/4 opacity-50 animate-spin-slow filter blur-[100px]">
25+
<div class="relative">
26+
<div class="rounded-full h-60 w-full bg-blue-600"></div>
27+
<div class="absolute bottom-24 -left-24 rounded-full h-60 w-full bg-purple-700"></div>
28+
<div class="absolute top-24 left-24 rounded-full h-60 w-full bg-purple-600"></div>
29+
</div>
30+
</div> --}}
31+
</div>
32+
</div>
33+
334
<div class="container mx-auto lg:max-w-(--breakpoint-lg) pt-6 md:pt-10 pb-10 md:pb-48 px-3 md:px-6">
435
<div class="border-b border-gray-200 dark:border-white/5 pb-2 mb-6">
536
<h1 class="text-3xl text-gray-700 dark:text-gray-300 font-bold tracking-tighter">Challenges</h1>

0 commit comments

Comments
 (0)