Skip to content

Commit 6fc3a8f

Browse files
Kai-rosjonathanyeong
authored andcommitted
fix: resolved styling issues
1 parent c1b4ffc commit 6fc3a8f

3 files changed

Lines changed: 52 additions & 52 deletions

File tree

app/components/BlogPostListCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const emit = defineEmits<{
2222
</script>
2323

2424
<template>
25-
<!-- TODO: Width is currently being constrained -->
2625
<article
2726
class="group card-interactive relative focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-bg focus-within:ring-offset-2 focus-within:ring-fg/50"
2827
>

app/pages/blog/[slug].vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ useSeoMeta({
1919
<main class="container py-8 sm:py-12 w-full">
2020
<!-- Header -->
2121
<header class="mb-8 pb-8 border-b border-border">
22-
<div class="">I AM A WEAK HEADER</div>
22+
<h2
23+
v-if="post"
24+
class="font-mono text-base font-medium text-fg group-hover:text-primary transition-colors hover:underline"
25+
>
26+
{{ post.title }}
27+
</h2>
2328
</header>
2429

2530
<article v-if="post" class="mx-auto text-base prose dark:prose-invert text-lg">

app/pages/blog/index.vue

Lines changed: 46 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)