Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dev #12

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
5 changes: 3 additions & 2 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<div>
<Header />
<Header v-if="!embedded" />
<slot />
<Footer />
<Footer v-if="!embedded" />
</div>
</template>
<script setup lang="ts">
const route = useRoute();
const embedded = route.query.embedded == "true";
useHead({
meta: [
{ property: "og:title", content: `${route.meta.title} - Cider Collective` },
Expand Down
18 changes: 16 additions & 2 deletions pages/changelogs/[...id].vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
<template>
<div class="flex flex-col">
<div v-if="embedded" class="prose prose-lg prose-rose dark:prose-invert">
<div v-if="page?.image">
<NuxtImg
:src="
'https://github.com/ciderapp/changes/blob/main/1.client-releases/images/' +
page.image +
'?raw=true'
"
:alt="page.title"
class="mb-5 w-full overflow-hidden rounded-md border border-foreground/60 object-cover shadow-lg"
/>
</div>
<LazyContentDoc />
</div>
<!-- Main content -->
<main class="container grid grid-cols-1 lg:grid-cols-[290px_minmax(0,1fr)] lg:gap-10">
<main v-else class="container grid grid-cols-1 lg:grid-cols-[290px_minmax(0,1fr)] lg:gap-10">
<!-- Left sidebar with page links -->
<div
class="sticky top-14 z-20 hidden h-[calc(100dvh-57px)] border-r text-card-foreground lg:block"
Expand Down Expand Up @@ -84,7 +98,7 @@
});

const $route = useRoute();

const embedded = $route.query.embedded == "true";
const { data: page } = await useAsyncData("page-data", () => queryContent($route.path).findOne());

const { data } = await useAsyncData<any>("changelogs", () =>
Expand Down