Spaces:
Running
Running
Update src/App.js
Browse files- src/App.js +40 -38
src/App.js
CHANGED
|
@@ -164,45 +164,47 @@ const HoroscopeApp = () => {
|
|
| 164 |
</div>
|
| 165 |
|
| 166 |
{/* Zodiac Signs Grid - Single Row */}
|
| 167 |
-
<div className="
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
e
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
{sign.
|
| 200 |
-
|
|
|
|
|
|
|
| 201 |
</div>
|
|
|
|
| 202 |
</div>
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
))}
|
| 206 |
</div>
|
| 207 |
|
| 208 |
{/* Period Selection */}
|
|
@@ -348,4 +350,4 @@ const HoroscopeApp = () => {
|
|
| 348 |
);
|
| 349 |
};
|
| 350 |
|
| 351 |
-
export default HoroscopeApp;
|
|
|
|
| 164 |
</div>
|
| 165 |
|
| 166 |
{/* Zodiac Signs Grid - Single Row */}
|
| 167 |
+
<div className="w-full overflow-x-auto mb-6 md:mb-10">
|
| 168 |
+
<div className="flex justify-start md:justify-center gap-2 md:gap-3 pb-4 px-4 min-w-max">
|
| 169 |
+
{zodiacSigns.map((sign) => (
|
| 170 |
+
<div
|
| 171 |
+
key={sign.id}
|
| 172 |
+
onClick={() => setSelectedSign(sign.id)}
|
| 173 |
+
className="flex flex-col items-center cursor-pointer transition-all duration-300 hover:scale-105 flex-shrink-0"
|
| 174 |
+
>
|
| 175 |
+
<div className={`w-20 h-20 md:w-24 md:h-24 rounded-full p-0.5 transition-all ${
|
| 176 |
+
selectedSign === sign.id
|
| 177 |
+
? 'shadow-lg'
|
| 178 |
+
: ''
|
| 179 |
+
}`}
|
| 180 |
+
style={{
|
| 181 |
+
background: selectedSign === sign.id
|
| 182 |
+
? 'linear-gradient(135deg, #1D3249 0%, #96D1E2 100%)'
|
| 183 |
+
: 'linear-gradient(135deg, #07090A 0%, #979999 100%)'
|
| 184 |
+
}}>
|
| 185 |
+
<div className={`w-full h-full rounded-full flex items-center justify-center text-xl overflow-hidden ${
|
| 186 |
+
isDarkMode ? 'bg-gray-800' : 'bg-gray-100'
|
| 187 |
+
}`}>
|
| 188 |
+
{sign.image ? (
|
| 189 |
+
<img
|
| 190 |
+
src={sign.image}
|
| 191 |
+
alt={sign.name}
|
| 192 |
+
className="w-full h-full object-cover rounded-full"
|
| 193 |
+
onError={(e) => {
|
| 194 |
+
e.target.style.display = 'none';
|
| 195 |
+
e.target.nextSibling.style.display = 'block';
|
| 196 |
+
}}
|
| 197 |
+
/>
|
| 198 |
+
) : null}
|
| 199 |
+
<span style={{ display: sign.image ? 'none' : 'block' }}>
|
| 200 |
+
{sign.emoji}
|
| 201 |
+
</span>
|
| 202 |
+
</div>
|
| 203 |
</div>
|
| 204 |
+
<p className="text-xs font-medium mt-2 text-center">{sign.name}</p>
|
| 205 |
</div>
|
| 206 |
+
))}
|
| 207 |
+
</div>
|
|
|
|
| 208 |
</div>
|
| 209 |
|
| 210 |
{/* Period Selection */}
|
|
|
|
| 350 |
);
|
| 351 |
};
|
| 352 |
|
| 353 |
+
export default HoroscopeApp;
|