kodadot/nft-gallery

View on GitHub
layouts/gallery-item-layout.vue

Summary

Maintainability
Test Coverage
<template>
  <div class="min-h-full flex flex-col is-clipped">
    <Navbar />
    <main class="flex-grow py-8">
      <div
        class="container"
        :class="{ 'is-fluid': !isFullHD }"
      >
        <Error
          v-if="$nuxt.isOffline"
          :has-img="false"
          error-subtitle="Please check your network connections"
          error-title="Offline Detected"
        />
        <NuxtPage v-else />
      </div>
    </main>
    <LazyTheFooter />
    <LazyCookieBanner />
    <KeyboardShortcutsModal />
    <Buy />
  </div>
</template>

<script lang="ts" setup>
const { $config } = useNuxtApp()
const route = useRoute()

useHead({
  link: [
    {
      hid: 'canonical',
      rel: 'canonical',
      href: $config.public.baseUrl + route.path,
    },
  ],
})

const { width } = useWindowSize()
const isFullHD = computed(() => width.value >= 1440)
</script>