Skip to content

Commit 3a59d6c

Browse files
committed
Add onclick for blog block
1 parent 0bd0941 commit 3a59d6c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

templates/partials/blogs.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
<h2 class="text-3xl font-bold text-gray-900 mb-12">Latest Blog Entries</h2>
66
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6" id="capabilities-grid">
77
{#for post in site.collections.posts.subList(0, 6)}
8-
<div class="capability-card bg-white rounded-xl p-6 shadow-md"
9-
style="opacity: 0; animation: fadeInUp 0.6s ease-out 0.{post_index}s forwards;">
8+
<div id="blog_post-{post_index}" class="capability-card bg-white rounded-xl p-6 shadow-md cursor-pointer"
9+
style="opacity: 0; animation: fadeInUp 0.6s ease-out 0.{post_index}s forwards;"
10+
onclick="window.location.href='{post.url.absolute}'">
1011
{#if post.data.containsKey("image")}
1112
<div class="text-5xl mb-4">
1213
<img src="{post.image(post.data.image)}" style="max-height: 50px">

0 commit comments

Comments
 (0)