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" />
|
2020-02-18 08:57:00 +01:00
|
|
|
<p :class="{ 'padding-left': icon }">
|
|
|
|
<slot></slot>
|
|
|
|
</p>
|
|
|
|
</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;
|
|
|
|
|
|
|
|
p {
|
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>
|