2020-02-18 08:57:00 +01:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<h2>{{ title }}</h2>
|
|
|
|
<div class="eventMetadataBlock">
|
2021-08-09 14:26:11 +02:00
|
|
|
<!-- Custom icons -->
|
|
|
|
<span
|
|
|
|
class="icon is-medium"
|
|
|
|
v-if="icon && icon.substring(0, 7) === 'mz:icon'"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
:src="`/img/${icon.substring(8)}_monochrome.svg`"
|
|
|
|
width="32"
|
|
|
|
height="32"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
<b-icon v-else-if="icon" :icon="icon" size="is-medium" />
|
2021-11-02 19:47:54 +01:00
|
|
|
<div class="content-wrapper" :class="{ 'padding-left': icon }">
|
2020-02-18 08:57:00 +01:00
|
|
|
<slot></slot>
|
2021-11-02 19:47:54 +01:00
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
|
|
|
|
|
|
@Component
|
|
|
|
export default class EventMetadataBlock extends Vue {
|
|
|
|
@Prop({ required: false, type: String }) icon!: string;
|
|
|
|
|
|
|
|
@Prop({ required: true, type: String }) title!: string;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
h2 {
|
|
|
|
font-size: 1.8rem;
|
|
|
|
font-weight: 500;
|
2021-06-10 10:33:16 +02:00
|
|
|
color: $violet;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
div.eventMetadataBlock {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin-bottom: 1.75rem;
|
|
|
|
|
2021-11-02 19:47:54 +01:00
|
|
|
.content-wrapper {
|
2021-04-26 17:27:27 +02:00
|
|
|
overflow: hidden;
|
2020-02-18 08:57:00 +01:00
|
|
|
|
|
|
|
&.padding-left {
|
2021-06-14 16:14:17 +02:00
|
|
|
padding: 0 20px;
|
2021-08-09 14:26:11 +02:00
|
|
|
|
|
|
|
a {
|
|
|
|
display: block;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|