Skip to content

Revert "feat: enable light mode (#255)" #443

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

Merged
merged 1 commit into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/blog/src/assets/icons/arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<ng-container *transloco="let t; read: 'aboutUsPage'">
<h2 class="text-al-primary-foreground py-4 text-[40px] font-bold">
<h2 class="py-4 text-[40px] font-bold">
{{ t('title') }}
</h2>

<al-card class="bg-transparent">
<al-card>
<section
alCardContent
aria-labelledby="angular-love"
Expand Down Expand Up @@ -35,7 +35,7 @@ <h2 class="text-al-primary-foreground py-4 text-[40px] font-bold">
<al-newsletter alCardContent />
</al-card>

<h2 class="text-al-primary-foreground mb-8 mt-10 text-[40px] font-bold">
<h2 class="mb-8 mt-10 text-[40px] font-bold">
{{ t('authorsTitle') }}
</h2>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { CategoryListItem, injectCategories } from './categories.const';
NgClass,
TranslocoDirective,
ArticleRegularCardSkeletonComponent,
CardComponent,
RepeatDirective,
RouterLink,
ButtonComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<a [routerLink]="['/', article().slug] | alLocalize">
<article
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"
class="h-full rounded-lg bg-cover bg-no-repeat transition-transform hover:scale-105 motion-reduce:transition-none motion-reduce:hover:scale-100"
[style.background-image]="
'url(' +
(article().featuredImageUrl || 'assets/article-placeholder.webp') +
')'
"
[attr.aria-labelledby]="article().slug"
>
<img
alt="Post featured image"
class="absolute h-auto w-full bg-contain opacity-20"
[ngSrc]="article().featuredImageUrl || 'assets/article-placeholder.webp'"
[priority]="imagePriority()"
width="1215"
height="750"
/>
<div class="relative flex h-full flex-col justify-between text-[#fff]">
<div
class="bg-al-background relative flex h-full flex-col justify-between opacity-85"
>
<div
class="hover:bg-al-bottom-radial-gradient absolute h-full w-full"
></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { NgOptimizedImage } from '@angular/common';
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { RouterLink } from '@angular/router';
import { FastSvgComponent } from '@push-based/ngx-fast-svg';
Expand All @@ -10,17 +9,9 @@ import { AvatarComponent } from '@angular-love/blog/shared/ui-avatar';
@Component({
selector: 'al-article-compact-card',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [
AvatarComponent,
RouterLink,
AlLocalizePipe,
FastSvgComponent,
NgOptimizedImage,
],
imports: [AvatarComponent, RouterLink, AlLocalizePipe, FastSvgComponent],
templateUrl: './article-compact-card.component.html',
})
Comment on lines 9 to 14
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Component is no longer standalone

The component decorator no longer includes standalone: true. This change may require updating how this component is registered and consumed in the application.

Verify that this component is properly declared in a NgModule since it's no longer standalone. This change could potentially break module dependencies if not properly handled.


🏁 Script executed:

#!/bin/bash
# Check if the component is properly declared in a module
echo "Checking if ArticleCompactCardComponent is declared in a module..."
grep -r "ArticleCompactCardComponent" --include="*.ts" | grep -i "declarations\|exports"

Length of output: 231


Ensure ArticleCompactCardComponent is registered in an NgModule

You’ve removed standalone: true from ArticleCompactCardComponent, so it must now be declared in an NgModule. I didn’t find any references to it in a declarations or exports array:

• Add it to the appropriate module (for example libs/blog/articles/ui-article-card/ui-article-card.module.ts):

@NgModule({
  declarations: [ArticleCompactCardComponent, /* … */],
  exports:      [ArticleCompactCardComponent, /* … */],
  imports:      [/* … */],
})
export class UiArticleCardModule {}

Without this, consumers of al-article-compact-card will break at runtime.

export class ArticleCompactCardComponent {
readonly article = input.required<ArticleCard>();
readonly imagePriority = input<number | null>(null);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CardComponent } from '@angular-love/blog/shared/ui-card';
selector: 'al-article-hero-card-skeleton',
imports: [NgxSkeletonLoaderModule, CardComponent],
template: `
<al-card class="bg-transparent">
<al-card>
<div alCardContent class="p-2">
<div class="flex flex-row items-center">
<!-- avatar -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a [routerLink]="['/', article().slug] | alLocalize">
<article
class="light:border group relative flex h-full w-full flex-row rounded-lg shadow-none"
class="group relative flex h-full w-full flex-row rounded-lg shadow-none max-h-52"
[attr.aria-labelledby]="article().slug"
>
<img
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a [routerLink]="['/', article().slug] | alLocalize">
<article
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"
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"
[attr.aria-labelledby]="article().slug"
>
<div
Expand All @@ -18,12 +18,8 @@
<div class="rounded-b-lg">
<div class="flex items-center justify-between px-4 pt-4">
<div class="flex items-center gap-2">
<al-avatar
[imageSrc]="article().author.avatarUrl"
[priority]="imagePriority()"
size="32"
/>
<span class="text-al-primary-foreground text-sm/[14px] font-medium">
<al-avatar [imageSrc]="article().author.avatarUrl" size="32" />
<span class="text-sm/[14px] font-medium">
{{ article().author.name }}
</span>
</div>
Expand All @@ -38,14 +34,10 @@
</div>
</div>
<div class="flex flex-col gap-3 px-4 pb-4 pt-3">
<h3
class="*:text-al-primary-foreground text-2xl font-bold *:not-italic"
[id]="article().slug"
style="word-break: break-word"
>
<h3 class="text-2xl font-bold" [id]="article().slug">
{{ article().title }}
</h3>
<p class="*:text-al-pink line-clamp-2 *:font-medium *:not-italic">
<p class="line-clamp-2">
{{ article().excerpt }}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
/>
}
@case ('compact') {
<al-article-compact-card
[article]="article()"
[imagePriority]="imagePriority()"
/>
<al-article-compact-card [article]="article()" />
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="my-5 flex flex-row items-center justify-between gap-6">
<h2
data-testId="article-list-title"
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"
class="line-clamp-2 max-w-[160px] text-xl font-bold md:line-clamp-1 md:max-w-full lg:text-3xl"
>
{{ title() }}
</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {

@Component({
selector: 'al-author-card-template',
standalone: true,
imports: [CardComponent, CardContentDirective, GradientCardDirective],
host: {
class: 'block @container',
Expand All @@ -20,11 +19,9 @@ import {
class="@3xl:flex-row @3xl:border-none flex w-full flex-col items-center rounded-lg border"
>
<div
alGradientCard
class="@3xl:border dark:@3xl:!bg-al-radial-gradient dark:@3xl:bg-al-background light:@3xl:bg-[#f2f2f2] @3xl:min-w-[260px] min-w-fit rounded-lg pb-4 pt-6"
class="@3xl:border @3xl:!bg-al-radial-gradient @3xl:bg-al-background @3xl:min-w-[260px] min-w-fit rounded-lg pb-4 pt-6"
>
<div
alCardContent
class="@3xl:max-w-[360px] flex w-full flex-col items-center gap-4"
>
<ng-content select="[author-info-card]"></ng-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<div class="flex flex-col items-center gap-4">
<al-avatar [imageSrc]="author().avatarUrl" size="96" />
<span
class="text-al-foreground line-clamp-2 font-bold leading-none"
class="line-clamp-2 font-bold leading-none"
[id]="'author-title-' + author().slug"
>
{{ author().name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3 id="author-ad-title" class="text-2xl font-bold lg:text-4xl">
href="https://form.typeform.com/to/Zzf1Girt?typeform-source=angular.love"
target="_blank"
>
<p class="text-sm font-bold text-white">
<p class="text-sm font-bold">
{{ t('becomeAuthorCard.buttonText') }}
</p>
</a>
Expand Down Expand Up @@ -61,7 +61,7 @@ <h3 id="author-ad-title" class="text-2xl font-bold lg:text-4xl">
class="bg-al-pink flex h-[46px] w-full items-center justify-center rounded-lg md:w-4/5 lg:w-full"
[routerLink]="'/writing-rules' | alLocalize"
>
<p class="text-center text-sm font-bold text-white">
<p class="text-center text-sm font-bold">
{{ t('articleWritingRules.buttonText') }}
</p>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<div
class="my-1 flex h-full w-full items-center border md:my-2"
[ngClass]="{
'bg-al-radial-gradient rounded-lg': layout() === 'curved',
'bg-al-radial-gradient rounded-lg': layout() === 'curved'
}"
>
@if (index()) {
<div
class="bg-al-pink ml-4 mt-5 flex aspect-square h-6 items-center justify-center self-start rounded-full"
>
<p class="text-base font-bold text-white">{{ index() }}</p>
<p class="text-base font-bold">{{ index() }}</p>
</div>
} @else {
<div class="ml-4 mr-2 mt-6 h-4 self-start md:mt-0 md:self-center">
<fast-svg name="tick" class="text-al-pink" size="16" />
<fast-svg name="tick" size="16" class="text-al-pink " />
</div>
}
<p class="ml-4 mr-6 block pb-4 pt-5 md:ml-4 md:py-5 lg:mr-[30px]">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgOptimizedImage } from '@angular/common';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ChangeDetectionStrategy, Component, input } from '@angular/core';

@Component({
selector: 'al-footer-logo',
Expand All @@ -16,8 +16,13 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
/>
<span class="text-al-primary px-4 text-lg font-bold">angular.love</span>
</div>
<small class="text-al-muted hidden pt-1 text-xs lg:block">
Copyright &#169; {{ currentYear() }}
</small>
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FooterLogoComponent {}
export class FooterLogoComponent {
readonly currentYear = input.required<number>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SocialMediaIconsComponent } from '@angular-love/blog/shared/ui-social-m
<div class="flex flex-col items-start">
<h3
id="social-media-title"
class="mb-4 hidden text-sm font-bold text-[#fff] lg:block"
class="mb-4 hidden text-sm font-bold lg:block"
>
Social media
</h3>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<footer class="w-full bg-[#191a22]">
<footer class="bg-al-card w-full">
<div
class="al-container mx-auto grid max-w-screen-xl gap-y-4 px-6 py-4 xl:px-0"
>
<al-footer-logo class="self-center" />
<al-navigation [whiteFont]="true" />
<al-footer-logo class="self-center" [currentYear]="currentYear" />
<al-navigation />
<div
class="social-media-container flex items-center justify-self-end md:max-lg:justify-self-center"
>
<al-footer-social-media-icons />
</div>

<small class="copyright text-al-muted text-center text-xs lg:hidden">
Copyright &#169; {{ currentYear }}
</small>
</div>
<small class="block pb-4 text-center text-xs text-[#6a798b]">
Copyright &#169; {{ currentYear }}
</small>
</footer>
18 changes: 16 additions & 2 deletions libs/blog/layouts/ui-layouts/src/lib/footer/footer.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ al-navigation {
grid-area: social;
}

.copyright {
grid-area: copyright;
}

.al-container {
grid-template-areas:
'logo social'
'nav nav';
'nav nav'
'copyright copyright';
}

@screen md {
.al-container {
grid-template-areas:
'logo nav'
'social social'
'copyright copyright';
}
}

@screen lg {
@screen xl {
.al-container {
grid-template-areas: 'logo nav social';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}"
>
<ul
class="flex flex-wrap justify-center"
class="flex flex-wrap"
[ngClass]="{
'flex-col justify-between': layout() === 'vertical',
}"
Expand All @@ -21,8 +21,7 @@
>
<a
[attr.data-testid]="item.dataTestId"
class="p-2 font-medium md:p-6"
[ngClass]="whiteFont() ? 'text-white' : 'text-al-foreground'"
class="text-al-foreground p-2 font-medium md:p-6"
[routerLinkActive]="'text-al-pink'"
[routerLink]="item.link | alLocalize"
(click)="navigated.emit()"
Expand All @@ -34,8 +33,7 @@
<li>
<a
[attr.data-testid]="item.dataTestId"
class="p-2 font-medium md:p-6"
[ngClass]="whiteFont() ? 'text-white' : 'text-al-foreground'"
class="text-al-foreground p-2 font-medium md:p-6"
[href]="item.link"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export type NavItem = {
})
export class NavigationComponent {
readonly layout = input<'vertical' | 'horizontal'>('horizontal');
readonly whiteFont = input<boolean>(false);

readonly navItems: NavItem[] = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="flex flex-col">
<h2
id="newsletter-title"
class="text-al-primary-foreground text-4xl font-bold lg:text-2xl xl:text-4xl"
class="text-4xl font-bold lg:text-2xl xl:text-4xl"
>
{{ t('title') }}
</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
>
@for (partner of partnersList(); track partner.asset_URL) {
<a
class="light:border light:rounded-lg aspect-[2/1] w-full max-w-[160px] rounded-lg bg-white md:max-w-[200px] lg:transition-transform lg:hover:scale-105 lg:hover:cursor-pointer lg:motion-reduce:transition-none lg:motion-reduce:hover:scale-100"
class="aspect-[2/1] w-full max-w-[160px] rounded-lg bg-white md:max-w-[200px] lg:transition-transform lg:hover:scale-105 lg:hover:cursor-pointer lg:motion-reduce:transition-none lg:motion-reduce:hover:scale-100"
[href]="partner.link_URL"
[title]="partner.title"
target="_blank"
Expand Down
4 changes: 2 additions & 2 deletions libs/blog/shared/ui-card/src/lib/card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class CardLinkableDirective {
export class GradientCardDirective {
@HostBinding('class')
get hostClasses() {
return 'bg-al-radial-gradient dark:bg-al-background';
return 'border !bg-al-radial-gradient bg-al-background';
}
}

Expand Down Expand Up @@ -97,5 +97,5 @@ export class CardComponent {
ref: ElementRef<HTMLElement> = inject(ElementRef);

@HostBinding('class')
hostClasses = 'block rounded-lg border bg-al-card shadow-sm overflow-hidden';
hostClasses = 'block rounded-lg border shadow-sm overflow-hidden';
}
2 changes: 1 addition & 1 deletion libs/blog/shared/ui-card/src/lib/card.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const content =
export const regular: Story = {
render: () => ({
template: wrapper(`
<al-card class="bg-transparent">
<al-card>
<div alCardHeader>Header</div>
<div alCardContent>${content}</div>
<div alCardFooter>Footer</div>
Expand Down
Loading