Componentize vue.js frontend

This commit is contained in:
Lucas Schumacher 2024-06-20 21:38:18 -04:00
parent bb2026d182
commit 5feaee7b72
2 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,6 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import Blurb from './components/Blurb.vue'
const blurb_data = { const blurb_data = {
title: "Fart Man Comes To Town!", title: "Fart Man Comes To Town!",
@ -20,9 +21,7 @@ function addBlurb() {
<main> <main>
<div class="wrapper" v-for="blurb in blurbs"> <div class="wrapper" v-for="blurb in blurbs">
<h1>{{ blurb.title }}</h1> <Blurb :title="blurb.title" :blurb="blurb.blurb" link="#" />
<p>{{ blurb.blurb }}</p>
<a href="#">Read more...</a>
</div> </div>
<br /> <br />
<button @click="addBlurb">Load more</button> <button @click="addBlurb">Load more</button>