ok
This commit is contained in:
@@ -1,26 +1,59 @@
|
||||
<template>
|
||||
<div class="flex-row">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Color</td>
|
||||
<td>Aqua</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pet</td>
|
||||
<td>Cat</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Color</td>
|
||||
<td>Blue</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<p class="margin1">My favs</p>
|
||||
<div class="flex-row bdr-primary">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Color</th>
|
||||
<td>Aqua</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pet</th>
|
||||
<td>Cat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Food</th>
|
||||
<td>Eggs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Subject</th>
|
||||
<td>Math</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Drink</th>
|
||||
<td>Monster</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sport</th>
|
||||
<td>Running</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Color</th>
|
||||
<td>Aqua</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pet</th>
|
||||
<td>Cat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Food</th>
|
||||
<td>Eggs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Subject</th>
|
||||
<td>Math</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Drink</th>
|
||||
<td>Monster</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sport</th>
|
||||
<td>Running</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -16,7 +16,7 @@ let len = 0;
|
||||
|
||||
async function fetchPosts() {
|
||||
try {
|
||||
const res = await axios.get("/api/posts");
|
||||
const res = await axios.get("https://www.adam-french.co.uk/api/posts");
|
||||
posts = res.data;
|
||||
len = posts.length;
|
||||
fetched.value = true;
|
||||
@@ -68,8 +68,8 @@ onMounted(() => {
|
||||
<template>
|
||||
<div v-if="fetched" class="center-content">
|
||||
<h2>{{ post.title }}</h2>
|
||||
<p>By: {{ post.author.username }}</p>
|
||||
<div>{{ post.content }}</div>
|
||||
<p>by: {{ post.author.username }}</p>
|
||||
<small
|
||||
>Created at: {{ new Date(post.createdAt).toLocaleString() }}</small
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user