Skip to content

Commit a782d05

Browse files
committed
feat(client): customize some details in light mode
Implements KAP-237 KAP-235
1 parent a8ddb04 commit a782d05

File tree

11 files changed

+11535
-13335
lines changed

11 files changed

+11535
-13335
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export type CardType = 'regular' | 'horizontal' | 'compact' | 'hero';
2222
host: {
2323
'data-testid': 'article-card',
2424
'[attr.id]': 'article().slug',
25+
class: 'light:border light:rounded-lg',
2526
},
2627
})
2728
export class UiArticleCardComponent {

libs/blog/layouts/ui-layouts/src/lib/footer/components/footer-logo.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
1717
/>
1818
<span class="text-al-primary px-4 text-lg font-bold">angular.love</span>
1919
</div>
20-
<small class="text-al-muted hidden pt-1 text-xs lg:block">
20+
<small class="hidden pt-1 text-xs text-[#bec4ca] lg:block">
2121
Copyright &#169; {{ currentYear() }}
2222
</small>
2323
</div>

libs/blog/layouts/ui-layouts/src/lib/footer/components/footer-social-media-icons.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { SocialMediaIconsComponent } from '@angular-love/blog/shared/ui-social-m
1010
<div class="flex flex-col items-start">
1111
<h3
1212
id="social-media-title"
13-
class="mb-4 hidden text-sm font-bold lg:block"
13+
class="mb-4 hidden text-sm font-bold text-[#fff] lg:block"
1414
>
1515
Social media
1616
</h3>

libs/blog/layouts/ui-layouts/src/lib/footer/footer.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<footer class="bg-al-card w-full">
1+
<footer class="w-full bg-[#191a22]">
22
<div
33
class="al-container mx-auto grid max-w-screen-xl gap-y-4 px-6 py-4 xl:px-0"
44
>
@@ -10,7 +10,7 @@
1010
<al-footer-social-media-icons />
1111
</div>
1212

13-
<small class="copyright text-al-muted text-center text-xs lg:hidden">
13+
<small class="copyright text-center text-xs text-[#6a798b] lg:hidden">
1414
Copyright &#169; {{ currentYear }}
1515
</small>
1616
</div>

libs/blog/layouts/ui-navigation/src/lib/navigation/navigation.component.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
*transloco="let t"
33
[ngClass]="{
44
'flex-row': layout() === 'horizontal',
5-
'flex-col': layout() === 'vertical',
5+
'flex-col': layout() === 'vertical'
66
}"
77
>
88
<ul
99
class="flex flex-wrap"
1010
[ngClass]="{
11-
'flex-col justify-between': layout() === 'vertical',
11+
'flex-col justify-between': layout() === 'vertical'
1212
}"
1313
[attr.aria-label]="t('nav.navLinks')"
1414
>
1515
@for (item of navItems; track $index) {
1616
@if (!item.externalLink) {
1717
<li
1818
[ngClass]="{
19-
'py-10 text-center': layout() === 'vertical',
19+
'py-10 text-center': layout() === 'vertical'
2020
}"
2121
>
2222
<a
2323
[attr.data-testid]="item.dataTestId"
24-
class="text-al-foreground p-2 font-medium md:p-6"
24+
class="p-2 font-medium text-[#fff] md:p-6"
2525
[routerLinkActive]="'text-al-pink'"
2626
[routerLink]="item.link | alLocalize"
2727
(click)="navigated.emit()"
@@ -33,7 +33,7 @@
3333
<li>
3434
<a
3535
[attr.data-testid]="item.dataTestId"
36-
class="text-al-foreground p-2 font-medium md:p-6"
36+
class="p-2 font-medium text-[#fff] md:p-6"
3737
[href]="item.link"
3838
target="_blank"
3939
>

libs/blog/partners/ui-partners/src/lib/partners-list/partners-list.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
>
44
@for (partner of partnersList(); track partner.asset_URL) {
55
<a
6-
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"
6+
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"
77
[href]="partner.link_URL"
88
target="_blank"
99
>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<ul aria-label="Social media" class="flex items-center justify-center">
22
@for (social of socials; track $index) {
33
<li>
4-
<al-social-media-icon-item [socialMediaConfig]="social" />
4+
<al-social-media-icon-item
5+
class="text-[#fff]"
6+
[socialMediaConfig]="social"
7+
/>
58
</li>
69
}
710
</ul>

libs/shared/assets/src/lib/styles/main.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
--muted: 25 25 25;
2424
--border: 200 200 200;
2525
--card: 255 255 255;
26-
--background: 236 236 236;
26+
--background: 255 255 255;
2727
}
2828
}
2929
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"sanitize-html": "^2.13.0",
5757
"stylelint": "^16.3.1",
5858
"tailwind-merge": "^2.3.0",
59+
"tailwindcss-theme-variants": "2.0.0-beta.0",
5960
"tslib": "^2.6.1",
6061
"vanilla-cookieconsent": "3.0.1",
6162
"xmlbuilder2": "^3.1.1",

pnpm-lock.yaml

+11,499-13,322
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tailwind.preset.js

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
const {
2+
themeVariants,
3+
prefersLight,
4+
prefersDark,
5+
} = require('tailwindcss-theme-variants');
6+
17
/** @type {import('tailwindcss').Config} */
28
module.exports = {
39
theme: {
@@ -29,5 +35,17 @@ module.exports = {
2935
},
3036
},
3137
},
32-
plugins: [require('@tailwindcss/container-queries')],
38+
plugins: [
39+
require('@tailwindcss/container-queries'),
40+
themeVariants({
41+
themes: {
42+
light: {
43+
mediaQuery: prefersLight /* "@media (prefers-color-scheme: light)" */,
44+
},
45+
dark: {
46+
mediaQuery: prefersDark /* "@media (prefers-color-scheme: dark)" */,
47+
},
48+
},
49+
}),
50+
],
3351
};

0 commit comments

Comments
 (0)