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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Feline Facts | The Ultimate Cat Encyclopedia</title>
|
| 7 |
+
|
| 8 |
+
<!-- Google Fonts -->
|
| 9 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;600&family=Nunito:wght@300;400;700&display=swap" rel="stylesheet">
|
| 12 |
+
|
| 13 |
+
<!-- FontAwesome Icons -->
|
| 14 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 15 |
+
|
| 16 |
+
<style>
|
| 17 |
+
/* --- CSS Variables & Reset --- */
|
| 18 |
+
:root {
|
| 19 |
+
--primary-color: #FF8E53; /* Soft Coral */
|
| 20 |
+
--secondary-color: #FFBD59; /* Mustard */
|
| 21 |
+
--accent-color: #4A403A; /* Dark Brown/Grey */
|
| 22 |
+
--bg-color: #FFF9F5; /* Creamy White */
|
| 23 |
+
--card-bg: rgba(255, 255, 255, 0.9);
|
| 24 |
+
--glass-border: rgba(255, 255, 255, 0.5);
|
| 25 |
+
--shadow-light: 0 8px 30px rgba(0, 0, 0, 0.05);
|
| 26 |
+
--shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
|
| 27 |
+
--radius-lg: 24px;
|
| 28 |
+
--radius-md: 16px;
|
| 29 |
+
--font-heading: 'Fredoka', sans-serif;
|
| 30 |
+
--font-body: 'Nunito', sans-serif;
|
| 31 |
+
--transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
* {
|
| 35 |
+
margin: 0;
|
| 36 |
+
padding: 0;
|
| 37 |
+
box-sizing: border-box;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
body {
|
| 41 |
+
font-family: var(--font-body);
|
| 42 |
+
background-color: var(--bg-color);
|
| 43 |
+
color: var(--accent-color);
|
| 44 |
+
line-height: 1.6;
|
| 45 |
+
overflow-x: hidden;
|
| 46 |
+
background-image:
|
| 47 |
+
radial-gradient(circle at 10% 20%, rgba(255, 142, 83, 0.1) 0%, transparent 20%),
|
| 48 |
+
radial-gradient(circle at 90% 80%, rgba(255, 189, 89, 0.1) 0%, transparent 20%);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
a { text-decoration: none; color: inherit; }
|
| 52 |
+
ul { list-style: none; }
|
| 53 |
+
button { cursor: pointer; border: none; font-family: inherit; }
|
| 54 |
+
|
| 55 |
+
/* --- Header & Navigation --- */
|
| 56 |
+
header {
|
| 57 |
+
display: flex;
|
| 58 |
+
justify-content: space-between;
|
| 59 |
+
align-items: center;
|
| 60 |
+
padding: 1.5rem 5%;
|
| 61 |
+
background: rgba(255, 255, 255, 0.8);
|
| 62 |
+
backdrop-filter: blur(10px);
|
| 63 |
+
position: sticky;
|
| 64 |
+
top: 0;
|
| 65 |
+
z-index: 1000;
|
| 66 |
+
border-bottom: 1px solid rgba(0,0,0,0.05);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.logo {
|
| 70 |
+
font-family: var(--font-heading);
|
| 71 |
+
font-size: 1.8rem;
|
| 72 |
+
font-weight: 600;
|
| 73 |
+
color: var(--primary-color);
|
| 74 |
+
display: flex;
|
| 75 |
+
align-items: center;
|
| 76 |
+
gap: 10px;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.logo i { animation: bounce 2s infinite; }
|
| 80 |
+
|
| 81 |
+
.nav-links {
|
| 82 |
+
display: flex;
|
| 83 |
+
gap: 2rem;
|
| 84 |
+
align-items: center;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.nav-links a {
|
| 88 |
+
font-weight: 700;
|
| 89 |
+
font-size: 0.95rem;
|
| 90 |
+
transition: var(--transition);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.nav-links a:hover { color: var(--primary-color); }
|
| 94 |
+
|
| 95 |
+
.branding-link {
|
| 96 |
+
font-size: 0.85rem;
|
| 97 |
+
color: #888;
|
| 98 |
+
font-weight: 600;
|
| 99 |
+
padding: 8px 16px;
|
| 100 |
+
border-radius: 20px;
|
| 101 |
+
background: #f0f0f0;
|
| 102 |
+
transition: var(--transition);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.branding-link:hover {
|
| 106 |
+
background: var(--primary-color);
|
| 107 |
+
color: white;
|
| 108 |
+
transform: translateY(-2px);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
/* --- Main Layout --- */
|
| 112 |
+
main {
|
| 113 |
+
max-width: 1200px;
|
| 114 |
+
margin: 0 auto;
|
| 115 |
+
padding: 2rem 5%;
|
| 116 |
+
display: grid;
|
| 117 |
+
grid-template-columns: 1fr 1.2fr;
|
| 118 |
+
gap: 3rem;
|
| 119 |
+
min-height: 80vh;
|
| 120 |
+
align-items: center;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
/* --- Left Column: Interactive Fact Generator --- */
|
| 124 |
+
.generator-section {
|
| 125 |
+
display: flex;
|
| 126 |
+
flex-direction: column;
|
| 127 |
+
gap: 2rem;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.hero-text h1 {
|
| 131 |
+
font-family: var(--font-heading);
|
| 132 |
+
font-size: 3.5rem;
|
| 133 |
+
line-height: 1.1;
|
| 134 |
+
margin-bottom: 1rem;
|
| 135 |
+
color: var(--accent-color);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.hero-text h1 span {
|
| 139 |
+
color: var(--primary-color);
|
| 140 |
+
position: relative;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.hero-text h1 span::after {
|
| 144 |
+
content: '';
|
| 145 |
+
position: absolute;
|
| 146 |
+
bottom: 5px;
|
| 147 |
+
left: 0;
|
| 148 |
+
width: 100%;
|
| 149 |
+
height: 12px;
|
| 150 |
+
background: rgba(255, 142, 83, 0.2);
|
| 151 |
+
z-index: -1;
|
| 152 |
+
border-radius: 4px;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.hero-text p {
|
| 156 |
+
font-size: 1.1rem;
|
| 157 |
+
color: #666;
|
| 158 |
+
margin-bottom: 2rem;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.fact-card {
|
| 162 |
+
background: var(--card-bg);
|
| 163 |
+
border: 1px solid var(--glass-border);
|
| 164 |
+
border-radius: var(--radius-lg);
|
| 165 |
+
padding: 2.5rem;
|
| 166 |
+
box-shadow: var(--shadow-light);
|
| 167 |
+
text-align: center;
|
| 168 |
+
position: relative;
|
| 169 |
+
transition: var(--transition);
|
| 170 |
+
overflow: hidden;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.fact-card:hover {
|
| 174 |
+
box-shadow: var(--shadow-hover);
|
| 175 |
+
transform: translateY(-5px);
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.cat-illustration {
|
| 179 |
+
width: 80px;
|
| 180 |
+
height: 80px;
|
| 181 |
+
margin: 0 auto 1.5rem;
|
| 182 |
+
background: #FFF0E6;
|
| 183 |
+
border-radius: 50%;
|
| 184 |
+
display: flex;
|
| 185 |
+
align-items: center;
|
| 186 |
+
justify-content: center;
|
| 187 |
+
font-size: 2.5rem;
|
| 188 |
+
color: var(--primary-color);
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
#fact-display {
|
| 192 |
+
font-size: 1.25rem;
|
| 193 |
+
font-weight: 600;
|
| 194 |
+
min-height: 120px;
|
| 195 |
+
display: flex;
|
| 196 |
+
align-items: center;
|
| 197 |
+
justify-content: center;
|
| 198 |
+
margin-bottom: 2rem;
|
| 199 |
+
color: var(--accent-color);
|
| 200 |
+
opacity: 1;
|
| 201 |
+
transition: opacity 0.3s ease;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
#fact-display.fade-out {
|
| 205 |
+
opacity: 0;
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
.controls {
|
| 209 |
+
display: flex;
|
| 210 |
+
gap: 1rem;
|
| 211 |
+
justify-content: center;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
.btn-primary {
|
| 215 |
+
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
|
| 216 |
+
color: white;
|
| 217 |
+
padding: 1rem 2rem;
|
| 218 |
+
border-radius: 50px;
|
| 219 |
+
font-weight: 700;
|
| 220 |
+
font-size: 1rem;
|
| 221 |
+
box-shadow: 0 4px 15px rgba(255, 142, 83, 0.4);
|
| 222 |
+
transition: var(--transition);
|
| 223 |
+
display: flex;
|
| 224 |
+
align-items: center;
|
| 225 |
+
gap: 8px;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
.btn-primary:hover {
|
| 229 |
+
transform: scale(1.05);
|
| 230 |
+
box-shadow: 0 6px 20px rgba(255, 142, 83, 0.6);
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.btn-primary:active {
|
| 234 |
+
transform: scale(0.95);
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
.btn-secondary {
|
| 238 |
+
background: white;
|
| 239 |
+
color: var(--accent-color);
|
| 240 |
+
border: 2px solid #eee;
|
| 241 |
+
padding: 1rem;
|
| 242 |
+
border-radius: 50%;
|
| 243 |
+
width: 54px;
|
| 244 |
+
height: 54px;
|
| 245 |
+
display: flex;
|
| 246 |
+
align-items: center;
|
| 247 |
+
justify-content: center;
|
| 248 |
+
transition: var(--transition);
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
.btn-secondary:hover {
|
| 252 |
+
border-color: var(--primary-color);
|
| 253 |
+
color: var(--primary-color);
|
| 254 |
+
transform: rotate(15deg);
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
/* --- Toast Notification --- */
|
| 258 |
+
.toast {
|
| 259 |
+
position: fixed;
|
| 260 |
+
bottom: 30px;
|
| 261 |
+
left: 50%;
|
| 262 |
+
transform: translateX(-50%) translateY(100px);
|
| 263 |
+
background: var(--accent-color);
|
| 264 |
+
color: white;
|
| 265 |
+
padding: 12px 24px;
|
| 266 |
+
border-radius: 50px;
|
| 267 |
+
font-size: 0.9rem;
|
| 268 |
+
font-weight: 600;
|
| 269 |
+
opacity: 0;
|
| 270 |
+
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
| 271 |
+
z-index: 2000;
|
| 272 |
+
display: flex;
|
| 273 |
+
align-items: center;
|
| 274 |
+
gap: 10px;
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
.toast.show {
|
| 278 |
+
transform: translateX(-50%) translateY(0);
|
| 279 |
+
opacity: 1;
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
/* --- Right Column: Visual Grid --- */
|
| 283 |
+
.visual-section {
|
| 284 |
+
position: relative;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.bento-grid {
|
| 288 |
+
display: grid;
|
| 289 |
+
grid-template-columns: repeat(2, 1fr);
|
| 290 |
+
grid-template-rows: repeat(2, 200px);
|
| 291 |
+
gap: 1.5rem;
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
.grid-item {
|
| 295 |
+
border-radius: var(--radius-lg);
|
| 296 |
+
overflow: hidden;
|
| 297 |
+
position: relative;
|
| 298 |
+
box-shadow: var(--shadow-light);
|
| 299 |
+
cursor: pointer;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.grid-item img {
|
| 303 |
+
width: 100%;
|
| 304 |
+
height: 100%;
|
| 305 |
+
object-fit: cover;
|
| 306 |
+
transition: transform 0.6s ease;
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
.grid-item:hover img {
|
| 310 |
+
transform: scale(1.1);
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
.grid-item.large {
|
| 314 |
+
grid-column: span 2;
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
.grid-overlay {
|
| 318 |
+
position: absolute;
|
| 319 |
+
bottom: 0;
|
| 320 |
+
left: 0;
|
| 321 |
+
width: 100%;
|
| 322 |
+
padding: 1.5rem;
|
| 323 |
+
background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
|
| 324 |
+
color: white;
|
| 325 |
+
opacity: 0;
|
| 326 |
+
transform: translateY(20px);
|
| 327 |
+
transition: var(--transition);
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
.grid-item:hover .grid-overlay {
|
| 331 |
+
opacity: 1;
|
| 332 |
+
transform: translateY(0);
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
.grid-overlay h3 {
|
| 336 |
+
font-family: var(--font-heading);
|
| 337 |
+
font-size: 1.2rem;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
/* --- Floating Elements --- */
|
| 341 |
+
.floating-shape {
|
| 342 |
+
position: absolute;
|
| 343 |
+
z-index: -1;
|
| 344 |
+
opacity: 0.6;
|
| 345 |
+
filter: blur(40px);
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
.shape-1 {
|
| 349 |
+
top: -50px;
|
| 350 |
+
right: -50px;
|
| 351 |
+
width: 200px;
|
| 352 |
+
height: 200px;
|
| 353 |
+
background: var(--secondary-color);
|
| 354 |
+
border-radius: 50%;
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
.shape-2 {
|
| 358 |
+
bottom: 50px;
|
| 359 |
+
left: -30px;
|
| 360 |
+
width: 150px;
|
| 361 |
+
height: 150px;
|
| 362 |
+
background: #FF8E53;
|
| 363 |
+
border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
|
| 364 |
+
animation: morph 8s ease-in-out infinite;
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
/* --- Footer --- */
|
| 368 |
+
footer {
|
| 369 |
+
margin-top: 4rem;
|
| 370 |
+
text-align: center;
|
| 371 |
+
padding: 2rem;
|
| 372 |
+
border-top: 1px solid rgba(0,0,0,0.05);
|
| 373 |
+
color: #888;
|
| 374 |
+
font-size: 0.9rem;
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
/* --- Animations --- */
|
| 378 |
+
@keyframes bounce {
|
| 379 |
+
0%, 100% { transform: translateY(0); }
|
| 380 |
+
50% { transform: translateY(-5px); }
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
@keyframes morph {
|
| 384 |
+
0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
|
| 385 |
+
34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
|
| 386 |
+
67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
|
| 387 |
+
100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
/* --- Responsive Design --- */
|
| 391 |
+
@media (max-width: 900px) {
|
| 392 |
+
main {
|
| 393 |
+
grid-template-columns: 1fr;
|
| 394 |
+
gap: 2rem;
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
.hero-text h1 { font-size: 2.5rem; }
|
| 398 |
+
.bento-grid { grid-template-rows: repeat(2, 150px); }
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
@media (max-width: 600px) {
|
| 402 |
+
header { padding: 1rem; flex-direction: column; gap: 1rem; }
|
| 403 |
+
.nav-links { display: none; } /* Simplified for mobile */
|
| 404 |
+
.hero-text h1 { font-size: 2rem; }
|
| 405 |
+
.btn-primary { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
|
| 406 |
+
.bento-grid { grid-template-columns: 1fr; grid-template-rows: repeat(4, 200px); }
|
| 407 |
+
.grid-item.large { grid-column: span 1; }
|
| 408 |
+
}
|
| 409 |
+
</style>
|
| 410 |
+
</head>
|
| 411 |
+
<body>
|
| 412 |
+
|
| 413 |
+
<header>
|
| 414 |
+
<div class="logo">
|
| 415 |
+
<i class="fa-solid fa-cat"></i>
|
| 416 |
+
<span>FelineFacts</span>
|
| 417 |
+
</div>
|
| 418 |
+
<nav class="nav-links">
|
| 419 |
+
<a href="#">Home</a>
|
| 420 |
+
<a href="#">Breeds</a>
|
| 421 |
+
<a href="#">Care Tips</a>
|
| 422 |
+
<a href="#">About</a>
|
| 423 |
+
</nav>
|
| 424 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="branding-link">
|
| 425 |
+
Built with anycoder <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em;"></i>
|
| 426 |
+
</a>
|
| 427 |
+
</header>
|
| 428 |
+
|
| 429 |
+
<main>
|
| 430 |
+
<!-- Left Column: Content & Generator -->
|
| 431 |
+
<section class="generator-section">
|
| 432 |
+
<div class="hero-text">
|
| 433 |
+
<h1>Discover Amazing <span>Cat Facts</span></h1>
|
| 434 |
+
<p>Dive into the fascinating world of felines. Click the button below to uncover a random fact about our purr-fect friends.</p>
|
| 435 |
+
</div>
|
| 436 |
+
|
| 437 |
+
<article class="fact-card">
|
| 438 |
+
<div class="cat-illustration">
|
| 439 |
+
<i class="fa-solid fa-paw"></i>
|
| 440 |
+
</div>
|
| 441 |
+
<div id="fact-display">
|
| 442 |
+
Loading a purr-fect fact for you...
|
| 443 |
+
</div>
|
| 444 |
+
<div class="controls">
|
| 445 |
+
<button class="btn-secondary" id="copy-btn" aria-label="Copy to Clipboard" title="Copy Fact">
|
| 446 |
+
<i class="fa-regular fa-copy"></i>
|
| 447 |
+
</button>
|
| 448 |
+
<button class="btn-primary" id="generate-btn">
|
| 449 |
+
<i class="fa-solid fa-shuffle"></i> New Fact
|
| 450 |
+
</button>
|
| 451 |
+
</div>
|
| 452 |
+
</article>
|
| 453 |
+
</section>
|
| 454 |
+
|
| 455 |
+
<!-- Right Column: Visual Gallery -->
|
| 456 |
+
<section class="visual-section">
|
| 457 |
+
<div class="floating-shape shape-1"></div>
|
| 458 |
+
<div class="floating-shape shape-2"></div>
|
| 459 |
+
|
| 460 |
+
<div class="bento-grid">
|
| 461 |
+
<div class="grid-item large">
|
| 462 |
+
<img src="https://picsum.photos/seed/cat1/600/400" alt="A cute cat looking up">
|
| 463 |
+
<div class="grid-overlay">
|
| 464 |
+
<h3>Ancient Companions</h3>
|
| 465 |
+
<p>Cats have been domesticated for over 4,000 years.</p>
|
| 466 |
+
</div>
|
| 467 |
+
</div>
|
| 468 |
+
<div class="grid-item">
|
| 469 |
+
<img src="https://picsum.photos/seed/cat2/300/300" alt="Close up of cat eyes">
|
| 470 |
+
<div class="grid-overlay">
|
| 471 |
+
<h3>Night Vision</h3>
|
| 472 |
+
</div>
|
| 473 |
+
</div>
|
| 474 |
+
<div class="grid-item">
|
| 475 |
+
<img src="https://picsum.photos/seed/cat3/300/300" alt="Cat sleeping">
|
| 476 |
+
<div class="grid-overlay">
|
| 477 |
+
<h3>Professional Sleepers</h3>
|
| 478 |
+
</div>
|
| 479 |
+
</div>
|
| 480 |
+
</div>
|
| 481 |
+
</section>
|
| 482 |
+
</main>
|
| 483 |
+
|
| 484 |
+
<!-- Toast Notification Element -->
|
| 485 |
+
<div id="toast" class="toast">
|
| 486 |
+
<i class="fa-solid fa-check-circle"></i> Fact copied to clipboard!
|
| 487 |
+
</div>
|
| 488 |
+
|
| 489 |
+
<footer>
|
| 490 |
+
<p>© 2023 FelineFacts. Made with <i class="fa-solid fa-heart" style="color: var(--primary-color)"></i> for cat lovers.</p>
|
| 491 |
+
</footer>
|
| 492 |
+
|
| 493 |
+
<script>
|
| 494 |
+
// --- Data: A robust list of cat facts ---
|
| 495 |
+
const catFacts = [
|
| 496 |
+
"A group of cats is called a clowder.",
|
| 497 |
+
"Cats spend 70% of their lives sleeping.",
|
| 498 |
+
"A cat's hearing is better than a dog's.",
|
| 499 |
+
"Cats can rotate their ears 180 degrees.",
|
| 500 |
+
"The oldest known pet cat was found in a 9,500 year old grave on Cyprus.",
|
| 501 |
+
"Cats have over 20 vocalizations, including the meow.",
|
| 502 |
+
"A cat's nose print is unique, much like a human fingerprint.",
|
| 503 |
+
"Cats can jump up to 6 times their length.",
|
| 504 |
+
"The first cat in space was a French cat named Félicette in 1963.",
|
| 505 |
+
"Cats have 230 bones, while humans only have 206.",
|
| 506 |
+
"A cat's brain is 90% similar to a human's brain.",
|
| 507 |
+
"Cats can't taste sweetness due to a genetic mutation.",
|
| 508 |
+
"The average cat can run at speeds of up to 30 mph.",
|
| 509 |
+
"Cats sweat through their paws.",
|
| 510 |
+
"A cat's whiskers are roughly as wide as their body.",
|
| 511 |
+
"Ancient Egyptians shaved their eyebrows when their cat died.",
|
| 512 |
+
"Cats can drink seawater to rehydrate.",
|
| 513 |
+
"A cat's purr vibrates at 25-150 Hz, which can promote healing of bones.",
|
| 514 |
+
"Cats have a specialized collarbone that allows them to always land on their feet.",
|
| 515 |
+
"The technical term for a hairball is a 'bezoar'.",
|
| 516 |
+
"Cats can recognize their owner's voice but choose to ignore it.",
|
| 517 |
+
"A cat's field of vision is about 200 degrees.",
|
| 518 |
+
"Cats spend about 30-50% of their day grooming themselves.",
|
| 519 |
+
"The Japanese Bobtail cat is a symbol of good luck in Japan.",
|
| 520 |
+
"Cats have a third eyelid called the 'haw' to protect their eyes."
|
| 521 |
+
];
|
| 522 |
+
|
| 523 |
+
// --- DOM Elements ---
|
| 524 |
+
const factDisplay = document.getElementById('fact-display');
|
| 525 |
+
const generateBtn = document.getElementById('generate-btn');
|
| 526 |
+
const copyBtn = document.getElementById('copy-btn');
|
| 527 |
+
const toast = document.getElementById('toast');
|
| 528 |
+
|
| 529 |
+
// --- State ---
|
| 530 |
+
let currentFact = "";
|
| 531 |
+
|
| 532 |
+
// --- Functions ---
|
| 533 |
+
|
| 534 |
+
/**
|
| 535 |
+
* Gets a random fact from the array, ensuring it's different from the current one
|
| 536 |
+
*/
|
| 537 |
+
function getRandomFact() {
|
| 538 |
+
let newFact;
|
| 539 |
+
do {
|
| 540 |
+
const randomIndex = Math.floor(Math.random() * catFacts.length);
|
| 541 |
+
newFact = catFacts[randomIndex];
|
| 542 |
+
} while (newFact === currentFact && catFacts.length > 1);
|
| 543 |
+
|
| 544 |
+
return newFact;
|
| 545 |
+
}
|
| 546 |
+
|
| 547 |
+
/**
|
| 548 |
+
* Updates the UI with a new fact using a fade transition
|
| 549 |
+
*/
|
| 550 |
+
function updateFact() {
|
| 551 |
+
// Add fade-out class
|
| 552 |
+
factDisplay.classList.add('fade-out');
|
| 553 |
+
|
| 554 |
+
// Wait for transition to finish before changing text
|
| 555 |
+
setTimeout(() => {
|
| 556 |
+
currentFact = getRandomFact();
|
| 557 |
+
factDisplay.textContent = currentFact;
|
| 558 |
+
factDisplay.classList.remove('fade-out');
|
| 559 |
+
}, 300);
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
/**
|
| 563 |
+
* Copies the current fact to the clipboard and shows a toast
|
| 564 |
+
*/
|
| 565 |
+
function copyToClipboard() {
|
| 566 |
+
if (!currentFact) return;
|
| 567 |
+
|
| 568 |
+
navigator.clipboard.writeText(currentFact).then(() => {
|
| 569 |
+
showToast();
|
| 570 |
+
}).catch(err => {
|
| 571 |
+
console.error('Failed to copy text: ', err);
|
| 572 |
+
});
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
/**
|
| 576 |
+
* Shows the toast notification
|
| 577 |
+
*/
|
| 578 |
+
function showToast() {
|
| 579 |
+
toast.classList.add('show');
|
| 580 |
+
setTimeout(() => {
|
| 581 |
+
toast.classList.remove('show');
|
| 582 |
+
}, 3000);
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
// --- Event Listeners ---
|
| 586 |
+
generateBtn.addEventListener('click', () => {
|
| 587 |
+
// Add a small rotation animation to the icon for feedback
|
| 588 |
+
const icon = generateBtn.querySelector('i');
|
| 589 |
+
icon.style.transition = 'transform 0.5s ease';
|
| 590 |
+
icon.style.transform = 'rotate(180deg)';
|
| 591 |
+
setTimeout(() => icon.style.transform = 'rotate(0deg)', 500);
|
| 592 |
+
|
| 593 |
+
updateFact();
|
| 594 |
+
});
|
| 595 |
+
|
| 596 |
+
copyBtn.addEventListener('click', copyToClipboard);
|
| 597 |
+
|
| 598 |
+
// --- Initialization ---
|
| 599 |
+
// Load a fact on page load
|
| 600 |
+
window.addEventListener('DOMContentLoaded', () => {
|
| 601 |
+
currentFact = getRandomFact(); // Set initial state without animation
|
| 602 |
+
factDisplay.textContent = currentFact;
|
| 603 |
+
});
|
| 604 |
+
|
| 605 |
+
</script>
|
| 606 |
+
</body>
|
| 607 |
+
</html>
|