Add title, date and content
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user