-
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
421cb93
commit ced5c9c
Showing
1 changed file
with
9 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,17 @@ | ||
<script lang="ts" setup> | ||
const { data: postGroups } = await usePostList() | ||
const yearKeys = Object.keys(unref(postGroups)).reverse() | ||
const { data: categories } = await useProjects() | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<div class="space-y-7"> | ||
<div v-for="year in yearKeys" :key="year"> | ||
<SubTitle> | ||
{{ year }} | ||
</SubTitle> | ||
<div class="space-y-10"> | ||
<PostCard v-for="(post, key) in postGroups[year]" :key="key" :post="post" /> | ||
</div> | ||
<div class="space-y-10"> | ||
<div v-for="(category, cKey) in categories.body" :key="cKey"> | ||
<SubTitle>{{ category.name }}</SubTitle> | ||
<div class="grid md:grid-cols-2 gap-5"> | ||
<NoteCard v-for="(project, pKey) in category.projects" :key="pKey" :project="note" /> | ||
</div> | ||
</div> | ||
<NuxtLink | ||
class="no-underline opacity-70 mt-8" | ||
:to="$route.path.split('/').slice(0, -1).join('/') || '/'" | ||
> | ||
cd | ||
.. | ||
</NuxtLink> | ||
</div> | ||
<NuxtLink class="font-mono no-underline opacity-70 mt-8" :to="$route.path.split('/').slice(0, -1).join('/') || '/'"> | ||
cd .. | ||
</NuxtLink> | ||
</template> |