MarketingMax/pages/blog/index.vue
2023-11-22 11:23:48 -07:00

51 lines
1.2 KiB
Vue

<template>
<div class="">
<div class="sticky top-0 py-2 bg-white opacity-90 shadow-md">
<div
class="m-auto w-full max-w-3xl flex items-center justify-between"
>
<NuxtLink class="text-xl" to="/blog">Max's Blog</NuxtLink>
<NuxtLink class="" to="/">Home</NuxtLink>
</div>
</div>
<div class="w-full h-2 bg-blue-400"></div>
<div v-if="data" class="mx-auto max-w-3xl">
<a
v-for="post in data"
:href="post._path"
class="text-blue-700 w-full px-2"
>
<h3>{{ post.title }}</h3>
<p class="text-zinc-500">{{ post.description }}</p>
<!-- <p>{{ post }}</p> -->
</a>
</div>
</div>
</template>
<script setup>
// Find other pages and list them
const { data } = await useAsyncData("blog", () => queryContent("/").find());
</script>
<style>
.blog {
@apply leading-9 text-base;
}
.blog a {
@apply text-blue-700;
}
.blog h1 {
@apply pt-5 text-3xl border-zinc-300;
}
.blog h3 {
@apply pt-5 mb-2 text-xl border-b border-zinc-300;
}
.blog img {
@apply my-3 shadow-sm;
}
.blog p + P {
@apply pt-4;
}
</style>