All files / pages Index.vue

0% Statements 0/13
100% Branches 0/0
0% Functions 0/5
0% Lines 0/13

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86                                                                                                                                                                           
<template>
  <q-page>
    <Hero />
    <div class="row q-pa-sm">
      <div class="col-lg-8 offset-lg-2 col-md-12 col-sm-12">
        <section id="featured">
          <FeaturedGallery :items="featuredProjects" />
        </section>
        <section id="banner">
          <UploadBanner />
        </section>
        <section id="recent">
          <RecentGallery :items="latestProjects" />
        </section>
 
        <section id="collections">
          <CollectionsGallery />
        </section>
        <section id="banner2">
          <BannerFabricademy />
        </section>
      </div>
    </div>
  </q-page>
</template>
 
<style>
section {
  margin-top: 64px;
  margin-bottom: 128px;
  /* margin-left: 32px;
  margin-right: 32px; */
}
</style>
 
<script>
import Hero from "../components/Hero";
import CollectionsGallery from "../components/CollectionsGallery";
import FeaturedGallery from "../components/FeaturedGallery";
import RecentGallery from "../components/RecentGallery";
import UploadBanner from "../components/UploadBanner";
import BannerFabricademy from "../components/BannerFabricademy";
 
import { mapGetters, mapActions } from "vuex";
 
export default {
  name: "PageIndex",
  components: {
    Hero,
    FeaturedGallery,
    RecentGallery,
    UploadBanner,
    CollectionsGallery,
    BannerFabricademy
  },
  mounted() {
    this.loadFeaturedProjects()
      .then(() => {
        console.log("featured projects loaded");
      })
      .catch(error => {
        console.log("featured projects error ", error);
      });
    this.loadLatestProjects()
      .then(() => {
        console.log("latest projects loaded");
      })
      .catch(error => {
        console.log("featured projects error ", error);
      });
  },
  methods: {
    ...mapActions({
      loadFeaturedProjects: "projects/loadFeaturedProjects",
      loadLatestProjects: "projects/loadLatestProjects"
    })
  },
  computed: {
    ...mapGetters({
      latestProjects: "projects/latestProjects",
      featuredProjects: "projects/featuredProjects"
    })
  }
};
</script>