<script setup>
import { ref } from 'vue'
import Blurb from './components/Blurb.vue'

const blurb_data = {
  title: "Fart Man Comes To Town!",
  blurb: "Will this controversial figure finally cause the downfall of the town? Sally Smith from town center says that she can already smell trouble brewing but other members of the town believe the imminent winds of change will revitalize the towns central business district."
};

const blurbs = ref([blurb_data])

function addBlurb() {
  blurbs.value.push(blurb_data)
}
</script>

<template>
  <header>
    <img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
  </header>

  <main>
    <div v-for="blurb in blurbs">
      <Blurb :title="blurb.title" :blurb="blurb.blurb" link="#" />
      <br />
    </div>
    <br />
    <button @click="addBlurb">Load more</button>
  </main>
</template>

<style scoped>
header {
  line-height: 1.5;
}

.logo {
  display: block;
  margin: 0 auto 2rem;
}
</style>
