Add title, date and content
This commit is contained in:
@@ -1,9 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="Post">
|
<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>
|
<br>
|
||||||
Read other <a href="/posts">posts</a>
|
Read other <a href="/posts">posts</a>
|
||||||
<br>
|
<br>
|
||||||
The id of the post is: {{ id }}
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user