Skip to content

Commit

Permalink
[#4] Feat: 로그인 여부에 따라 View 변경
Browse files Browse the repository at this point in the history
로그인할 경우에만 댓글 input 창이 보일 수 있도록 처리함
  • Loading branch information
letsjo committed Apr 5, 2023
1 parent 7fce49f commit 94a2ff7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
pulvinar libero fermentum mi. Lobortis vulputate consectetur suspendisse massa mauris. Lacus odio pretium enim
gravida. Netus sit a, enim enim quam quam egestas arcu.</p>
</div>
{% if isLogin == True %}
<form class="flex w-full gap-x-4 my-5">
<input id="email-address" name="question" type="text" autocomplete="false" required
class="flex-auto rounded-md border-0 bg-white/5 px-3.5 py-2 text-zinc shadow-sm ring-1 ring-inset ring-black/10 focus:ring-2 focus:ring-inset focus:ring-zinc-500 sm:text-sm sm:leading-6"
placeholder="답변을 도와주세요! ChatGPT 친구가 정확하지 않아요!">
<button type="submit"
class="flex-none rounded-md bg-zinc-500 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-zinc-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-500">답글달기</button>
</form>
{%endif%}
<div class="flex flex-col border-2 border-transparent border-t-gray-200">
<div class="px-8 py-3 space-y-4 border-2 border-transparent border-b-gray-200">
<p class="text-xl font-bold">홍길동</p>
Expand Down

0 comments on commit 94a2ff7

Please sign in to comment.