<script setup>
import MinimalHeader from '~/components/parts/MinimalHeader.vue';
import PageHeader from '~/components/parts/PageHeader.vue';

const slug = useRoute().params.slug;
const { locale } = useI18n();

const { data: post } = await useAsyncData(`art-${slug}`, () => 
  queryCollection(`art`).path(`/art/${locale.value}/${slug}`).first()
, {watch: [locale]})
</script>

<template>
  <!-- Render the blog post as Prose & Vue components -->
  <MinimalHeader></MinimalHeader>
  <div class="extended-container">
    <ContentRenderer :value="post" class="art" />
  </div>
</template>

<style lang="scss">
.extended-container {
    width: 100%;
    margin: auto;
}

.art {
    h2 {
        a {
            text-decoration: none;
            color: var(--color-text);
        }   
    }

    img {
        margin: auto;
        display: flex;
        max-height: 77vh;
        max-width: 100%;
    }
}
</style>