Add title, date and content

This commit is contained in:
Raymonzut
2020-04-25 17:04:44 +02:00
parent 8cdc2f8767
commit 9da2f77f84
+7 -1
View File
@@ -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>