mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-03-01 12:44:37 +00:00
feat(webapp): first draft of landscape mode (#9298)
This commit is contained in:
parent
1174cf9a03
commit
114a25025f
@ -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>
|
||||
|
||||
@ -135,6 +135,7 @@
|
||||
>
|
||||
<post-teaser
|
||||
:post="post"
|
||||
:single-column="singleColumn"
|
||||
:postsFilter="postsFilter['categories_some']"
|
||||
@removePostFromList="posts = removePostFromList(post, posts)"
|
||||
@pinPost="pinPost(post, refetchPostList)"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user