Make blog cover a link
This commit is contained in:
parent
62c0827ff5
commit
905fe54fa3
2 changed files with 13 additions and 6 deletions
|
@ -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 {
|
||||
|
@ -611,4 +615,4 @@ code {
|
|||
.function{
|
||||
color:inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 a new issue