feat(webapp): first draft of landscape mode (#9298)

This commit is contained in:
Ulf Gebhardt 2026-02-25 15:34:20 +01:00 committed by GitHub
parent 1174cf9a03
commit 114a25025f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 6 deletions

View File

@ -1,6 +1,7 @@
<template>
<nuxt-link
class="post-teaser"
:class="{ 'post-teaser--horizontal': singleColumn && post.image }"
:to="{ name: 'post-id-slug', params: { id: post.id, slug: post.slug } }"
>
<os-card
@ -215,6 +216,10 @@ export default {
type: Boolean,
default: false,
},
singleColumn: {
type: Boolean,
default: false,
},
},
data() {
return {
@ -334,16 +339,12 @@ export default {
> .post-ribbon-w-img {
position: absolute;
// 14px (~height of ribbon element) + 24px(=margin of hero image)
top: -38px;
// 7px+24px(=padding of parent) - 1px adjustment
top: -36px;
right: -29px;
}
> .post-ribbon {
position: absolute;
// 14px (~height of ribbon element) + 24px(=margin of hero image)
top: -24px;
// 7px(=offset)+24px(=margin of parent) - 2px adjustment
top: -16px;
right: -29px;
}
}
@ -491,4 +492,36 @@ export default {
}
}
}
.post-teaser--horizontal > .os-card {
@media (min-width: 640px) {
flex-direction: row;
> .os-card__hero-image {
flex: 0 0 40%;
max-width: 40%;
border-top-right-radius: 0;
border-bottom-left-radius: 5px;
}
.image-placeholder {
height: 100%;
aspect-ratio: unset !important;
> .image {
height: 100%;
object-fit: cover;
}
}
> .os-card__content {
flex: 1;
min-width: 0;
}
.post-ribbon-w-img {
top: -16px;
}
}
}
</style>

View File

@ -135,6 +135,7 @@
>
<post-teaser
:post="post"
:single-column="singleColumn"
:postsFilter="postsFilter['categories_some']"
@removePostFromList="posts = removePostFromList(post, posts)"
@pinPost="pinPost(post, refetchPostList)"