fix Portfolio light theme shows actual color
This commit is contained in:
parent
abd73a4864
commit
5a63ed7d74
1 changed files with 15 additions and 11 deletions
26
src/App.jsx
26
src/App.jsx
|
|
@ -45,17 +45,21 @@ function TetrisPiece({ piece, isDark }) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// For static pieces (CV, Portfolio): show actual color immediately
|
// Determine background color based on piece type and view
|
||||||
// For desktop non-static: start gray, show hover color when hovering
|
let bgColor;
|
||||||
// For mobile dark: use colorDark for less gray
|
if (piece.label === 'cv' || piece.label === 'portfolio' || piece.featured) {
|
||||||
// For mobile light: use actual color
|
// Static pieces (CV, Portfolio): show actual color immediately
|
||||||
const bgColor = (piece.label === 'cv' || isStatic)
|
bgColor = piece.color;
|
||||||
? piece.color
|
} else if (isMobile && isDark) {
|
||||||
: (isMobile && isDark)
|
// Mobile dark: use colorDark or actual color
|
||||||
? (color || piece.colorDark || piece.color)
|
bgColor = color || piece.colorDark || piece.color;
|
||||||
: (isMobile)
|
} else if (isMobile) {
|
||||||
? (color || piece.color)
|
// Mobile light: use actual color (with hover)
|
||||||
: '#cccccc'; // Start gray for desktop only
|
bgColor = color || piece.color;
|
||||||
|
} else {
|
||||||
|
// Desktop: start gray, show hover color when hovering
|
||||||
|
bgColor = '#cccccc';
|
||||||
|
}
|
||||||
const rowDelay = (piece.startY * 10) + (piece.startX * 2); // Stagger based on both X and Y position
|
const rowDelay = (piece.startY * 10) + (piece.startX * 2); // Stagger based on both X and Y position
|
||||||
const textColor = '#ffffff';
|
const textColor = '#ffffff';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue