-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0adda7c
commit 7fccee7
Showing
5 changed files
with
107 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
<template> | ||
<aside class="p-4 w-[40rem]"> | ||
<slot /> | ||
<aside> | ||
<h1> | ||
<span> | ||
<slot name="title" /> | ||
</span> | ||
<NuxtLink href="/map"> | ||
<IconButton color="inherit text-3xl"> | ||
<XMarkIcon /> | ||
</IconButton> | ||
</NuxtLink> | ||
</h1> | ||
<section class="overflow-y-scroll pr-2"> | ||
<slot> | ||
<i class="opacity-50">no content yet</i> | ||
</slot> | ||
</section> | ||
</aside> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { XMarkIcon } from '@heroicons/vue/24/solid' | ||
</script> | ||
|
||
<style scoped> | ||
aside { | ||
@apply px-4 grid; | ||
grid-template-rows: auto 1fr; | ||
width: 40rem; | ||
height: calc(100vh - theme(spacing.36)); | ||
h1 { | ||
@apply my-2 grid items-center; | ||
grid-template-columns: 1fr auto; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<SidePanel> | ||
<template #title>{{ result?.area.name }}</template> | ||
<template v-if="result"> | ||
<StyledPanel v-for="tale of result.area.tales.nodes" :key="tale.id" class="tale"> | ||
<h3> | ||
<NuxtLink class="hover:underline underline-offset-4" :to="`/library/${tale.id}`"> | ||
{{ tale.title }} | ||
<InlineIcon> <ArrowTopRightOnSquareIcon class="scale-75" /> </InlineIcon> | ||
</NuxtLink> | ||
</h3> | ||
<MarkdownPreview :value="tale.text" /> | ||
</StyledPanel> | ||
</template> | ||
<p v-else>Loading...</p> | ||
</SidePanel> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ArrowTopRightOnSquareIcon } from '@heroicons/vue/24/solid' | ||
import { GetAreaDocument } from '~/graphql/generated' | ||
const route = useRoute() | ||
const { result } = useQuery(GetAreaDocument, () => ({ | ||
slug: route.params.slug as string, | ||
})) | ||
definePageMeta({ | ||
layout: 'map', | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.tale:not(:last-child) { | ||
@apply mb-4; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters