Capital/pages/embed/posts/publishers/[id].vue

37 lines
961 B
Vue
Raw Normal View History

2024-08-16 17:33:16 +00:00
<template>
<div>
<div class="my-3" v-if="!route.query['no-title']">
<h1 class="text-2xl">{{ route.query["title"] ?? t("navPosts") }}</h1>
2024-08-18 17:18:27 +00:00
<span>{{ route.query["caption"] ?? t("navPostsCaptionWithPublisher", [publisher.data.name]) }}</span>
2024-08-16 17:33:16 +00:00
</div>
2024-08-18 17:18:27 +00:00
<post-list v-if="publisher.type == 'realm'" class="mx-[-2.5ch]" :realm="route.params.id?.toString()" />
<post-list v-else class="mx-[-2.5ch]" :author="route.params.id?.toString()" />
2024-08-16 17:33:16 +00:00
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: "embed",
})
const { t } = useI18n()
const route = useRoute()
2024-08-18 17:18:27 +00:00
const config = useRuntimeConfig()
2024-08-16 17:33:16 +00:00
2024-08-18 17:18:27 +00:00
const { data: publisher } = useFetch<any>(`${config.public.solarNetworkApi}/cgi/co/publishers/${route.params.id}`)
2024-08-16 17:33:16 +00:00
useHead({
title: t("navPosts"),
})
useSeoMeta({
title: t("navPosts"),
ogTitle: t("navPosts"),
description: t("navPostsCaption"),
ogDescription: t("navPostsCaption"),
ogType: "website",
})
</script>