게시물 추천과 관리자 목록 필터 정리

This commit is contained in:
2026-05-15 11:49:12 +09:00
parent 59a50a0c97
commit 2768975752
20 changed files with 258 additions and 46 deletions

View File

@@ -105,6 +105,7 @@ const form = reactive({
excerpt: props.initialPost.excerpt || '',
content: normalizeMarkdownContent(props.initialPost.content),
featuredImage: props.initialPost.featuredImage || '',
isFeatured: Boolean(props.initialPost.isFeatured),
noindex: Boolean(props.initialPost.noindex),
status: props.initialPost.status || 'draft',
publishedAt: toDateTimeLocalValue(props.initialPost.publishedAt),
@@ -301,6 +302,7 @@ const createPostPayload = () => {
excerpt: form.excerpt.trim(),
content: normalizeMarkdownContent(form.content),
featuredImage: form.featuredImage.trim() || null,
isFeatured: form.isFeatured,
seoTitle: form.title.trim(),
seoDescription: form.excerpt.trim(),
canonicalUrl: '',
@@ -330,6 +332,7 @@ const createAutosavePayload = () => ({
excerpt: form.excerpt,
content: normalizeMarkdownContent(form.content),
featuredImage: form.featuredImage,
isFeatured: form.isFeatured,
noindex: form.noindex,
status: form.status,
publishedAt: form.publishedAt,
@@ -347,7 +350,8 @@ const isEmptyAutosavePayload = (payload) => ![
payload.excerpt,
payload.content,
payload.featuredImage,
payload.tagsText
payload.tagsText,
payload.isFeatured ? 'featured' : ''
].some((value) => String(value || '').trim())
/**
@@ -1026,6 +1030,29 @@ defineExpose({
</label>
</div>
<label class="admin-post-form__featured-toggle flex items-center justify-between gap-4 border-t border-[#e3e6e8] pt-5 text-sm">
<span class="admin-post-form__featured-toggle-copy flex min-w-0 items-center gap-3">
<span class="admin-post-form__featured-toggle-icon flex size-7 shrink-0 items-center justify-center text-[#15171a]" aria-hidden="true">
<svg class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 3.5l2.7 5.47 6.04.88-4.37 4.26 1.03 6.01L12 17.28l-5.4 2.84 1.03-6.01-4.37-4.26 6.04-.88L12 3.5z" />
</svg>
</span>
<span class="admin-post-form__featured-toggle-label font-bold text-[#15171a]">
추천
</span>
</span>
<span class="admin-post-form__featured-toggle-control relative inline-flex h-7 w-12 shrink-0 items-center">
<input
v-model="form.isFeatured"
class="peer sr-only"
type="checkbox"
aria-label="추천 글로 표시"
>
<span class="absolute inset-0 rounded-full bg-[#c8ced3] transition-colors peer-checked:bg-[#15171a]" aria-hidden="true" />
<span class="relative ml-1 size-5 rounded-full bg-white shadow transition-transform peer-checked:translate-x-5" aria-hidden="true" />
</span>
</label>
<div class="admin-post-form__search-visibility grid gap-3 border-t border-[#e3e6e8] pt-5 text-sm">
<div>
<h2 class="admin-post-form__section-title text-sm font-semibold text-ink">

View File

@@ -19,6 +19,9 @@ const { data: navigation } = await useFetch('/api/navigation', {
})
})
/** 저자 영역 공개 여부 */
const showAuthorSection = false
const STORAGE_KEY = 'sori-primary-nav-expanded'
/**
@@ -173,7 +176,7 @@ onMounted(() => {
</div>
</div>
<div class="left-sidebar__block site-sidebar-section px-5 py-5 pr-3 xl:pl-0">
<div v-if="showAuthorSection" class="left-sidebar__block site-sidebar-section px-5 py-5 pr-3 xl:pl-0">
<div class="left-sidebar__section-title flex items-center justify-between text-xs font-semibold uppercase site-muted">
<span>Authors</span>
<span></span>

View File

@@ -17,6 +17,9 @@ const { data: siteSettings } = await useFetch('/api/site-settings', {
copyrightText: '©2026 sori.studio'
})
})
/** 소개 영역 공개 여부 */
const showAboutSection = false
</script>
<template>
@@ -176,7 +179,7 @@ const { data: siteSettings } = await useFetch('/api/site-settings', {
</div>
</div>
<div class="right-sidebar__block site-sidebar-section py-5 pl-5 pr-0">
<div v-if="showAboutSection" class="right-sidebar__block site-sidebar-section py-5 pl-5 pr-0">
<p class="right-sidebar__about text-sm leading-6 site-muted">
{{ siteSettings.description }}
</p>

View File

@@ -8,8 +8,7 @@ const member = ref(null)
const { data: siteSettings } = await useFetch('/api/site-settings', {
default: () => ({
title: 'sori.studio',
logoUrl: ''
title: 'sori.studio'
})
})
@@ -186,12 +185,6 @@ onBeforeUnmount(() => {
</svg>
</span>
</button>
<img
v-if="siteSettings.logoUrl"
class="site-header__brand-logo h-7 w-7 shrink-0 rounded-md object-cover"
:src="siteSettings.logoUrl"
:alt="siteSettings.title"
>
<span class="min-w-0 truncate">{{ siteSettings.title }}</span>
</NuxtLink>
</div>