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:', '')
data[key] = value
data["url"] = self.url
if "m/documents" in self.url:
data["type"] = "document"
return data

View file

@ -116,9 +116,13 @@ header {
width: 100%;
aspect-ratio: 16/9;
object-fit: cover;
}
&.document {
img {
object-position: top;
}
}
}
.content {
max-width: 1000px;
margin: auto;

View file

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