gancio/components/Announcement.vue

42 lines
890 B
Vue
Raw Normal View History

<template lang="pug">
2020-08-16 14:06:21 +02:00
nuxt-link(:to='`/announcement/${announcement.id}`')
v-alert.mb-0(border='left' color="primary") {{announcement.title}}
</template>
<script>
import { mapState } from 'vuex'
export default {
props: {
announcement: { type: Object, default: () => ({}) }
},
computed: {
...mapState(['announcements']),
description () {
2020-06-22 19:15:32 +02:00
return this.announcement.announcement.replace(/(<br>)+/g, '<br>')
}
}
}
</script>
<style lang='less'>
2020-07-25 21:41:22 +02:00
// .announcement {
// padding: 2%;
// background-color: #511;
// margin: 1rem 0;
// border-radius: 5px;
// a:hover {
// text-decoration: none;
// }
// .title {
// font-size: 1.2em;
// color: white;
// transition: color .2s;
// &:hover {
// color: #fbd6b5;
// }
// }
// border: 2px solid #ff4500ba;
// // box-shadow: inset 0px 0px 10px 0px orangered;
// }
</style>