Skip to content

Commit b11d20c

Browse files
committed
style: enhance dark mode support across community, event, podcast cards, and navigation components
1 parent e3066de commit b11d20c

File tree

7 files changed

+34
-26
lines changed

7 files changed

+34
-26
lines changed

src/app/components/cards/community-card.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ import { Community } from '../../../models/community.model';
66
changeDetection: ChangeDetectionStrategy.OnPush,
77
template: `
88
<article
9-
class="rounded-2xl drop-shadow-xl p-6 bg-white h-full flex flex-col gap-4"
9+
class="rounded-2xl drop-shadow-xl p-6 bg-white dark:bg-gray-800 h-full flex flex-col gap-4"
1010
>
1111
<header class="flex items-start gap-4">
1212
<div class="flex items-center gap-2 bg-gray-100 p-2 rounded-lg">
1313
<img [src]="community().logo" class="w-10" alt="" />
1414
</div>
1515
<div class="flex flex-col gap-1">
1616
<h2 class="text-lg font-bold">{{ community().name }}</h2>
17-
<div class="flex items-center gap-1 text-sm text-gray-600">
17+
<div
18+
class="flex items-center gap-1 text-sm text-gray-600 dark:text-gray-200"
19+
>
1820
<i class="pi pi-globe" style="font-size: 0.8rem"></i>
1921
<span>{{ community().location ?? 'Online' }}</span>
2022
</div>
@@ -77,7 +79,9 @@ import { Community } from '../../../models/community.model';
7779
target="_blank"
7880
class="text-sm hover:underline flex items-center gap-2"
7981
>
80-
<i class="pi pi-twitter text-2xl text-[#000000]"></i>
82+
<i
83+
class="pi pi-twitter text-2xl text-[#000000] dark:text-white"
84+
></i>
8185
<span>Twitter</span>
8286
</a>
8387
</li>

src/app/components/cards/event-card.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ import { CommunityEvent } from '../../../models/community-event.model';
1212
changeDetection: ChangeDetectionStrategy.OnPush,
1313
template: `
1414
<article
15-
class="rounded-2xl drop-shadow-xl p-6 bg-white h-full flex flex-col gap-4"
15+
class="rounded-2xl drop-shadow-xl p-6 bg-white dark:bg-gray-800 h-full flex flex-col gap-4"
1616
>
17-
<header class="flex items-start justify-between">
17+
<header class="flex items-start justify-between gap-2">
1818
<h2 class="text-lg font-bold">{{ event().name }}</h2>
19-
<span class="text-sm bg-[#26A0D9] text-white px-2 py-1 rounded-lg">{{
20-
event().type
21-
}}</span>
19+
<span
20+
class="text-sm bg-[#26A0D9] text-white dark:text-gray-900 px-2 py-1 rounded-lg"
21+
>{{ event().type }}</span
22+
>
2223
</header>
2324
<ul class="flex flex-col gap-2">
2425
<li class="flex items-center gap-2">
@@ -40,11 +41,13 @@ import { CommunityEvent } from '../../../models/community-event.model';
4041
<p class="text-sm flex-1">{{ event().description }}</p>
4142
<footer class="flex flex-col gap-2">
4243
<div
43-
class="flex items-center justify-between bg-gray-50 p-4 rounded-2xl"
44+
class="flex items-center justify-between bg-gray-50 dark:bg-gray-700 p-4 rounded-2xl"
4445
>
4546
@if (!event().isFree) {
4647
<div class="flex flex-col">
47-
<div class="text-sm text-gray-500">Starting from</div>
48+
<div class="text-sm text-gray-500 dark:text-gray-200">
49+
Starting from
50+
</div>
4851
<div class="font-bold text-[#26A0D9] flex items-end gap-1">
4952
@if (event().startingPrice) {
5053
<span class="text-sm pb-1">
@@ -58,7 +61,9 @@ import { CommunityEvent } from '../../../models/community-event.model';
5861
</div>
5962
} @else {
6063
<div class="flex flex-col">
61-
<div class="text-sm text-gray-500">Registration</div>
64+
<div class="text-sm text-gray-500 dark:text-gray-200">
65+
Registration
66+
</div>
6267
<div class="font-bold text-2xl text-[#26A0D9]">Free</div>
6368
</div>
6469
}

src/app/components/cards/podcast-card.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Podcast } from '../../../models/podcast.model';
66
changeDetection: ChangeDetectionStrategy.OnPush,
77
template: `
88
<article
9-
class="rounded-2xl drop-shadow-xl p-6 bg-white h-full flex flex-col gap-4"
9+
class="rounded-2xl drop-shadow-xl p-6 bg-white dark:bg-gray-800 h-full flex flex-col gap-4"
1010
>
1111
<div class="flex items-start gap-4">
1212
<img
@@ -25,7 +25,7 @@ import { Podcast } from '../../../models/podcast.model';
2525
{{ podcast().name }}
2626
</h3>
2727
<span
28-
class="inline-flex items-center justify-center gap-1 bg-gray-100 rounded px-2 py-1 text-xs"
28+
class="inline-flex items-center justify-center gap-1 bg-gray-100 dark:bg-gray-700 rounded px-2 py-1 text-xs"
2929
>
3030
<i class="pi pi-language text-xs" aria-hidden="true"></i>
3131
{{
@@ -45,8 +45,12 @@ import { Podcast } from '../../../models/podcast.model';
4545
target="_blank"
4646
>
4747
<div class="flex items-center gap-3">
48-
<i class="pi pi-play-circle text-purple-600 text-2xl"></i>
49-
<span class="font-medium text-purple-600">Listen Now</span>
48+
<i
49+
class="pi pi-play-circle text-purple-600 text-2xl dark:text-purple-300"
50+
></i>
51+
<span class="font-medium text-purple-600 dark:text-purple-300"
52+
>Listen Now</span
53+
>
5054
</div>
5155
</a>
5256
</article>

src/app/components/navigation/navigation.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<span class="hidden md:block">ANGULAR</span>
77
<span>HUB</span>
88
</span>
9-
<span class="hidden lg:block text-sm text-gray-500">
9+
<h2 class="hidden lg:block text-sm text-gray-500 dark:text-gray-300">
1010
The Angular community hub for events, communities, and podcasts
11-
</span>
11+
</h2>
1212
</div>
1313
</a>
1414

@@ -48,7 +48,7 @@
4848
</ul>
4949
</nav>
5050
<div class="flex-1">
51-
<main class="pb-4 h-full bg-gray-50 pt-6">
51+
<main class="pb-4 h-full bg-gray-50 dark:bg-gray-900 pt-6">
5252
<router-outlet />
5353
</main>
5454
</div>

src/app/pages/communities-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const routeMeta = {
2121
template: `
2222
<section class="max-w-screen-xl mx-auto px-6">
2323
<input
24-
class="w-full p-2 rounded-lg border-2 border-gray-300"
24+
class="w-full p-2 rounded-lg border-2 border-gray-300 dark:border-gray-700"
2525
type="search"
2626
placeholder="Search communities"
2727
[(ngModel)]="search"

src/app/pages/events-page.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ import {
88
import { Title } from '@angular/platform-browser';
99
import { ButtonModule } from 'primeng/button';
1010
import { MessageModule } from 'primeng/message';
11-
import {
12-
EmptySearchMessage,
13-
NoEventsMessage,
14-
} from '../components/message';
11+
import { EmptySearchMessage, NoEventsMessage } from '../components/message';
1512
import { JsonLdService } from '../services/json-ld.service';
1613
import { HttpClient } from '@angular/common/http';
1714
import { EventCard } from '../components/cards/event-card';
@@ -44,7 +41,7 @@ export const routeMeta = {
4441
template: `
4542
<section class="max-w-screen-xl w-full mx-auto px-6">
4643
<input
47-
class="w-full p-2 rounded-lg border-2 border-gray-300"
44+
class="w-full p-2 rounded-lg border-2 border-gray-300 dark:border-gray-700"
4845
type="search"
4946
placeholder="Search events"
5047
[(ngModel)]="search"

src/app/pages/podcasts-page.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { PodcastCard } from '../components/cards/podcast-card';
44

55
import { JsonLdService } from '../services/json-ld.service';
66
import { Title } from '@angular/platform-browser';
7-
import { Banner } from '../components/banner';
8-
import { signal } from '@angular/core';
97
import { Podcast } from '../../models/podcast.model';
108
import { HttpClient } from '@angular/common/http';
119
import { toSignal } from '@angular/core/rxjs-interop';

0 commit comments

Comments
 (0)