diff --git a/src/features/tech-log/presentation/public/components/latest-index.tsx b/src/features/tech-log/presentation/public/components/latest-index.tsx index 4760baa..654a03d 100644 --- a/src/features/tech-log/presentation/public/components/latest-index.tsx +++ b/src/features/tech-log/presentation/public/components/latest-index.tsx @@ -4,6 +4,11 @@ import { cardSummary } from "../../../domain/content-format/card-summary.ts"; export type LatestEntry = { id: string; typeLabel: string; + /** + * 지식의 상태. 목록의 종류 배지가 이 값으로 갈린다 — 확인한 것, 정리한 것, 아직 모르는 것. + * 기록이 아닌 줄(프로젝트 활동)은 상태가 없으므로 비어 온다. + */ + typeState?: "CONFIRMED" | "SETTLED" | "OPEN"; title: string; summary: string; date: string; @@ -51,7 +56,9 @@ export function LatestIndex({
  • - {entry.typeLabel} + + {entry.typeLabel} +
    diff --git a/src/features/tech-log/presentation/public/pages/home-page.tsx b/src/features/tech-log/presentation/public/pages/home-page.tsx index e1c21c2..99e468c 100644 --- a/src/features/tech-log/presentation/public/pages/home-page.tsx +++ b/src/features/tech-log/presentation/public/pages/home-page.tsx @@ -16,6 +16,7 @@ import { } from "../components/latest-index.tsx"; import { DOCUMENT_KIND_LABELS, + DOCUMENT_KIND_STATES, EXPLORE_KIND_PATHS, } from "../../shared/document-kind-labels.ts"; @@ -64,6 +65,13 @@ const NOT_A_RECORD_LABELS: Readonly> = { PROJECT_ACTIVITY: "프로젝트 활동", }; +/** 기록이 아닌 줄은 상태가 없다 — 프로젝트 활동은 지식이 아니라 일어난 일이다. */ +function latestTypeState(entryType: string) { + return entryType in DOCUMENT_KIND_STATES + ? DOCUMENT_KIND_STATES[entryType as keyof typeof DOCUMENT_KIND_STATES] + : undefined; +} + function latestTypeLabel(entryType: string): string { if (entryType in DOCUMENT_KIND_LABELS) { return DOCUMENT_KIND_LABELS[entryType as keyof typeof DOCUMENT_KIND_LABELS]; @@ -80,6 +88,7 @@ async function getLatestEntries( id: entry.id, // 목록의 다른 이름들과 같은 자리에 놓이므로 표기도 같은 규칙을 쓴다 — 대문자에 공백. typeLabel: latestTypeLabel(entry.entryType), + typeState: latestTypeState(entry.entryType), title: entry.title, summary: entry.summary, date: dateLabel(entry.publishedAt), diff --git a/src/features/tech-log/presentation/styles/globals.css b/src/features/tech-log/presentation/styles/globals.css index 55f6382..56d7337 100644 --- a/src/features/tech-log/presentation/styles/globals.css +++ b/src/features/tech-log/presentation/styles/globals.css @@ -570,9 +570,12 @@ a { letter-spacing: 0.01em; } -.latest-time span { - color: var(--ink); - font-weight: 650; +/* + 최근 기록의 종류 배지도 목록과 같은 `.record-kind` 다. 예전에는 이 자리만 따로 굵은 검정으로 + 칠해 두어, 배지에 상태 구분이 생긴 뒤에도 홈만 넷이 똑같이 보였다. +*/ +.latest-time .record-kind { + padding-top: 0; } .latest-copy h3 {