Skip to content

Commit 6c5e2d3

Browse files
committed
Make the whole block linkable
1 parent 639ec30 commit 6c5e2d3

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

_sass/_latest-news.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
display: flex;
5353
flex-direction: column;
5454
gap: 12px;
55+
transition: background 0.15s ease;
56+
}
57+
58+
.news-card:hover {
59+
background: var(--color-bg-warm);
5560
}
5661

5762
.news-card + .news-card {
@@ -81,13 +86,9 @@
8186
font-size: 13px;
8287
font-weight: 400;
8388
color: var(--color-red);
84-
transition: opacity 0.15s ease;
8589
margin-top: 4px;
8690
}
8791

88-
.news-card__read-more:hover {
89-
opacity: 0.75;
90-
}
9192

9293
@media (max-width: 768px) {
9394
.latest-news__heading {

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ <h2 class="latest-news__heading" id="latest-news-heading">Latest News</h2>
3232
<a href="https://github.com/mruby/mruby/releases" class="latest-news__all-link">All releases</a>
3333
</div>
3434
<div class="latest-news__divider"></div>
35-
<ul class="news-cards" role="list">
35+
<div class="news-cards">
3636
{% for post in site.posts limit:3 %}
37-
<li class="news-card">
37+
<a href="{{ post.url }}" class="news-card">
3838
<time class="news-card__date" datetime="{{ post.date | date: '%Y-%m-%d' }}">{{ post.date | date: "%-d %b %Y" | upcase }}</time>
3939
<h3 class="news-card__title">{{ post.title }}</h3>
40-
<a href="{{ post.url }}" class="news-card__read-more">&#8212; Read more</a>
41-
</li>
40+
<span class="news-card__read-more">&#8212; Read more</span>
41+
</a>
4242
{% endfor %}
43-
</ul>
43+
</div>
4444
</div>
4545
</section>

0 commit comments

Comments
 (0)