mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
add variants to BaseCard
This commit is contained in:
parent
d460819dee
commit
1eac8ed14d
@ -40,9 +40,9 @@ storiesOf('Editor', module)
|
|||||||
return {
|
return {
|
||||||
components: { ctx },
|
components: { ctx },
|
||||||
template: `
|
template: `
|
||||||
<ds-card style="width: 50%; min-width: 500px; margin: 0 auto;">
|
<base-card style="width: 50%; min-width: 500px; margin: 0 auto;">
|
||||||
<ctx />
|
<ctx />
|
||||||
</ds-card>
|
</base-card>
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
:to="{ name: 'post-id-slug', params, ...hashParam }"
|
:to="{ name: 'post-id-slug', params, ...hashParam }"
|
||||||
@click.native="$emit('read')"
|
@click.native="$emit('read')"
|
||||||
>
|
>
|
||||||
<base-card>
|
<base-card class="--wide-content">
|
||||||
<h2 class="card-heading">{{ from.title || from.post.title }}</h2>
|
<h2 class="card-heading">{{ from.title || from.post.title }}</h2>
|
||||||
<p>
|
<p>
|
||||||
<strong v-if="isComment" class="comment">{{ $t(`notifications.comment`) }}:</strong>
|
<strong v-if="isComment" class="comment">{{ $t(`notifications.comment`) }}:</strong>
|
||||||
@ -67,10 +67,6 @@ export default {
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-teaser {
|
|
||||||
margin-bottom: $space-x-small;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .description {
|
> .description {
|
||||||
margin-bottom: $space-x-small;
|
margin-bottom: $space-x-small;
|
||||||
}
|
}
|
||||||
@ -82,18 +78,14 @@ export default {
|
|||||||
&:hover {
|
&:hover {
|
||||||
color: $color-primary;
|
color: $color-primary;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> .base-card {
|
.user-teaser {
|
||||||
padding: $space-x-small;
|
margin-bottom: $space-x-small;
|
||||||
|
}
|
||||||
|
|
||||||
> .card-heading {
|
.comment {
|
||||||
font-size: $font-size-large;
|
font-weight: $font-weight-bold;
|
||||||
}
|
|
||||||
|
|
||||||
.comment {
|
|
||||||
font-weight: $font-weight-bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -87,7 +87,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
const width = this.$el.offsetWidth
|
const width = this.$el.offsetWidth
|
||||||
const height = Math.min(width / this.post.imageAspectRatio, 2000)
|
const height = Math.min(width / this.post.imageAspectRatio, 2000)
|
||||||
const imageElement = this.$el.querySelector('.ds-card-image')
|
const imageElement = this.$el.querySelector('.card-image > .image')
|
||||||
if (imageElement) {
|
if (imageElement) {
|
||||||
imageElement.style.height = `${height}px`
|
imageElement.style.height = `${height}px`
|
||||||
}
|
}
|
||||||
@ -170,6 +170,7 @@ export default {
|
|||||||
|
|
||||||
> .image {
|
> .image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-height: 2000px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,6 +38,7 @@ export default {}
|
|||||||
}
|
}
|
||||||
|
|
||||||
> .card-heading {
|
> .card-heading {
|
||||||
|
font-size: $font-size-large;
|
||||||
margin-bottom: $space-x-small;
|
margin-bottom: $space-x-small;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -219,11 +219,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ds-card-image img {
|
|
||||||
max-height: 2000px;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.masonry-grid {
|
.masonry-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user