blob: 670e944604c1fc2270ab46ef1866750b973867d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<template>
<section class="space-y-4">
<section class="flex flex-col">
<h2 class="text-secondary text-xl font-semibold">All Time Popular</h2>
<p class="text-primary text-sm">Most Popular Anime</p>
</section>
<section class="grid grid-cols-2 md:grid-cols-8 gap-2">
<NuxtLink :to="`/i/${item.id}`" class="w-full space-y-1" v-for="item in data">
<NuxtImg :src="item.coverImage.large" :alt="item.title.romaji" :title="item.title.romaji"
class="w-full h-44 ms:h-48 mm:h-60 ml:h-64 tb:h-32 lp:h-56 ll:h-60 4k:h-96
object-cover rounded-sm hover:scale-95" />
<h6 class="text-primary text-sm truncate">{{ item.title.romaji }}</h6>
<div class="flex items-center gap-1">
<p class="text-primary bg-secondary text-sm rounded-sm px-1.5">{{ item.format }}</p>
<p class="text-secondary bg-primary text-sm rounded-sm px-1.5">{{ item.seasonYear }}</p>
</div>
</NuxtLink>
</section>
</section>
</template>
<script setup>
const { data } = await useFetch("/api/popular");
</script>
|