|
| 1 | +/* === Blog Carousel === */ |
| 2 | +.blog-carousel { padding: 60px 0; } |
| 3 | +.carousel-wrapper { |
| 4 | + position: relative; display: flex; align-items: center; gap: 16px; |
| 5 | +} |
| 6 | +.carousel-container { |
| 7 | + flex: 1; overflow: hidden; position: relative; |
| 8 | +} |
| 9 | +.carousel-track { |
| 10 | + display: flex; gap: 24px; transition: transform 0.5s ease; will-change: transform; |
| 11 | +} |
| 12 | +.blog-card { |
| 13 | + flex: 0 0 320px; min-width: 0; overflow: hidden; |
| 14 | + background: var(--bg-card); border: 1px solid var(--border-card); |
| 15 | + border-radius: var(--radius-lg); padding: 24px; |
| 16 | + transition: all 0.3s ease; cursor: pointer; |
| 17 | +} |
| 18 | +.blog-card:hover { |
| 19 | + border-color: rgba(255,255,255,0.12); transform: translateY(-2px); |
| 20 | +} |
| 21 | +.blog-card h3 { |
| 22 | + font-size: 16px; font-weight: 600; margin-bottom: 10px; |
| 23 | + color: var(--text-primary); letter-spacing: -0.2px; |
| 24 | + display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; |
| 25 | + overflow: hidden; |
| 26 | +} |
| 27 | +.blog-card .post-image img { |
| 28 | + width: 100%; height: 160px; object-fit: cover; |
| 29 | + border-radius: 8px; margin-bottom: 12px; |
| 30 | +} |
| 31 | +.blog-card .blog-excerpt { |
| 32 | + color: var(--text-secondary); font-size: 13px; font-weight: 300; |
| 33 | + line-height: 1.6; margin-bottom: 16px; |
| 34 | + display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; |
| 35 | + overflow: hidden; |
| 36 | +} |
| 37 | +.blog-card .blog-meta { |
| 38 | + display: flex; gap: 12px; align-items: center; |
| 39 | + font-size: 13px; color: var(--text-tertiary); |
| 40 | +} |
| 41 | +.blog-card .blog-date { display: flex; align-items: center; gap: 4px; } |
| 42 | +.carousel-btn { |
| 43 | + background: var(--bg-card); border: 1px solid var(--border-card); |
| 44 | + border-radius: 50%; width: 40px; height: 40px; |
| 45 | + display: flex; align-items: center; justify-content: center; |
| 46 | + cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; color: var(--text-secondary); |
| 47 | +} |
| 48 | +.carousel-btn:hover { border-color: rgba(255,255,255,0.15); color: var(--text-primary); } |
| 49 | +.carousel-btn:disabled { opacity: 0.3; cursor: not-allowed; } |
| 50 | +.carousel-dots { |
| 51 | + display: flex; justify-content: center; gap: 8px; margin-top: 20px; |
| 52 | +} |
| 53 | +.carousel-dot { |
| 54 | + width: 8px; height: 8px; border-radius: 50%; |
| 55 | + background: var(--border-card); cursor: pointer; transition: all 0.3s ease; border: none; |
| 56 | +} |
| 57 | +.carousel-dot.active { |
| 58 | + background: var(--accent); width: 24px; border-radius: 4px; |
| 59 | +} |
| 60 | + |
| 61 | +/* === Skeleton === */ |
| 62 | +.skeleton { pointer-events: none; cursor: default; } |
| 63 | +.skeleton-title, .skeleton-text { |
| 64 | + background: linear-gradient(90deg, var(--border-card) 25%, rgba(255,255,255,0.06) 50%, var(--border-card) 75%); |
| 65 | + background-size: 200% 100%; |
| 66 | + animation: skeleton-loading 1.5s ease-in-out infinite; |
| 67 | + border-radius: 4px; |
| 68 | +} |
| 69 | +.skeleton-title { height: 24px; width: 80%; margin-bottom: 16px; } |
| 70 | +.skeleton-text { height: 16px; margin-bottom: 8px; } |
| 71 | +.skeleton-text:last-child { width: 60%; } |
| 72 | +@keyframes skeleton-loading { |
| 73 | + 0% { background-position: 200% 0; } |
| 74 | + 100% { background-position: -200% 0; } |
| 75 | +} |
| 76 | + |
| 77 | +/* === Mobile Carousel === */ |
| 78 | +@media (max-width: 768px) { |
| 79 | + .carousel-btn { display: none; } |
| 80 | + .carousel-wrapper { gap: 0; } |
| 81 | + .carousel-track { gap: 16px; padding: 0; } |
| 82 | + .blog-card { flex: none; width: calc(100vw - 72px); padding: 24px; } |
| 83 | + .blog-card h3 { -webkit-line-clamp: 3; font-size: 15px; } |
| 84 | + .blog-card .blog-excerpt { -webkit-line-clamp: 4; } |
| 85 | + .blog-card .post-image img { height: 180px; } |
| 86 | + .carousel-container { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; } |
| 87 | + .blog-card { scroll-snap-align: center; } |
| 88 | +} |
0 commit comments