only top for doc

This commit is contained in:
j 2023-12-01 20:45:47 +01:00
parent f5e4ad0de6
commit 6c9f688ee7
3 changed files with 8 additions and 2 deletions

View file

@ -124,6 +124,8 @@ class Item(models.Model):
key = key.replace('og:', '') key = key.replace('og:', '')
data[key] = value data[key] = value
data["url"] = self.url data["url"] = self.url
if "m/documents" in self.url:
data["type"] = "document"
return data return data

View file

@ -116,7 +116,11 @@ header {
width: 100%; width: 100%;
aspect-ratio: 16/9; aspect-ratio: 16/9;
object-fit: cover; object-fit: cover;
object-position: top; }
&.document {
img {
object-position: top;
}
} }
} }
.content { .content {

View file

@ -4,7 +4,7 @@
<h1>{{ item.title }}</h1> <h1>{{ item.title }}</h1>
<h2>{{ item.data.title }}</h2> <h2>{{ item.data.title }}</h2>
</div> </div>
<div class="image"> <div class="image {{item.data.type }}">
<img src={{ item.data.thumbnail }}> <img src={{ item.data.thumbnail }}>
</div> </div>
</a> </a>