Make blog cards clickable - wrap in anchor tags matching gallery pattern

This commit is contained in:
twotalesanimation
2025-12-08 11:35:22 +02:00
parent bbc0aecbcb
commit 5808788b9e
6 changed files with 442 additions and 711 deletions

View File

@@ -58,20 +58,13 @@ $conn->close();
}
.album-card {
position: relative;
border-radius: 12px;
overflow: hidden;
background: white;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
transition: all 0.3s ease;
display: flex;
flex-direction: column;
height: 100%;
}
.album-card:hover {
transform: translateY(-8px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
border: 1px solid #e0e0e0;
}
.album-image-wrapper {
@@ -86,11 +79,6 @@ $conn->close();
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.album-card:hover .album-image-wrapper img {
transform: scale(1.05);
}
.album-image-wrapper .no-image {
@@ -163,49 +151,21 @@ $conn->close();
display: flex;
gap: 8px;
margin-top: auto;
align-items: center;
}
.album-view-btn {
flex: 1;
padding: 8px 12px;
background: #667eea;
color: white;
.album-edit-icon {
background: none;
border: none;
border-radius: 30px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: background 0.3s;
text-decoration: none;
text-align: center;
display: block;
color: inherit;
padding: 0;
font-size: 1.2rem;
transition: color 0.2s ease;
}
.album-view-btn:hover {
background: #764ba2;
text-decoration: none;
color: white;
}
.album-edit-btn {
padding: 8px 12px;
background: white;
.album-edit-icon:hover {
color: #667eea;
border: 1px solid #667eea;
border-radius: 6px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
text-decoration: none;
display: inline-block;
text-align: center;
}
.album-edit-btn:hover {
background: #667eea;
color: white;
text-decoration: none;
}
.create-album-btn {
@@ -260,7 +220,8 @@ require_once($rootPath . '/components/banner.php');
<?php if (count($albums) > 0): ?>
<div class="gallery-grid">
<?php foreach ($albums as $album): ?>
<div class="album-card">
<a href="view_album?id=<?php echo $album['album_id']; ?>" style="text-decoration: none; color: inherit;">
<div class="album-card">
<div class="album-image-wrapper">
<?php if ($album['cover_image']): ?>
<img src="<?php echo htmlspecialchars($album['cover_image']); ?>" alt="<?php echo htmlspecialchars($album['title']); ?>">
@@ -289,17 +250,15 @@ require_once($rootPath . '/components/banner.php');
</div>
<div class="album-actions">
<a href="view_album?id=<?php echo $album['album_id']; ?>" class="album-view-btn">
View
</a>
<?php if ($album['user_id'] == $current_user_id): ?>
<a href="edit_album?id=<?php echo $album['album_id']; ?>" class="album-edit-btn">
<a href="edit_album?id=<?php echo $album['album_id']; ?>" class="album-edit-icon" title="Edit">
<i class="far fa-edit"></i>
</a>
<?php endif; ?>
</div>
</div>
</div>
</a>
<?php endforeach; ?>
</div>
<?php else: ?>