v1.4.5: 게시물 작성자·편집 링크·목록 요약 보정
- posts.author_id 마이그레이션 및 owner/admin 단일 계정 환경에서만 기존 글 backfill - 공개 상세: 글쓴이 본인일 때만 공유 옆 수정 링크 표시, 수정 시각 제거 - 목록 요약: excerpt 없을 때 본문 fallback, post-summary-clamp로 말줄임 처리 - 회원 세션 API에 isAdmin·role 추가
This commit is contained in:
@@ -88,14 +88,10 @@ const getPostFeedArticleClass = (style) => {
|
||||
*/
|
||||
const getPostFeedExcerptClass = (style) => {
|
||||
if (style === 'list') {
|
||||
return 'line-clamp-3'
|
||||
return 'post-summary-clamp post-summary-clamp--three'
|
||||
}
|
||||
|
||||
if (style === 'compact') {
|
||||
return 'line-clamp-1'
|
||||
}
|
||||
|
||||
return 'line-clamp-2'
|
||||
return 'post-summary-clamp post-summary-clamp--two'
|
||||
}
|
||||
|
||||
const closePostFeedStyleMenu = () => {
|
||||
@@ -152,7 +148,10 @@ const mapLatestPost = (post) => {
|
||||
|
||||
return {
|
||||
title: post.title,
|
||||
excerpt: post.excerpt,
|
||||
excerpt: createPostSummary(post.excerpt, post.content, {
|
||||
maxLength: 320,
|
||||
appendEllipsis: false
|
||||
}),
|
||||
featuredImage: post.featuredImage,
|
||||
tagName: tagMeta.name,
|
||||
tagColor: tagMeta.color,
|
||||
@@ -479,7 +478,7 @@ const scrollFeatured = (direction) => {
|
||||
class="post-feed__content relative min-w-0"
|
||||
:class="isPostFeedCards ? 'flex flex-col' : 'flex flex-[3] flex-col gap-1.5 md:flex-[4]'"
|
||||
>
|
||||
<div class="post-feed__content-inner flex min-h-0 flex-1 flex-col gap-1.5">
|
||||
<div class="post-feed__content-inner flex min-h-0 flex-1 flex-col gap-1">
|
||||
<h2 class="max-w-[90%] text-sm font-medium leading-tight">
|
||||
<NuxtLink :to="post.to" class="flex items-center transition-opacity duration-200 hover:opacity-75">
|
||||
<span v-if="post.isFeatured" class="post-feed__featured-icon mr-1 inline-flex h-4 w-4 items-center justify-center text-[var(--site-accent)]">
|
||||
@@ -492,6 +491,7 @@ const scrollFeatured = (direction) => {
|
||||
</h2>
|
||||
|
||||
<p
|
||||
v-if="post.excerpt"
|
||||
class="flex-1 text-[0.8rem] leading-tight site-muted text-[#6E6661]"
|
||||
:class="getPostFeedExcerptClass(postFeedStyle)"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user