Improve Page structure and create a redirect middleware to set /films as homepage
This commit is contained in:
20
pages/films/index.vue
Normal file
20
pages/films/index.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<section class="py-4">
|
||||
<h2 class="text-3xl font-normal mx-auto block text-center mb-4">
|
||||
Ghibli films
|
||||
</h2>
|
||||
<div class="films">{{ films }}</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Films",
|
||||
async asyncData({ $axios }) {
|
||||
const films = await $axios.$get("/api/films");
|
||||
return { films };
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
Reference in New Issue
Block a user