feat: 헤더 매뉴얼 버튼 · 프로필 검색 · 상세 뒤로가기 뎁스 정리
- 헤더 프로필 왼쪽에 '매뉴얼' 버튼 추가(MANUAL_URL 환경변수, 기본 gitea MANUAL) - 검색을 페이지 내 data-search 카드 전체 대상으로 일반화 → 프로필에서 그 사람 프로젝트도 검색(자리표시자도 페이지별로: 공유/내/○○ 님의 프로젝트) - 상세 페이지 뒤로가기: ?from= 내부경로 기반으로 프로필→상세는 프로필로 복귀 - '사내 개발 포털' +4pt, 도구 카드 이름·설명 +2pt Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<% if (user) { %>
|
||||
<div class="hdr-search">
|
||||
<span class="hdr-search-ico"><%- icon("search", { size: 15 }) %></span>
|
||||
<input type="search" id="feedSearch" placeholder="프로젝트 검색…" autocomplete="off" />
|
||||
<input type="search" id="feedSearch" placeholder="<%= typeof searchPlaceholder !== 'undefined' && searchPlaceholder ? searchPlaceholder : '공유 프로젝트 검색…' %>" autocomplete="off" />
|
||||
</div>
|
||||
|
||||
<div class="hdr-right">
|
||||
@@ -41,6 +41,10 @@
|
||||
<span class="theme-ico theme-ico-sun"><%- icon("sun", { size: 16 }) %></span>
|
||||
</button>
|
||||
|
||||
<a class="hdr-link" href="<%= manualUrl %>" target="_blank" rel="noopener" title="포털 사용 매뉴얼">
|
||||
<%- icon("book", { size: 15 }) %><span>매뉴얼</span>
|
||||
</a>
|
||||
|
||||
<% if (user.isAdmin) { %>
|
||||
<span class="admin-pill"><%- icon("lock", { size: 11 }) %>관리자</span>
|
||||
<% } %>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<% if (modal) { %>
|
||||
<button type="button" class="modal-close" data-close-detail title="닫기"><%- icon("x", { size: 16 }) %></button>
|
||||
<% } else { %>
|
||||
<a class="back-link" href="/">← 대시보드</a>
|
||||
<a class="back-link" href="<%= typeof back !== 'undefined' && back ? back.href : '/' %>">← <%= typeof back !== 'undefined' && back ? back.label : '대시보드' %></a>
|
||||
<% } %>
|
||||
</div>
|
||||
<% if (pdTags.length) { %>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// 뷰 로컬 헬퍼
|
||||
function tagList(s) { return String(s || "").split(",").map(function (t) { return t.trim(); }).filter(Boolean); }
|
||||
function fdate(d) { var x = new Date(d); return x.getFullYear() + "." + String(x.getMonth() + 1).padStart(2, "0") + "." + String(x.getDate()).padStart(2, "0"); }
|
||||
function searchText(p) { return (p.title + " " + (p.description || "") + " " + (p.tags || "")).toLowerCase(); }
|
||||
%>
|
||||
|
||||
<main class="main">
|
||||
@@ -38,10 +39,11 @@
|
||||
<% if (!projects.length) { %>
|
||||
<div class="empty"><%= isSelf ? "아직 등록한 프로젝트가 없습니다." : "아직 공개된 프로젝트가 없습니다." %></div>
|
||||
<% } %>
|
||||
<div class="empty" id="feedEmpty" hidden></div>
|
||||
|
||||
<div class="feed-grid">
|
||||
<% projects.forEach(function (p) { var tags = tagList(p.tags); %>
|
||||
<a class="fcard" href="/projects/<%= p.id %>">
|
||||
<a class="fcard" href="/projects/<%= p.id %>?from=/u/<%= encodeURIComponent(profile.sabun) %>" data-search="<%= searchText(p) %>">
|
||||
<div class="fcard-top">
|
||||
<div class="fcard-titlewrap">
|
||||
<span class="pcard-repoico"><%- icon("repo", { size: 16 }) %></span>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<main class="main">
|
||||
<div class="detail-wrap">
|
||||
<div class="modal" style="margin:0 auto;animation:none">
|
||||
<%- include("_project_detail", { p: project, comments: comments, me: user.sabun, returnTo: "/projects/" + project.id, modal: false }) %>
|
||||
<%- include("_project_detail", { p: project, comments: comments, me: user.sabun, returnTo: "/projects/" + project.id, modal: false, back: back }) %>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user