diff --git a/views/_project_detail.ejs b/views/_project_detail.ejs new file mode 100644 index 0000000..358e536 --- /dev/null +++ b/views/_project_detail.ejs @@ -0,0 +1,134 @@ +<% + // 상세(모달/단독 페이지 공용) — locals: p, comments[], me, returnTo, modal(bool) + function tagList(s) { return String(s || "").split(",").map(function (t) { return t.trim(); }).filter(Boolean); } + function reltime(d) { + var s = Math.floor((Date.now() - new Date(d).getTime()) / 1000); + if (s < 60) return "방금 전"; + var m = Math.floor(s / 60); if (m < 60) return m + "분 전"; + var h = Math.floor(m / 60); if (h < 24) return h + "시간 전"; + var dd = Math.floor(h / 24); if (dd < 7) return dd + "일 전"; + var x = new Date(d); return x.getFullYear() + "." + String(x.getMonth() + 1).padStart(2, "0") + "." + String(x.getDate()).padStart(2, "0"); + } + function isLgtm(b) { return /\blgtm\b/i.test(b || ""); } + var pdTags = tagList(p.tags); + var tops = comments.filter(function (c) { return !c.parent_id; }); + var repliesOf = function (id) { return comments.filter(function (c) { return String(c.parent_id) === String(id); }); }; +%> + + + + + diff --git a/views/dashboard.ejs b/views/dashboard.ejs index 91185c6..2ac30f6 100644 --- a/views/dashboard.ejs +++ b/views/dashboard.ejs @@ -184,7 +184,63 @@ - + + + + + + + + + diff --git a/views/login.ejs b/views/login.ejs index 53684af..be9c150 100644 --- a/views/login.ejs +++ b/views/login.ejs @@ -1,12 +1,12 @@ <%- include("_header") %>
-
- +
diff --git a/views/project.ejs b/views/project.ejs index 781fbb6..6be7fdf 100644 --- a/views/project.ejs +++ b/views/project.ejs @@ -1,46 +1,11 @@ <%- include("_header") %> -
- ← 대시보드 -
-
-

<%= project.title %>

-
<%= project.owner_name %> 님이 공유 · <%= new Date(project.created_at).toLocaleDateString("ko-KR") %>
- <% if (project.description) { %>

<%= project.description %>

<% } %> -
- <% if (project.repo_url) { %>🍵 Repo<% } %> - <% if (project.app_url) { %>🚀 앱 열기<% } %> -
- -
-
- <% if (project.tags) { %> -
- <% project.tags.split(",").map(t=>t.trim()).filter(Boolean).forEach(function(t){ %> - <%= t %> - <% }); %> -
- <% } %> -
-
- -

💬 코멘트 (<%= comments.length %>)

- <% comments.forEach(function(c){ %> -
-
<%= c.author_name %> · <%= new Date(c.created_at).toLocaleString("ko-KR") %>
-
<%= c.body %>
-
- <% }); %> - -
-
-
- -
- -
-
-
+
+
+
+
+