|
21 | 21 | --shadow:0 2px 6px rgba(0,0,0,0.08); --radius:8px; --transition:all 0.2s ease; |
22 | 22 | } |
23 | 23 | * {margin:0; padding:0; box-sizing:border-box;} |
24 | | - body {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background:var(--bg); color:var(--text); line-height:1.5;} |
| 24 | + body {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background:var(--bg); color:var(--text); line-height:1.5;background-image: url('img/crossword_pattern.png');} |
25 | 25 | .container {width:100%; max-width:1280px; margin:0 auto; padding:0 1rem;} |
26 | 26 | header {background:var(--card); box-shadow:var(--shadow); position:sticky; top:0; z-index:100;} |
27 | 27 | .header-content {height:70px; display:flex; align-items:center; justify-content:space-between;} |
|
49 | 49 | .view-all {color:var(--primary); text-decoration:none; font-weight:500;} |
50 | 50 | .grid-view {display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:1.25rem; margin-bottom:3rem;} |
51 | 51 | .list-view {display:flex; flex-direction:column; gap:1rem; margin-bottom:3rem;} |
52 | | - .card {background:var(--card); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); transition:var(--transition); height:100%; display:flex; flex-direction:column; position:relative;} |
| 52 | + .card {cursor: pointer; background:var(--card); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); transition:var(--transition); height:100%; display:flex; flex-direction:column; position:relative;} |
53 | 53 | .card:hover {box-shadow:0 8px 16px rgba(0,0,0,0.1); transform:translateY(-4px);} |
54 | 54 | .card::before {content:''; position:absolute; bottom:0; left:0; width:100%; height:3px; background:var(--primary); transform:scaleX(0); transform-origin:left; transition:transform 0.3s ease; z-index:1;} |
55 | 55 | .card:hover::before {transform:scaleX(1);} |
|
68 | 68 | .card-title {font-size:1rem; font-weight:600; margin-bottom:0.5rem; color:var(--dark); display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;} |
69 | 69 | .card-desc {font-size:0.875rem; color:#495057; line-height:1.4; flex-grow:1;} |
70 | 70 | .card-desc.truncated {overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;} |
71 | | - .read-more {color:var(--primary); background:none; border:none; font-size:0.8rem; cursor:pointer; padding:0; margin-bottom:1rem; align-self:flex-start; transition:var(--transition);} |
| 71 | + .read-more {color:var(--primary); background:none; border:none; font-size:0.8rem; cursor:pointer; padding:2rem; margin:-2rem -2rem -1rem -2rem; align-self:flex-start; transition:var(--transition);} |
72 | 72 | .read-more:hover {color:var(--primary-hover); text-decoration:underline;} |
73 | 73 | .card-btn {display:inline-block; padding:0.5rem 1rem; border-radius:var(--radius); text-decoration:none; font-weight:500; text-align:center; transition:var(--transition); margin-top:auto; border:none;} |
74 | 74 | .card-btn.game {background:var(--primary); color:white;} |
@@ -398,6 +398,16 @@ <h3 class="card-title" title="${item.title}">${item.title}</h3> |
398 | 398 | this.textContent = descContainer.classList.contains('truncated') ? 'Read more' : 'Read less'; |
399 | 399 | }); |
400 | 400 | }); |
| 401 | + |
| 402 | + // make full card clickable |
| 403 | + document.querySelectorAll('.card').forEach(card => { |
| 404 | + card.addEventListener('click', e => { |
| 405 | + if (!e.target.closest('.read-more')) { |
| 406 | + console.log(e.currentTarget); |
| 407 | + card.querySelector('a').click(); |
| 408 | + } |
| 409 | + }); |
| 410 | + }) |
401 | 411 | } |
402 | 412 |
|
403 | 413 | // Sort items |
|
0 commit comments