@@ -3,8 +3,52 @@ const { data: posts } = await useAsyncData('blog-posts', () =>
33 queryCollection (' blog' ).where (' draft' , ' <>' , true ).order (' date' , ' DESC' ).all (),
44)
55
6- const placeHolder = [' atproto' , ' atproto ' ]
6+ const placeHolder = [' atproto' , ' nuxt ' ]
77
8+ definePageMeta ({
9+ name: ' blog' ,
10+ // alias: ['/:path(.*)*'],
11+ })
12+
13+ useSeoMeta ({
14+ title : () => $t (' blog.title' ),
15+ description : () => $t (' blog.description' ),
16+ })
17+ </script >
18+
19+ <template >
20+ <main class =" container py-8 sm:py-12 w-full" >
21+ <header class =" mb-8 pb-8 border-b border-border flex place-content-center text-3xl" >
22+ <div class =" " >blog...</div >
23+ </header >
24+
25+ <article v-if =" posts && posts.length > 0" class =" mx-30 space-y-4" >
26+ <BlogPostListCard
27+ v-for =" (post, idx) in posts"
28+ :key =" `${post.author}-${post.title}`"
29+ :author =" post.author || 'Roe'"
30+ :title =" post.title"
31+ :path =" post.slug"
32+ :excerpt =" post.excerpt || post.description || 'No Excerpt Available'"
33+ :topics =" Array.isArray(post.tags) ? post.tags : placeHolder"
34+ :published =" post.date"
35+ :index =" idx"
36+ @focus =" i => console.log('Hovered:', i)"
37+ />
38+ <!-- :selected="toSuggestionIndex(unifiedSelectedIndex) === idx" -->
39+ <!-- :is-exact-match="
40+ (exactMatchType === 'org' && suggestion.type === 'org') ||
41+ (exactMatchType === 'user' && suggestion.type === 'user')
42+ " -->
43+ <!-- @focus="handleBlogPostSelect" -->
44+ <!-- </div> -->
45+ </article >
46+
47+ <article v-else class =" text-center py-20 text-fg-subtle" >No posts found.</article >
48+ </main >
49+ </template >
50+
51+ <!--
852// TODO: This should be extracted into a reusable form so search and blog post can both use it
953// function scrollToSelectedItem() {
1054// const pkgIndex = toPackageIndex(unifiedSelectedIndex.value)
@@ -85,52 +129,4 @@ const placeHolder = ['atproto', 'atproto']
85129// function handleBlogPostSelect(index: number) {
86130// // Convert suggestion index to unified index
87131// unifiedSelectedIndex.value = -(suggestionCount.value - index)
88- // }
89-
90- definePageMeta ({
91- name: ' blog' ,
92- // alias: ['/:path(.*)*'],
93- })
94-
95- useSeoMeta ({
96- title : () => $t (' blog.title' ),
97- description : () => $t (' blog.description' ),
98- })
99- </script >
100-
101- <template >
102- <main class =" container py-8 sm:py-12 w-full" >
103- <header class =" mb-8 pb-8 border-b border-border flex place-content-center text-3xl" >
104- <div class =" " >blog...</div >
105- </header >
106-
107- <article class =" flex flex-col gap-6" >
108- <div v-if =" posts && posts.length > 0" class =" max-w-3xl mx-auto mb-6 space-y-3" >
109- <BlogPostListCard
110- v-for =" (post, idx) in posts"
111- :key =" `${post.author}-${post.title}`"
112- :author =" post.author || 'Roe'"
113- :title =" post.title"
114- :path =" post.slug"
115- :excerpt =" post.excerpt || post.description || 'No Excerpt Available'"
116- :topics =" Array.isArray(post.tags) ? post.tags : placeHolder"
117- :published =" post.date"
118- :index =" idx"
119- @focus =" i => console.log('Hovered:', i)"
120- />
121- <!-- :selected="toSuggestionIndex(unifiedSelectedIndex) === idx" -->
122- <!-- :is-exact-match="
123- (exactMatchType === 'org' && suggestion.type === 'org') ||
124- (exactMatchType === 'user' && suggestion.type === 'user')
125- " -->
126- <!-- @focus="handleBlogPostSelect" -->
127- </div >
128- </article >
129- </main >
130- </template >
131-
132- <style >
133- .container {
134- background : var (--bg-red );
135- }
136- </style >
132+ // } -->
0 commit comments