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> <template>
<nuxt-link <nuxt-link
class="post-teaser" class="post-teaser"
:class="{ 'post-teaser--horizontal': singleColumn && post.image }"
:to="{ name: 'post-id-slug', params: { id: post.id, slug: post.slug } }" :to="{ name: 'post-id-slug', params: { id: post.id, slug: post.slug } }"
> >
<os-card <os-card
@ -215,6 +216,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
singleColumn: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
@ -334,16 +339,12 @@ export default {
> .post-ribbon-w-img { > .post-ribbon-w-img {
position: absolute; position: absolute;
// 14px (~height of ribbon element) + 24px(=margin of hero image) top: -36px;
top: -38px;
// 7px+24px(=padding of parent) - 1px adjustment
right: -29px; right: -29px;
} }
> .post-ribbon { > .post-ribbon {
position: absolute; position: absolute;
// 14px (~height of ribbon element) + 24px(=margin of hero image) top: -16px;
top: -24px;
// 7px(=offset)+24px(=margin of parent) - 2px adjustment
right: -29px; 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> </style>

View File

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