+
-
{{ post.title }}
+
{{ post.title }}
@@ -67,7 +66,7 @@ import { mapGetters } from 'vuex'
import { postMenuModalsData, deletePostMutation } from '~/components/utils/PostHelpers'
export default {
- name: 'HcPostCard',
+ name: 'PostTeaser',
components: {
UserTeaser,
HcCategory,
@@ -146,67 +145,67 @@ export default {
height: 100%;
color: $text-color-base;
- .user-teaser {
- margin-bottom: $space-small;
- }
-
- > .base-card {
- display: flex;
- flex-direction: column;
- height: 100%;
-
- &.--pinned {
- border: 1px solid $color-warning;
- }
-
- &.--blur-image > .card-image > .image {
- filter: blur(22px);
- }
-
- > .card-image {
- overflow: hidden;
-
- > .image {
- width: 100%;
- object-fit: contain;
- }
- }
-
- > .content {
- flex-grow: 1;
- margin-bottom: $space-small;
- }
-
- > .footer {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- > .categories {
- flex-grow: 1;
- }
-
- > .counter-icon {
- display: block;
- margin-right: $space-small;
- opacity: 0.5;
- }
-
- > .content-menu {
- position: relative;
- z-index: $z-index-post-card-link;
- }
-
- .ds-tag {
- margin: 0;
- }
- }
- }
-
> .ribbon {
position: absolute;
top: 50%;
right: -7px;
}
}
+
+.post-teaser > .base-card {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+
+ &.--pinned {
+ border: 1px solid $color-warning;
+ }
+
+ &.--blur-image > .card-image > .image {
+ filter: blur(22px);
+ }
+
+ > .card-image {
+ overflow: hidden;
+
+ > .image {
+ width: 100%;
+ object-fit: contain;
+ }
+ }
+
+ > .content {
+ flex-grow: 1;
+ margin-bottom: $space-small;
+ }
+
+ > .footer {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ > .categories {
+ flex-grow: 1;
+ }
+
+ > .counter-icon {
+ display: block;
+ margin-right: $space-small;
+ opacity: 0.5;
+ }
+
+ > .content-menu {
+ position: relative;
+ z-index: $z-index-post-teaser-link;
+ }
+
+ .ds-tag {
+ margin: 0;
+ }
+ }
+
+ .user-teaser {
+ margin-bottom: $space-small;
+ }
+}
diff --git a/webapp/components/_new/generic/BaseCard/BaseCard.vue b/webapp/components/_new/generic/BaseCard/BaseCard.vue
index 6a97c47f1..31f2083b3 100644
--- a/webapp/components/_new/generic/BaseCard/BaseCard.vue
+++ b/webapp/components/_new/generic/BaseCard/BaseCard.vue
@@ -16,6 +16,20 @@ export default {}
background-color: $color-neutral-100;
box-shadow: $box-shadow-base;
+ &.--highlight {
+ border: $border-size-base solid $color-primary;
+ }
+
+ &.--wide-content {
+ padding: $space-small;
+
+ > .card-image {
+ width: calc(100% + (2 * #{$space-small}));
+ margin: -$space-small;
+ margin-bottom: $space-base;
+ }
+ }
+
> .card-image {
width: calc(100% + (2 * #{$space-base}));
margin: -$space-base;
diff --git a/webapp/components/features/ReportList/ReportList.story.js b/webapp/components/features/ReportList/ReportList.story.js
index aa188e8da..44b06d8fb 100644
--- a/webapp/components/features/ReportList/ReportList.story.js
+++ b/webapp/components/features/ReportList/ReportList.story.js
@@ -1,7 +1,7 @@
import { storiesOf } from '@storybook/vue'
import { withA11y } from '@storybook/addon-a11y'
import { action } from '@storybook/addon-actions'
-import { post } from '~/components/PostCard/PostCard.story.js'
+import { post } from '~/components/PostTeaser/PostTeaser.story.js'
import { user } from '~/components/UserTeaser/UserTeaser.story.js'
import helpers from '~/storybook/helpers'
import ReportList from './ReportList'
diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue
index 609c3d800..40bb31e46 100644
--- a/webapp/pages/index.vue
+++ b/webapp/pages/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -26,7 +26,7 @@
:key="post.id"
:imageAspectRatio="post.imageAspectRatio"
>
-
-
import HcEmpty from '~/components/Empty/Empty'
-import HcPostCard from '~/components/PostCard/PostCard.vue'
+import PostTeaser from '~/components/PostTeaser/PostTeaser.vue'
import HcCategory from '~/components/Category'
import HcHashtag from '~/components/Hashtag/Hashtag'
import { relatedContributions } from '~/graphql/PostQuery'
@@ -51,7 +51,7 @@ export default {
mode: 'out-in',
},
components: {
- HcPostCard,
+ PostTeaser,
HcCategory,
HcHashtag,
HcEmpty,
diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue
index 80471fff4..6b6e78bec 100644
--- a/webapp/pages/profile/_id/_slug.vue
+++ b/webapp/pages/profile/_id/_slug.vue
@@ -242,7 +242,7 @@
:key="post.id"
:imageAspectRatio="post.imageAspectRatio"
>
-
import uniqBy from 'lodash/uniqBy'
import UserTeaser from '~/components/UserTeaser/UserTeaser'
-import HcPostCard from '~/components/PostCard/PostCard.vue'
+import PostTeaser from '~/components/PostTeaser/PostTeaser.vue'
import HcFollowButton from '~/components/FollowButton.vue'
import HcCountTo from '~/components/CountTo.vue'
import HcBadges from '~/components/Badges.vue'
@@ -303,7 +303,7 @@ const tabToFilterMapping = ({ tab, id }) => {
export default {
components: {
UserTeaser,
- HcPostCard,
+ PostTeaser,
HcFollowButton,
HcCountTo,
HcBadges,