Vue.component('Home', {
    template: `<div id="message-list">
                <div class="om-card card">
                <h6 class="msg-head">
                <b>{{ subject }}</b>
                <img src="favicon.ico" width=20px height=20px>
                </h6>
                {{ message }}<br><br>
                <a href="#">{{ tag }}</a></p>
                <div class="om-user-line">
                <i class="material-icons">account_circle</i>
                Erstellt von {{ user }}
                </div></div></div>`,
    props: ['subject', 'message', 'tag', 'user']
})

new Vue({
    el: '#message-list',
    data: {
        messages: [
            {
                id: 1,
                subject: 'Betreff',
                message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.',
                tag: '#efi #bme #semester',
                user: 'user_1'
              },
            {
                id: 2,
                subject: 'Betreff',
                message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.',
                tag: '#efi #fachschaft',
                user: 'user_2'
              },
            {
                id: 3,
                subject: 'Betreff',
                message: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.',
                tag: '#efi #bei #wichtig',
                user: 'user_3'
              }
            ],
    },
})


/* First try of vue-componetn -> does not work
Vue.component('home', {
  data: function () {
    return {
    }
  },
  template:
	`<div id="sample">
		<div v-for="msgs in private.messages">
    		<div  class="om-card card" v-for="elements in msgs.message">
				<h6 class="msg-head">
					<b>{{elements.subject}}</b>
					<img src="favicon.ico" width=20px height=20px>
				</h6>
				<p>{{elements.msg}}<br>
				<a href="#">{{elements.tags}}</a></p>
				<div class="om-user-line">
					<i class="material-icons">account_circle</i>
					Erstellt von {{elements.user}}
				</div>
			</div>
    	</div>
	</div>`
})

*/
