Post titles link to /post/:id page.

This commit is contained in:
2021-01-03 16:52:06 +01:00
parent d8b718273b
commit 9285ae4b7e
2 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
<template>
<div>
<h2>{{ post.title }}</h2>
<router-link :to="`/post/${ post.id }`">
<h2>{{ post.title }}</h2>
</router-link>
<p><span>{{ post.date }}</span> by <span>{{ post.author }}</span></p>
<img v-if="post.thumbnail" :src="post.thumbnail" />

View File

@@ -12,12 +12,14 @@ export default {
data() {
return {
posts: [{
id: 1,
title: "Welcome to Kevin's lab!",
date: new Date(),
author: "Kevin",
description: "Welcome to the technical ramblings that go on in my brain. I will post information about my homelab, projects I undergo and tutorials as I find similar blogs on the internet very inspiring and informational; I can only hope that the same comes across here."
},
{
id: 2,
title: "Building (another) NAS.",
date: new Date(),
author: "Kevin",