Add title, date and content

master
Raymonzut 4 years ago
parent 8cdc2f8767
commit 9da2f77f84
No known key found for this signature in database
GPG Key ID: 97CF2D8BE2C69FC7
  1. 8
      client/src/views/Post.vue

@ -1,9 +1,15 @@
<template>
<div id="Post">
<div v-if="Object.keys(post).length">
<h1>{{ post.title }}</h1>
<h5>Written on {{ post.date.substring(0,10)}}</h5>
<p v-for="(p, i) in post.content.split('\n')" :key="i">{{ p }}</p>
</div>
<h2 v-else>Waiting for post</h2>
<br>
Read other <a href="/posts">posts</a>
<br>
The id of the post is: {{ id }}
</div>
</template>

Loading…
Cancel
Save