+ 아직 작성된 글이 없습니다. `src/content/blog`에 마크다운 파일을 + 추가해 주세요. +
+ )} +diff --git a/index.html b/index.html index cf6390c..6940a72 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,9 @@
- + -- 최신 회차 기준 추천 + 히스토리 저장/삭제 -
-{error}
- {JSON.stringify(result.explain, null, 2)}
- Jaeoh Archive
+Stories, notes, and snapshots
+{part.replace(/`/g, '')};
+ }
+ return {part};
+ });
+};
+
+const renderMarkdown = (body) => {
+ const lines = body.split(/\r?\n/);
+ const blocks = [];
+ let list = [];
+ let code = [];
+ let inCode = false;
+
+ const flushList = () => {
+ if (list.length) {
+ blocks.push({ type: 'list', items: list });
+ list = [];
+ }
+ };
+
+ const flushCode = () => {
+ if (code.length) {
+ blocks.push({ type: 'code', value: code.join('\n') });
+ code = [];
+ }
+ };
+
+ lines.forEach((line) => {
+ if (line.startsWith('```')) {
+ if (inCode) {
+ flushCode();
+ inCode = false;
+ } else {
+ flushList();
+ inCode = true;
+ }
+ return;
+ }
+
+ if (inCode) {
+ code.push(line);
+ return;
+ }
+
+ if (/^[-*]\s+/.test(line)) {
+ list.push(line.replace(/^[-*]\s+/, ''));
+ return;
+ }
+
+ flushList();
+
+ if (!line.trim()) {
+ return;
+ }
+
+ if (line.startsWith('### ')) {
+ blocks.push({ type: 'h3', value: line.replace(/^###\s+/, '') });
+ return;
+ }
+ if (line.startsWith('## ')) {
+ blocks.push({ type: 'h2', value: line.replace(/^##\s+/, '') });
+ return;
+ }
+ if (line.startsWith('# ')) {
+ blocks.push({ type: 'h1', value: line.replace(/^#\s+/, '') });
+ return;
+ }
+
+ blocks.push({ type: 'p', value: line });
+ });
+
+ flushList();
+ flushCode();
+
+ return blocks.map((block, index) => {
+ if (block.type === 'h1') return
+ {block.value}
+
+ );
+ return (
+ + {renderInline(block.value)} +
+ ); + }); +}; + +const Blog = () => { + const posts = useMemo(() => getBlogPosts(), []); + const [activeSlug, setActiveSlug] = useState(posts[0]?.slug); + const activePost = posts.find((post) => post.slug === activeSlug) || posts[0]; + + return ( +Journal
++ 마크다운 파일을 추가하면 자동으로 글이 목록에 추가됩니다. +
+이번 주의 기록
++ 손에 닿는 생각을 즉시 적어두고, 나중에 다시 꺼내어 다듬습니다. +
++ 아직 작성된 글이 없습니다. `src/content/blog`에 마크다운 파일을 + 추가해 주세요. +
+ )} +Personal Archive
++ 개발 실험, 여행 스냅, 그리고 생각을 모아두는 공간입니다. 블로그 글은 + 마크다운으로 작성해 계속 추가할 수 있어요. +
+이번 달 집중 테마
++ 빠르게 업데이트하는 대신, 한 번쯤 되돌아보며 기록하는 걸 목표로 + 합니다. 글은 매주 한 편씩 추가될 예정이에요. +
+게시 글
+{posts.length}편
+다음 업데이트
+이번 주말
+확장 가능한 구조로 구성해 이후에도 쉽게 페이지를 추가할 수 있습니다.
+{item.label}
+{item.description}
+마크다운 파일을 추가하면 자동으로 목록에 반영됩니다.
+{post.title}
+{post.excerpt}
+ {post.date || '작성일 미정'} + + ))} +오류
+{error}
+Latest Draw
++ 최신 회차와 번호를 빠르게 확인할 수 있습니다. +
+{latest.drawNo}회
+{latest.date}
++ 보너스 {latest.bonus} +
+ > + ) : ( +최신 회차 데이터가 없습니다.
+ )} +Recommendation
++ 파라미터를 조정해 다른 추천 전략을 만들 수 있습니다. +
+추천 ID #{result.id}
++ 기준 회차 {result.based_on_latest_draw ?? '-'} +
+{JSON.stringify(result.explain, null, 2)}
+ 아직 추천 결과가 없습니다.
+ )} +History
++ 최근 추천 결과를 모아서 확인할 수 있습니다. +
+불러오는 중...
: null} + + {history.length === 0 ? ( +저장된 히스토리가 없습니다.
+ ) : ( +#{item.id}
+{fmtKST(item.created_at)}
+기준 회차 {item.based_on_draw ?? '-'}
++ window={item.params?.recent_window}, weight= + {item.params?.recent_weight}, avoid_k= + {item.params?.avoid_recent_k} +
+Playground
++ 기존 로또 추천 기능을 그대로 유지하면서 새로운 블로그 스타일에 맞게 + 레이아웃을 정리했습니다. +
+다음 업데이트 아이디어
+Visual Diary
++ 여행에서 본 색감과 분위기를 모아 전시하는 페이지입니다. +
+렌더링 포인트
++ 사진마다 그리드 크기를 다르게 배치해 리듬을 만들었습니다. +
+{photo.title}
++ {photo.location} · {photo.month} +
+