필터
{ filterSource = ''; }} class="w-full text-left px-2 py-1.5 rounded text-sm mb-1 {filterSource === '' ? 'bg-[var(--accent)]/15 text-[var(--accent)]' : 'text-[var(--text-dim)] hover:bg-[var(--surface)]'}" >📰 전체
{#each sources as src}
{ filterSource = src; }} class="w-full text-left px-2 py-1.5 rounded text-sm mb-0.5 {filterSource === src ? 'bg-[var(--accent)]/15 text-[var(--accent)]' : 'text-[var(--text-dim)] hover:bg-[var(--surface)]'}" >{src}
{/each}
읽지 않음만
{total}건
전체 읽음
{#if loading}
{#each Array(5) as _}
{/each}
{:else if articles.length === 0}
뉴스가 없습니다
{:else} {#each articles as article}
selectArticle(article)} class="w-full text-left px-4 py-2.5 border-b border-[var(--border)]/30 hover:bg-[var(--surface)] transition-colors {selectedArticle?.id === article.id ? 'bg-[var(--accent)]/5 border-l-2 border-l-[var(--accent)]' : ''}" >
{article.is_read ? '○' : '●'}
{article.title}
{article.ai_sub_group || ''}
{#if article.ai_tags?.length}
{article.ai_tags[0]?.split('/').pop()}
{/if}
{timeAgo(article.created_at)}
{/each} {/if}
{#if total > 30}
{#each Array(Math.ceil(total / 30)) as _, i}
{ currentPage = i + 1; loadArticles(); }} class="px-2 py-0.5 rounded text-xs {currentPage === i + 1 ? 'bg-[var(--accent)] text-white' : 'text-[var(--text-dim)]'}" >{i + 1}
{/each}
{/if} {#if selectedArticle}
{selectedArticle.ai_sub_group}
·
{timeAgo(selectedArticle.created_at)}
·
{selectedArticle.file_format}
{#if selectedArticle.edit_url}
원문 보기 →
{/if}
문서 상세 ↗
selectedArticle = null} class="text-xs text-[var(--text-dim)] hover:text-[var(--text)]" >닫기
{selectedArticle.title}
{@html renderMd(selectedArticle.extracted_text || '')}
{#if noteEditing}
본문 / 메모 입력
저장
noteEditing = false} class="px-3 py-1 text-xs text-[var(--text-dim)]">취소
{:else}
{ noteText = selectedArticle.user_note || ''; noteEditing = true; }} class="mt-4 text-xs text-[var(--text-dim)] hover:text-[var(--accent)]" >+ 본문/메모 입력
{#if selectedArticle.user_note}
{selectedArticle.user_note}
{/if} {/if}
{/if}