-
Notifications
You must be signed in to change notification settings - Fork 10
feat/light-mode #444
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
base: main
Are you sure you want to change the base?
feat/light-mode #444
Changes from 23 commits
d52b3b1
956f02b
c8ace7e
38ca2d3
e97641f
9329dcd
0445dc3
e0a2694
5fccbda
e957263
18a4c96
097903d
44ba780
102f365
c04b42c
6f217ab
564f72d
7d2e0d2
1bc2613
2764f48
0323183
e7281ca
4b86026
169c1cd
6013a04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,16 +1,17 @@ | ||||||
<a [routerLink]="['/', article().slug] | alLocalize"> | ||||||
<article | ||||||
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') + | ||||||
')' | ||||||
" | ||||||
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" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainHard-coded bg-black undermines light-mode theming Using bg-black forces a dark card in all themes. For light mode, this should be theme-driven (CSS vars or theme variants), not a fixed color. Consider replacing with a theme-aware class/token (examples, adjust to your setup):
#!/bin/bash
# Locate Tailwind config file
config_file=$(fd 'tailwind.config.*' -t f | head -n1)
echo "Tailwind config file: $config_file"
if [ -n "$config_file" ]; then
echo "=== Showing first 200 lines of $config_file ==="
sed -n '1,200p' "$config_file"
fi
# Check for DaisyUI plugin usage
echo "=== Searching for DaisyUI references ==="
rg -n "daisyui" .
# Check for custom theme tokens
echo "=== Searching for 'bg-al-background' ==="
rg -n "bg-al-background" .
echo "=== Searching for 'al-background' ==="
rg -n "al-background" .
# Check for data-theme attribute usage
echo "=== Searching for 'data-theme' ==="
rg -n "data-theme" .
# Check for Tailwind dark variant usage
echo "=== Searching for 'dark:' classes ==="
rg -n "dark:" . 🏁 Script executed: #!/bin/bash
# Locate Tailwind config file
config_file=$(fd 'tailwind.config.*' -t f | head -n1)
echo "Tailwind config file: $config_file"
if [ -n "$config_file" ]; then
echo "=== Showing first 200 lines of $config_file ==="
sed -n '1,200p' "$config_file"
fi
# Check for DaisyUI plugin usage
echo "=== Searching for DaisyUI references ==="
rg -n "daisyui" .
# Check for custom theme tokens
echo "=== Searching for 'bg-al-background' ==="
rg -n "bg-al-background" .
echo "=== Searching for 'al-background' ==="
rg -n "al-background" .
# Check for data-theme attribute usage
echo "=== Searching for 'data-theme' ==="
rg -n "data-theme" .
# Check for Tailwind dark variant usage
echo "=== Searching for 'dark:' classes ==="
rg -n "dark:" . Length of output: 9683 Hard-coded bg-black breaks light-mode theming • File: Suggested diff: --- a/libs/blog/articles/ui-article-card/src/lib/components/article-compact-card/article-compact-card.component.html
+++ b/libs/blog/articles/ui-article-card/src/lib/components/article-compact-card/article-compact-card.component.html
@@ -1,4 +1,4 @@
- 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="relative h-full overflow-hidden rounded-lg bg-al-card bg-cover bg-no-repeat transition-transform hover:scale-105 motion-reduce:transition-none motion-reduce:hover:scale-100" If you need a distinct dark-mode override, you can also add a 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
[attr.aria-labelledby]="article().slug" | ||||||
> | ||||||
<div | ||||||
class="bg-al-background relative flex h-full flex-col justify-between opacity-85" | ||||||
> | ||||||
<img | ||||||
alt="" | ||||||
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]"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Text color hard-coded; add stacking safety for content layer
Apply this diff to enforce stacking (and drop hard-coded hex if tokens exist): - <div class="relative flex h-full flex-col justify-between text-[#fff]">
+ <div class="relative z-20 flex h-full flex-col justify-between text-al-foreground"> If <!-- Line 16 update example -->
<div class="absolute inset-0 z-10 h-full w-full pointer-events-none hover:bg-al-bottom-radial-gradient"></div> |
||||||
<div | ||||||
class="hover:bg-al-bottom-radial-gradient absolute h-full w-full" | ||||||
></div> | ||||||
|
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 border-transparent shadow-none transition-transform motion-reduce:transition-none lg:hover:scale-105 lg:motion-reduce:hover:scale-100" | ||||||
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" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Inconsistent border approach between themes. The border styling uses - 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-al-border shadow-none transition-transform motion-reduce:transition-none lg:hover:scale-105 lg:motion-reduce:hover:scale-100" 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
[attr.aria-labelledby]="article().slug" | ||||||
> | ||||||
<div | ||||||
|
@@ -18,8 +18,12 @@ | |||||
<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" size="32" /> | ||||||
<span class="text-sm/[14px] font-medium"> | ||||||
<al-avatar | ||||||
[imageSrc]="article().author.avatarUrl" | ||||||
[priority]="imagePriority()" | ||||||
size="32" | ||||||
/> | ||||||
<span class="text-al-primary-foreground text-sm/[14px] font-medium"> | ||||||
{{ article().author.name }} | ||||||
</span> | ||||||
</div> | ||||||
|
@@ -34,10 +38,14 @@ | |||||
</div> | ||||||
</div> | ||||||
<div class="flex flex-col gap-3 px-4 pb-4 pt-3"> | ||||||
<h3 class="text-2xl font-bold" [id]="article().slug"> | ||||||
<h3 | ||||||
class="*:text-al-primary-foreground text-2xl font-bold *:not-italic" | ||||||
[id]="article().slug" | ||||||
style="word-break: break-word" | ||||||
> | ||||||
{{ article().title }} | ||||||
</h3> | ||||||
<p class="line-clamp-2"> | ||||||
<p class="*:text-al-pink line-clamp-2 *:font-medium *:not-italic"> | ||||||
{{ article().excerpt }} | ||||||
</p> | ||||||
</div> | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be private