Merge pull request 'Make images in post card links' (#900) from image-link into main

Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/900
This commit is contained in:
KitaitiMakoto 2021-02-15 01:42:21 +00:00
commit 9345a1b7a9
2 changed files with 5 additions and 1 deletions

View file

@ -224,6 +224,10 @@ p.error {
background-position: center; background-position: center;
background-size: cover; background-size: cover;
margin: 0px; margin: 0px;
&:hover {
opacity: 0.9;
}
} }
h3 { h3 {

View file

@ -6,7 +6,7 @@
<div class="card h-entry"> <div class="card h-entry">
@if article.cover_id.is_some() { @if article.cover_id.is_some() {
<div class="cover" style="background-image: url('@Html(article.cover_url(ctx.0).unwrap_or_default())')"></div> <a href="@uri!(posts::details: blog = article.get_blog_fqn(ctx.0), slug = &article.slug, responding_to = _)"><div class="cover" style="background-image: url('@Html(article.cover_url(ctx.0).unwrap_or_default())')"></div></a>
} }
<header> <header>
@if ctx.2.clone().and_then(|u| article.is_author(ctx.0, u.id).ok()).unwrap_or(false) { @if ctx.2.clone().and_then(|u| article.is_author(ctx.0, u.id).ok()).unwrap_or(false) {