Skip to content

Commit 1f84e78

Browse files
committed
Merge branch 'feat/atproto-blog-fe' of github.com:npmx-dev/npmx.dev into feat/atproto-blog-fe
2 parents c8e4aa2 + 3698abc commit 1f84e78

19 files changed

Lines changed: 177 additions & 45 deletions

app/components/AuthorAvatar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { ResolvedAuthor } from '#shared/schemas/blog'
33
44
const props = defineProps<{
5-
author: ResolvedAuthor
5+
author: Partial<ResolvedAuthor> & Pick<ResolvedAuthor, 'name' | 'avatar'>
66
size?: 'sm' | 'md' | 'lg'
77
}>()
88

app/components/BlogPostFederatedArticles.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import type { FederatedArticleInput } from '#shared/types/blog-post'
33
import type { Author } from '#shared/schemas/blog'
4+
import type { AtIdentifierString } from '@atproto/lex'
45
56
const props = defineProps<{
67
headline: string
@@ -11,7 +12,7 @@ const props = defineProps<{
1112
const authors = computed<Author[]>(() =>
1213
props.articles.map(article => ({
1314
name: article.authorHandle,
14-
blueskyHandle: article.authorHandle,
15+
blueskyHandle: article.authorHandle as AtIdentifierString,
1516
})),
1617
)
1718
@@ -30,7 +31,7 @@ const federatedArticles = computed(() => {
3031
authorHandle: article.authorHandle,
3132
author: {
3233
name: profile?.name || article.authorHandle,
33-
blueskyHandle: article.authorHandle,
34+
blueskyHandle: article.authorHandle as AtIdentifierString,
3435
avatar: profile?.avatar || null,
3536
profileUrl: profile?.profileUrl || null,
3637
},
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This type declaration file is required to break a circular type resolution in vue-tsc.
2+
// And is based off Package.d.vue.ts
3+
4+
import type { DefineComponent } from 'vue'
5+
6+
declare const _default: DefineComponent<{
7+
title: string
8+
authors?: { name: string; blueskyHandle?: string }[]
9+
date?: string
10+
primaryColor?: string
11+
}>
12+
13+
export default _default

app/components/Readme.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function handleClick(event: MouseEvent) {
6161

6262
<template>
6363
<article
64-
class="readme prose prose-invert max-w-[70ch] lg:max-w-none px-1"
64+
class="readme max-w-[70ch] lg:max-w-none px-1"
6565
dir="auto"
6666
v-html="html"
6767
:style="{

app/components/global/BlueskyPostEmbed.client.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ async function resolveAtUri(): Promise<string | null> {
4848
if (!match) return null
4949
const [, handle, rkey] = match
5050
51+
if (!handle || !rkey) return null
52+
5153
// If the handle is already a DID, build the AT URI directly
5254
if (handle.startsWith('did:')) {
5355
return `at://${handle}/app.bsky.feed.post/${rkey}`

app/pages/about.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const roleLabels = computed(
7272
</p>
7373
</header>
7474

75-
<section class="prose prose-invert max-w-none space-y-12">
75+
<section class="max-w-none space-y-12">
7676
<div>
7777
<h2 class="text-lg text-fg uppercase tracking-wider mb-4">
7878
{{ $t('about.what_we_are.title') }}

app/pages/accessibility.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const canGoBack = useCanGoBack()
3737
</div>
3838
</header>
3939

40-
<section class="prose prose-invert max-w-none space-y-8">
40+
<section class="max-w-none space-y-8">
4141
<p class="text-fg-muted leading-relaxed">
4242
<i18n-t keypath="a11y.welcome" tag="span" scope="global">
4343
<template #app>

app/pages/blog/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup lang="ts">
2-
const router = useRouter()
3-
42
import type { BlogPostFrontmatter } from '#shared/schemas/blog'
53
64
const blogModules = import.meta.glob<BlogPostFrontmatter>('./*.md', { eager: true })

app/pages/privacy.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const { locale } = useI18n()
5454
</i18n-t>
5555
</header>
5656

57-
<section class="prose prose-invert max-w-none space-y-8">
57+
<section class="max-w-none space-y-8">
5858
<p class="text-fg-muted leading-relaxed">
5959
<i18n-t keypath="privacy_policy.welcome" tag="span" scope="global">
6060
<template #app>

app/pages/recharging.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const icons = [
106106
/>
107107
</div>
108108

109-
<section class="prose prose-invert max-w-none space-y-8">
109+
<section class="max-w-none space-y-8">
110110
<!-- What happened -->
111111
<div>
112112
<h2 class="text-lg text-fg-subtle uppercase tracking-wider mb-4">

0 commit comments

Comments
 (0)