feat(projects): 설명 마크다운 렌더링 + 저장소 README 가져오기
등록 모달의 '한 줄 설명' input 을 여러 줄 textarea 로 바꾸고, 설명을 markdown-it 로 렌더링한다(html:false 로 raw HTML 이스케이프·javascript: 링크 차단 — XSS 안전). 상세 화면은 마크다운으로, 카드 미리보기는 기호를 걷어낸 순수 텍스트(mdPlain) + 3줄 클램프로 표시. '저장소 README 가져오기' 버튼과 GET /api/readme 라우트를 추가해 repo_url 의 Gitea README 를 설명란으로 불러올 수 있다(gitea.js fetchReadme). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,11 @@
|
||||
<% if (pdTags.length) { %>
|
||||
<div class="modal-tags"><% pdTags.forEach(function (t) { %><span class="tag"><%= t %></span><% }); %></div>
|
||||
<% } %>
|
||||
<p class="modal-desc"><%= p.description || "설명 없음" %></p>
|
||||
<% if (p.description && p.description.trim()) { %>
|
||||
<div class="modal-desc md-body"><%- renderMarkdown(p.description) %></div>
|
||||
<% } else { %>
|
||||
<p class="modal-desc modal-desc-empty">설명 없음</p>
|
||||
<% } %>
|
||||
<div class="modal-actions">
|
||||
<button type="button" class="modal-action heart<%= p.hearted ? " on" : "" %>" data-react data-id="<%= p.id %>" data-kind="heart">
|
||||
<span class="ico ico-on"><%- icon("heartFill", { size: 15 }) %></span><span class="ico ico-off"><%- icon("heart", { size: 15 }) %></span>
|
||||
|
||||
Reference in New Issue
Block a user