Skip to content

Commit d52b3b1

Browse files
marcin-hoaDamianBrzezinskiHoA
authored andcommitted
Reapply "feat: enable light mode (#255)" (#443)
This reverts commit 3be6ade.
1 parent be4c734 commit d52b3b1

File tree

32 files changed

+4652
-5091
lines changed

32 files changed

+4652
-5091
lines changed
Lines changed: 1 addition & 1 deletion
Loading

libs/blog/about-us/feature-about-us/src/lib/feature-about-us/feature-about-us.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<ng-container *transloco="let t; read: 'aboutUsPage'">
2-
<h2 class="py-4 text-[40px] font-bold">
2+
<h2 class="text-al-primary-foreground py-4 text-[40px] font-bold">
33
{{ t('title') }}
44
</h2>
55

6-
<al-card>
6+
<al-card class="bg-transparent">
77
<section
88
alCardContent
99
aria-labelledby="angular-love"
@@ -35,7 +35,7 @@ <h2 class="py-4 text-[40px] font-bold">
3535
<al-newsletter alCardContent />
3636
</al-card>
3737

38-
<h2 class="mb-8 mt-10 text-[40px] font-bold">
38+
<h2 class="text-al-primary-foreground mb-8 mt-10 text-[40px] font-bold">
3939
{{ t('authorsTitle') }}
4040
</h2>
4141
</ng-container>

libs/blog/articles/feature-latest-articles/src/lib/feature-latest-articles/feature-latest-articles.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import { CategoryListItem, injectCategories } from './categories.const';
3838
NgClass,
3939
TranslocoDirective,
4040
ArticleRegularCardSkeletonComponent,
41-
CardComponent,
4241
RepeatDirective,
4342
RouterLink,
4443
ButtonComponent,

libs/blog/articles/ui-article-card/src/lib/components/article-compact-card/article-compact-card.component.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<a [routerLink]="['/', article().slug] | alLocalize">
22
<article
3-
class="h-full rounded-lg bg-cover bg-no-repeat transition-transform hover:scale-105 motion-reduce:transition-none motion-reduce:hover:scale-100"
4-
[style.background-image]="
5-
'url(' +
6-
(article().featuredImageUrl || 'assets/article-placeholder.webp') +
7-
')'
8-
"
3+
class="relative h-full overflow-hidden rounded-lg bg-black bg-cover bg-no-repeat transition-transform hover:scale-105 motion-reduce:transition-none motion-reduce:hover:scale-100"
94
[attr.aria-labelledby]="article().slug"
105
>
11-
<div
12-
class="bg-al-background relative flex h-full flex-col justify-between opacity-85"
13-
>
6+
<img
7+
alt="Post featured image"
8+
class="absolute h-auto w-full bg-contain opacity-20"
9+
[ngSrc]="article().featuredImageUrl || 'assets/article-placeholder.webp'"
10+
[priority]="imagePriority()"
11+
width="1215"
12+
height="750"
13+
/>
14+
<div class="relative flex h-full flex-col justify-between text-[#fff]">
1415
<div
1516
class="hover:bg-al-bottom-radial-gradient absolute h-full w-full"
1617
></div>

libs/blog/articles/ui-article-card/src/lib/components/article-compact-card/article-compact-card.component.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { NgOptimizedImage } from '@angular/common';
12
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
23
import { RouterLink } from '@angular/router';
34
import { FastSvgComponent } from '@push-based/ngx-fast-svg';
@@ -9,9 +10,17 @@ import { AvatarComponent } from '@angular-love/blog/shared/ui-avatar';
910
@Component({
1011
selector: 'al-article-compact-card',
1112
changeDetection: ChangeDetectionStrategy.OnPush,
12-
imports: [AvatarComponent, RouterLink, AlLocalizePipe, FastSvgComponent],
13+
standalone: true,
14+
imports: [
15+
AvatarComponent,
16+
RouterLink,
17+
AlLocalizePipe,
18+
FastSvgComponent,
19+
NgOptimizedImage,
20+
],
1321
templateUrl: './article-compact-card.component.html',
1422
})
1523
export class ArticleCompactCardComponent {
1624
readonly article = input.required<ArticleCard>();
25+
readonly imagePriority = input<number | null>(null);
1726
}

libs/blog/articles/ui-article-card/src/lib/components/article-hero-card/article-hero-card-skeleton.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CardComponent } from '@angular-love/blog/shared/ui-card';
77
selector: 'al-article-hero-card-skeleton',
88
imports: [NgxSkeletonLoaderModule, CardComponent],
99
template: `
10-
<al-card>
10+
<al-card class="bg-transparent">
1111
<div alCardContent class="p-2">
1212
<div class="flex flex-row items-center">
1313
<!-- avatar -->

libs/blog/articles/ui-article-card/src/lib/components/article-horizontal-card/article-horizontal-card.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<a [routerLink]="['/', article().slug] | alLocalize">
22
<article
3-
class="group relative flex h-full w-full flex-row rounded-lg shadow-none max-h-52"
3+
class="light:border group relative flex h-full w-full flex-row rounded-lg shadow-none"
44
[attr.aria-labelledby]="article().slug"
55
>
66
<img

libs/blog/articles/ui-article-card/src/lib/components/article-regular-card/article-regular-card.component.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<a [routerLink]="['/', article().slug] | alLocalize">
22
<article
3-
class="bg-al-card md:hover:shadow-al-primary group relative h-full w-full rounded-lg border border-transparent shadow-none transition-transform motion-reduce:transition-none lg:hover:scale-105 lg:motion-reduce:hover:scale-100"
3+
class="bg-al-card md:hover:shadow-al-primary group relative h-full w-full rounded-lg border shadow-none transition-transform motion-reduce:transition-none lg:hover:scale-105 lg:motion-reduce:hover:scale-100 dark:border-transparent"
44
[attr.aria-labelledby]="article().slug"
55
>
66
<div
@@ -18,8 +18,12 @@
1818
<div class="rounded-b-lg">
1919
<div class="flex items-center justify-between px-4 pt-4">
2020
<div class="flex items-center gap-2">
21-
<al-avatar [imageSrc]="article().author.avatarUrl" size="32" />
22-
<span class="text-sm/[14px] font-medium">
21+
<al-avatar
22+
[imageSrc]="article().author.avatarUrl"
23+
[priority]="imagePriority()"
24+
size="32"
25+
/>
26+
<span class="text-al-primary-foreground text-sm/[14px] font-medium">
2327
{{ article().author.name }}
2428
</span>
2529
</div>
@@ -34,10 +38,14 @@
3438
</div>
3539
</div>
3640
<div class="flex flex-col gap-3 px-4 pb-4 pt-3">
37-
<h3 class="text-2xl font-bold" [id]="article().slug">
41+
<h3
42+
class="*:text-al-primary-foreground text-2xl font-bold *:not-italic"
43+
[id]="article().slug"
44+
style="word-break: break-word"
45+
>
3846
{{ article().title }}
3947
</h3>
40-
<p class="line-clamp-2">
48+
<p class="*:text-al-pink line-clamp-2 *:font-medium *:not-italic">
4149
{{ article().excerpt }}
4250
</p>
4351
</div>

libs/blog/articles/ui-article-card/src/lib/ui-article-card/ui-article-card.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
/>
1313
}
1414
@case ('compact') {
15-
<al-article-compact-card [article]="article()" />
15+
<al-article-compact-card
16+
[article]="article()"
17+
[imagePriority]="imagePriority()"
18+
/>
1619
}
1720
}

libs/blog/articles/ui-article-list-title/src/lib/ui-article-list-title/ui-article-list-title.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="my-5 flex flex-row items-center justify-between gap-6">
22
<h2
33
data-testId="article-list-title"
4-
class="line-clamp-2 max-w-[160px] text-xl font-bold md:line-clamp-1 md:max-w-full lg:text-3xl"
4+
class="text-al-primary-foreground line-clamp-2 max-w-[160px] text-xl font-bold md:line-clamp-1 md:max-w-full lg:text-3xl"
55
>
66
{{ title() }}
77
</h2>

0 commit comments

Comments
 (0)