refactor: collapse entry card article+a to flat <a>, unify hover targets across card types
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPJztrVGbwic2xTG7G9fjM
This commit is contained in:
@@ -90,12 +90,13 @@ body::after {
|
||||
.feed { display: flex; flex-direction: column; gap: var(--space-12); }
|
||||
.feed-empty { color: var(--color-ink-muted); font-style: italic; }
|
||||
|
||||
.entry-card { border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-12); }
|
||||
|
||||
.entry-card-inner {
|
||||
.entry-card {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding-bottom: var(--space-12);
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
/* Card: photo variant */
|
||||
@@ -117,7 +118,7 @@ body::after {
|
||||
transition: transform 0.45s ease;
|
||||
}
|
||||
|
||||
.entry-card-inner:hover .entry-card-photo img { transform: scale(1.04); }
|
||||
.entry-card:hover .entry-card-photo img { transform: scale(1.04); }
|
||||
|
||||
.entry-card-photo-overlay {
|
||||
position: absolute;
|
||||
@@ -180,7 +181,7 @@ body::after {
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.entry-card-inner:hover .entry-title { color: var(--color-accent); }
|
||||
.entry-card:hover .entry-title { color: var(--color-accent); }
|
||||
|
||||
.entry-excerpt {
|
||||
font-size: var(--text-base);
|
||||
|
||||
@@ -119,8 +119,7 @@ feedMap.on('load', function () {
|
||||
{% endif %}
|
||||
|
||||
{% if item.type == 'journal' %}
|
||||
<article class="entry-card" id="entry-{{ entry.slug }}" data-lat="{{ entry.header.lat }}" data-lng="{{ entry.header.lng }}">
|
||||
<a class="entry-card-inner" href="{{ entry.url }}">
|
||||
<a class="entry-card" id="entry-{{ entry.slug }}" data-lat="{{ entry.header.lat }}" data-lng="{{ entry.header.lng }}" href="{{ entry.url }}">
|
||||
{% if hero %}
|
||||
<div class="entry-card-photo">
|
||||
<img src="{{ hero.cropResize(720, 405).url }}" alt="{{ entry.title }}" loading="lazy">
|
||||
@@ -159,10 +158,8 @@ feedMap.on('load', function () {
|
||||
<span class="entry-read-more">Read entry →</span>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{% else %}
|
||||
<article class="entry-card entry-card--story" id="entry-{{ entry.slug }}">
|
||||
<a class="entry-card-inner" href="{{ entry.url }}">
|
||||
<a class="entry-card entry-card--story" id="entry-{{ entry.slug }}" href="{{ entry.url }}">
|
||||
{% if hero %}
|
||||
<div class="entry-card-photo entry-card-photo--story">
|
||||
<img src="{{ hero.cropResize(720, 405).url }}" alt="{{ entry.title }}" loading="lazy">
|
||||
@@ -173,7 +170,6 @@ feedMap.on('load', function () {
|
||||
<h2 class="entry-title">{{ entry.title }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
@@ -222,8 +222,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if item.type == 'journal' %}
|
||||
<article class="entry-card" id="entry-{{ entry.slug }}" data-type="journal" data-lat="{{ entry.header.lat }}" data-lng="{{ entry.header.lng }}">
|
||||
<a class="entry-card-inner" href="{{ entry.url }}">
|
||||
<a class="entry-card" id="entry-{{ entry.slug }}" data-type="journal" data-lat="{{ entry.header.lat }}" data-lng="{{ entry.header.lng }}" href="{{ entry.url }}">
|
||||
{% if hero %}
|
||||
<div class="entry-card-photo">
|
||||
<img src="{{ hero.cropResize(720, 405).url }}" alt="{{ entry.title }}" loading="lazy">
|
||||
@@ -262,10 +261,8 @@
|
||||
<span class="entry-read-more">Read entry →</span>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{% else %}
|
||||
<article class="entry-card entry-card--story" id="entry-{{ entry.slug }}" data-type="story">
|
||||
<a class="entry-card-inner" href="{{ entry.url }}">
|
||||
<a class="entry-card entry-card--story" id="entry-{{ entry.slug }}" data-type="story" href="{{ entry.url }}">
|
||||
{% if hero %}
|
||||
<div class="entry-card-photo entry-card-photo--story">
|
||||
<img src="{{ hero.cropResize(720, 405).url }}" alt="{{ entry.title }}" loading="lazy">
|
||||
@@ -276,7 +273,6 @@
|
||||
<h2 class="entry-title">{{ entry.title }}</h2>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user