MarketingMax/pages/blog/[post].vue

88 lines
2.2 KiB
Vue
Raw Permalink Normal View History

2023-11-22 10:23:48 -08:00
<template>
<div>
<div class="sticky top-0 py-2 px-4 bg-white opacity-90 shadow-md">
<div
class="m-auto w-full max-w-3xl flex items-center justify-between"
>
<NuxtLink class="text-2xl text-zinc-600" to="/blog"
>Project Overview</NuxtLink
>
<NuxtLink to="/">Back to Resume</NuxtLink>
</div>
</div>
<div class="pt-4"></div>
<div class="mx-auto max-w-3xl px-4 blog">
<h1>{{ page.title }}</h1>
2024-02-25 10:10:30 -08:00
<p class="text-zinc-500 pb-2">
{{ page.description }}
<span class="float-right">{{ page.date }}</span>
</p>
2023-11-22 10:23:48 -08:00
<!-- <ContentDoc /> -->
<ContentRenderer :key="page._id" :value="page" />
</div>
<div class="w-full h-2 bg-blue-400 my-4"></div>
<div v-if="data && page" class="mx-auto max-w-3xl px-4">
<p>Other Projects</p>
<a
v-for="post in data"
:href="post._path"
class="text-blue-700 w-full px-2"
>
<h3 class="text-xl">{{ post.title }}</h3>
<p class="text-zinc-500">{{ post.description }}</p>
<!-- <p>{{ post }}</p> -->
</a>
</div>
2024-02-25 10:10:30 -08:00
<div class="hidden">
<img src="" alt="" class="banner" />
</div>
2023-11-22 10:23:48 -08:00
</div>
</template>
<script setup>
2024-02-25 10:10:30 -08:00
// Find current page content
const { page } = useContent();
// Find other pages and list them
const { data } = await useAsyncData("blog", () => queryContent("/").find());
onMounted(() => {
document.title = "Projects | Max Gialanella";
});
2023-11-22 10:23:48 -08:00
</script>
<style>
2024-02-25 10:10:30 -08:00
r .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-md;
}
.blog p + P {
@apply pt-4;
}
.blog ul {
@apply list-disc ml-10;
}
.blog .banner {
background-color: #ebebeb;
width: 100%;
padding: 15px 0;
max-height: 150px;
}
.blog .banner2 {
text-align: center;
max-height: 150px;
width: auto;
}
2023-11-22 10:23:48 -08:00
</style>