Improve post & events cards, homepage and my events page
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -56,24 +56,11 @@
|
||||
{{ organizerDisplayName(event) }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="event-subtitle"
|
||||
<event-address
|
||||
v-if="event.physicalAddress"
|
||||
:title="
|
||||
isDescriptionDifferentFromLocality
|
||||
? `${event.physicalAddress.description}, ${event.physicalAddress.locality}`
|
||||
: event.physicalAddress.description
|
||||
"
|
||||
>
|
||||
<b-icon icon="map-marker" />
|
||||
<span v-if="isDescriptionDifferentFromLocality">
|
||||
{{ event.physicalAddress.description }},
|
||||
{{ event.physicalAddress.locality }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ event.physicalAddress.description }}
|
||||
</span>
|
||||
</div>
|
||||
class="event-subtitle"
|
||||
:physical-address="event.physicalAddress"
|
||||
/>
|
||||
<div
|
||||
class="event-subtitle"
|
||||
v-else-if="event.options && event.options.isOnline"
|
||||
@@ -84,41 +71,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="date-and-title">-->
|
||||
<!-- <div class="date-component">-->
|
||||
<!-- <date-calendar-icon v-if="!mergedOptions.hideDate" :date="event.beginsOn" />-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="title-wrapper">-->
|
||||
<!-- <h4>{{ event.title }}</h4>-->
|
||||
<!-- <div class="organizer-place-wrapper has-text-grey">-->
|
||||
<!-- <span>{{ $t('By @{username}', { username: actor.preferredUsername }) }}</span>-->
|
||||
<!-- ·-->
|
||||
<!-- <span v-if="event.physicalAddress">-->
|
||||
<!-- {{ event.physicalAddress.description }}, {{ event.physicalAddress.locality }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-if="!mergedOptions.hideDetails" class="details">-->
|
||||
<!-- <div v-if="event.participants.length > 0 &&-->
|
||||
<!-- mergedOptions.loggedPerson &&-->
|
||||
<!-- event.participants[0].actor.id === mergedOptions.loggedPerson.id">-->
|
||||
<!-- <b-tag type="is-info"><translate>Organizer</translate></b-tag>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else-if="event.participants.length === 1">-->
|
||||
<!-- <translate-->
|
||||
<!-- :translate-params="{name: event.participants[0].actor.preferredUsername}"-->
|
||||
<!-- >{name} organizes this event</translate>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else>-->
|
||||
<!-- <span v-for="participant in event.participants" :key="participant.actor.uuid">-->
|
||||
<!-- {{ participant.actor.preferredUsername }}-->
|
||||
<!-- <span v-if="participant.role === ParticipantRole.CREATOR">(organizer)</span>,-->
|
||||
<!-- <!– <translate-->
|
||||
<!-- :translate-params="{name: participant.actor.preferredUsername}"-->
|
||||
<!-- > {name} is in,</translate>–>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
@@ -135,11 +87,13 @@ import LazyImageWrapper from "@/components/Image/LazyImageWrapper.vue";
|
||||
import { Actor, Person } from "@/types/actor";
|
||||
import { EventStatus, ParticipantRole } from "@/types/enums";
|
||||
import RouteName from "../../router/name";
|
||||
import EventAddress from "@/components/Event/EventAddress.vue";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
DateCalendarIcon,
|
||||
LazyImageWrapper,
|
||||
EventAddress,
|
||||
},
|
||||
})
|
||||
export default class EventCard extends Vue {
|
||||
@@ -175,18 +129,12 @@ export default class EventCard extends Vue {
|
||||
this.event.organizerActor || this.mergedOptions.organizerActor
|
||||
);
|
||||
}
|
||||
|
||||
get isDescriptionDifferentFromLocality(): boolean {
|
||||
return (
|
||||
this.event?.physicalAddress?.description !==
|
||||
this.event?.physicalAddress?.locality &&
|
||||
this.event?.physicalAddress?.description !== undefined
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "@/styles/_event-card";
|
||||
|
||||
a.card {
|
||||
display: block;
|
||||
background: $secondary;
|
||||
@@ -283,43 +231,16 @@ a.card {
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
// min-height: 2.4rem;
|
||||
padding-bottom: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.event-organizer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 8px;
|
||||
|
||||
.organizer-name {
|
||||
font-size: 14px;
|
||||
padding-left: 5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.event-subtitle {
|
||||
font-size: 0.85rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// flex-wrap: wrap;
|
||||
color: #3c376e;
|
||||
}
|
||||
|
||||
span:not(.icon) {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
// span {
|
||||
// width: 14rem;
|
||||
// display: block;
|
||||
// overflow: hidden;
|
||||
|
||||
// flex-grow: 1;
|
||||
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
// }
|
||||
.organizer-name {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user