본문 이미지 최적화·라이트박스·번호형 페이지네이션 반영 (v1.10.3)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -89,15 +89,6 @@ const tagPosts = computed(() => (postsResponse.value?.items || [])
|
||||
}
|
||||
}))
|
||||
|
||||
/**
|
||||
* 태그 게시물 목록 페이지 링크를 만든다.
|
||||
* @param {number} page - 페이지 번호
|
||||
* @returns {Object} Nuxt 링크 대상
|
||||
*/
|
||||
const getTagPageTo = (page) => ({
|
||||
path: `/tag/${slug.value}`,
|
||||
query: page > 1 ? { page } : {}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -202,33 +193,14 @@ const getTagPageTo = (page) => ({
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<nav
|
||||
<SitePagination
|
||||
v-if="pagination.totalPages > 1"
|
||||
class="tag-posts-pagination site-section"
|
||||
aria-label="태그 게시물 페이지"
|
||||
>
|
||||
<div class="site-section-body mx-auto flex max-w-[720px] items-center justify-between gap-3 text-sm">
|
||||
<NuxtLink
|
||||
class="rounded border border-[var(--site-line)] px-3 py-2 font-semibold transition hover:bg-[var(--site-panel)]"
|
||||
:class="pagination.page <= 1 ? 'pointer-events-none opacity-35' : ''"
|
||||
:to="getTagPageTo(Math.max(1, pagination.page - 1))"
|
||||
:aria-disabled="pagination.page <= 1"
|
||||
>
|
||||
이전
|
||||
</NuxtLink>
|
||||
<span class="site-muted">
|
||||
{{ pagination.page }} / {{ pagination.totalPages }}
|
||||
</span>
|
||||
<NuxtLink
|
||||
class="rounded border border-[var(--site-line)] px-3 py-2 font-semibold transition hover:bg-[var(--site-panel)]"
|
||||
:class="pagination.page >= pagination.totalPages ? 'pointer-events-none opacity-35' : ''"
|
||||
:to="getTagPageTo(Math.min(pagination.totalPages, pagination.page + 1))"
|
||||
:aria-disabled="pagination.page >= pagination.totalPages"
|
||||
>
|
||||
다음
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</nav>
|
||||
class="tag-posts-pagination"
|
||||
:page="pagination.page"
|
||||
:total-pages="pagination.totalPages"
|
||||
label="태그 게시물 페이지"
|
||||
:base-path="`/tag/${slug}`"
|
||||
/>
|
||||
|
||||
<section v-if="tagPosts.length === 0" class="tag-posts-empty site-section">
|
||||
<div class="tag-posts-empty__body site-section-body mx-auto max-w-[720px] text-sm site-muted">
|
||||
|
||||
Reference in New Issue
Block a user