Files
ghibli-api/layouts/default.vue

46 lines
979 B
Vue

<template>
<div>
<Header />
<main class="mt-16 px-4">
<Nuxt />
</main>
<Footer />
</div>
</template>
<script>
export default {
middleware: ["redirect"],
fetchOnServer: false,
async fetch() {
const { store } = this.$nuxt.context;
if (!store.state.people.list.length) await store.dispatch("people/getList");
if (!store.state.vehicles.list.length)
await store.dispatch("vehicles/getList");
if (!store.state.locations.list.length)
await store.dispatch("locations/getList");
}
};
</script>
<style>
html {
font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, "Helvetica Neue", Arial, sans-serif;
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
}
</style>