Make blog cover a link
This commit is contained in:
parent
62c0827ff5
commit
905fe54fa3
@ -219,15 +219,19 @@ p.error {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.cover-link {
|
||||
margin: 0;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
.cover {
|
||||
min-height: 10em;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
margin: 0px;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
|
@ -18,7 +18,10 @@
|
||||
@for blog in blogs {
|
||||
<div class="card">
|
||||
@if blog.banner_id.is_some() {
|
||||
<div class="cover" style="background-image: url('@Html(blog.banner_url(ctx.0).unwrap_or_default())')"></div>
|
||||
<a class="cover-link" href="@uri!(blogs::details: name = &blog.actor_id, page = _)">
|
||||
<div class="cover" style="background-image: url('@Html(blog.banner_url(ctx.0).unwrap_or_default())')">
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
<h3><a href="@uri!(blogs::details: name = blog.actor_id, page = _)">@blog.title</a></h3>
|
||||
<main><p>@Html(blog.summary_html)</p></main>
|
||||
|
Loading…
Reference in New Issue
Block a user