2022-12-11 19:52:36 +09:00
|
|
|
<script lang="ts" setup>
|
2023-01-08 15:21:09 +09:00
|
|
|
import type { mastodon } from 'masto'
|
2022-12-11 19:52:36 +09:00
|
|
|
|
|
|
|
const {
|
|
|
|
tag,
|
|
|
|
} = $defineProps<{
|
2023-01-08 15:21:09 +09:00
|
|
|
tag: mastodon.v1.Tag
|
2022-12-11 19:52:36 +09:00
|
|
|
}>()
|
|
|
|
|
2023-01-23 04:21:34 +09:00
|
|
|
const to = $computed(() => {
|
|
|
|
const { hostname, pathname } = new URL(tag.url)
|
|
|
|
return `/${hostname}${pathname}`
|
|
|
|
})
|
2022-12-11 19:52:36 +09:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<NuxtLink :to="to" block p4 hover:bg-active flex justify-between>
|
|
|
|
<div>
|
|
|
|
<h4 text-size-base leading-normal font-medium line-clamp-1 break-all ws-pre-wrap>
|
|
|
|
<span>#</span>
|
|
|
|
<span hover:underline>{{ tag.name }}</span>
|
|
|
|
</h4>
|
|
|
|
<CommonTrending :history="tag.history" text-sm text-secondary line-clamp-1 ws-pre-wrap break-all />
|
|
|
|
</div>
|
|
|
|
<div flex items-center>
|
|
|
|
<CommonTrendingCharts :history="tag.history" />
|
|
|
|
</div>
|
|
|
|
</NuxtLink>
|
|
|
|
</template>
|