diff --git a/app/pages/index.vue b/app/pages/index.vue index 3be7c33e..beaf516a 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -347,7 +347,7 @@ function recentRepoDescription(item: RecentRepoUpdate): string {
  1. - +
diff --git a/layers/marketing/app/components/TrendingBoardItem.vue b/layers/marketing/app/components/TrendingBoardItem.vue index 98ed611a..d9ff9db0 100644 --- a/layers/marketing/app/components/TrendingBoardItem.vue +++ b/layers/marketing/app/components/TrendingBoardItem.vue @@ -12,12 +12,14 @@ import TrendingStarSpark from './TrendingStarSpark.vue' * one; the faces open every post. The posts used to show as a card under * every row and tripled its height. */ -const { row, rank, surface = 'trending-row' } = defineProps<{ +const { row, rank, surface = 'trending-row', deferPosts = false } = defineProps<{ row: TrendingBoardRow /** One-based position on the board. */ rank: number /** Analytics surface for the run pill. */ surface?: string + /** Homepage previews mount the post carousel only when first opened. */ + deferPosts?: boolean }>() const emit = defineEmits<{ @@ -62,7 +64,9 @@ const starLine = computed(() => row.reason._tag !== 'posts' && row.starSeries.le */ const hasReason = computed(() => row.reason._tag !== 'member' || starLine.value) -const open = ref(false) +const postsState = ref<'unopened' | 'open' | 'closed'>('unopened') +const open = computed(() => postsState.value === 'open') +const renderPosts = computed(() => !deferPosts || postsState.value !== 'unopened') const postsId = useId() const postsLabel = computed(() => `${posts.value.length} ${posts.value.length === 1 ? 'post' : 'posts'} about /${row.name}`) @@ -82,7 +86,7 @@ const postsLabel = computed(() => `${posts.value.length} ${posts.value.length == - +