feat(profile): 프로필에 '한줄 소개' 추가 — 본인만 인라인 편집
- users.bio 컬럼(멱등) + db.setBio / getUserProfile 조회 포함 - POST /profile/bio (본인만, fetch JSON / 폼 POST 폴백) - 프로필 히어로: 이름·사번 한 줄로 합치고 한줄 소개를 3줄째로 배치 - 본인은 연필 버튼으로 인라인 편집(저장/취소·Esc), 최대 80자 - word-break: keep-all 로 한글 단어 중간 잘림 방지 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,12 +17,30 @@
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="profile-info">
|
||||
<h1 class="profile-name"><%= profile.name %></h1>
|
||||
<div class="profile-sabun"><%= profile.sabun %></div>
|
||||
<div class="profile-idline">
|
||||
<h1 class="profile-name"><%= profile.name %></h1>
|
||||
<span class="profile-sabun"><%= profile.sabun %></span>
|
||||
</div>
|
||||
<div class="profile-metaline">
|
||||
<span><%= profile.project_count %>개 프로젝트</span>
|
||||
<span>· 가입 <%= fdate(profile.created_at) %></span>
|
||||
</div>
|
||||
|
||||
<% if (profile.bio || isSelf) { %>
|
||||
<div class="profile-bio-row" id="bioRow">
|
||||
<p class="profile-bio<%= profile.bio ? "" : " is-empty" %>" id="bioText"><%= profile.bio || "한줄 소개를 남겨보세요" %></p>
|
||||
<% if (isSelf) { %>
|
||||
<button type="button" class="profile-bio-edit" id="bioEditBtn" title="한줄 소개 편집" aria-label="한줄 소개 편집"><%- icon("pencil", { size: 13 }) %></button>
|
||||
<% } %>
|
||||
</div>
|
||||
<% if (isSelf) { %>
|
||||
<form class="profile-bio-form" id="bioForm" method="post" action="/profile/bio" hidden>
|
||||
<input type="text" name="bio" id="bioInput" maxlength="80" value="<%= profile.bio || "" %>" placeholder="한줄 소개 (최대 80자)" autocomplete="off" />
|
||||
<button type="submit" class="btn btn-success" id="bioSave">저장</button>
|
||||
<button type="button" class="btn" id="bioCancel">취소</button>
|
||||
</form>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user