Make blog list cards fully clickable
This commit is contained in:
+17
-7
@@ -186,30 +186,40 @@ figcaption.post-caption {
|
||||
}
|
||||
.footer-roadmap { padding: 1rem 0; }
|
||||
|
||||
/* ===== Homepage post list: entire card is clickable ===== */
|
||||
#post-list .home-post-item {
|
||||
/* ===== Post lists (home + /blog): whole card is one clickable link ===== */
|
||||
#post-list .post-card {
|
||||
display: block;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.75rem 1rem;
|
||||
margin: 0 -1rem 0.5rem;
|
||||
margin: 0 -1rem;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
|
||||
#post-list .home-post-item h3 {
|
||||
#post-list .post-card h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#post-list .home-post-item:hover {
|
||||
#post-list .post-card:hover {
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
html.dark #post-list .home-post-item:hover {
|
||||
html.dark #post-list .post-card:hover {
|
||||
background-color: rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
#post-list .home-post-item:focus-visible {
|
||||
#post-list .post-card:focus-visible {
|
||||
outline: 2px solid var(--hx-color-primary-500, currentColor);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Home: spacing between cards */
|
||||
#post-list .home-post-item {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* /blog list: keep the original item rhythm (旧 hx:mb-10 + h3 mt-8 的视觉间距) */
|
||||
#post-list .blog-post-item {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user