Post titles link to /post/:id page.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<router-link :to="`/post/${ post.id }`">
|
||||||
<h2>{{ post.title }}</h2>
|
<h2>{{ post.title }}</h2>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<p><span>{{ post.date }}</span> by <span>{{ post.author }}</span></p>
|
<p><span>{{ post.date }}</span> by <span>{{ post.author }}</span></p>
|
||||||
|
|
||||||
<img v-if="post.thumbnail" :src="post.thumbnail" />
|
<img v-if="post.thumbnail" :src="post.thumbnail" />
|
||||||
|
|||||||
@@ -12,12 +12,14 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
posts: [{
|
posts: [{
|
||||||
|
id: 1,
|
||||||
title: "Welcome to Kevin's lab!",
|
title: "Welcome to Kevin's lab!",
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
author: "Kevin",
|
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."
|
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.",
|
title: "Building (another) NAS.",
|
||||||
date: new Date(),
|
date: new Date(),
|
||||||
author: "Kevin",
|
author: "Kevin",
|
||||||
|
|||||||
Reference in New Issue
Block a user