Post titles link to /post/:id page.
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user