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