Commits

ditto committed 9325852

댓글 옆에 프로필 이미지 표시, 스타일 추가

  • Participants
  • Parent commits 53f57ee

Comments (0)

Files changed (2)

File foodcapsule/static/style.css

     background-color: #fff;
     overflow: hidden;
 }
+.post .user img {
+    float: left;
+    margin-right: 10px;
+}
 .post .user {
-    float: left;
-    margin-right: 1em;
     color: #999;
 }
 .post h3 {
     font-size: 14px;
 }
 #comments li {
+    clear: both;
     padding: 10px 15px;
     border-top: 1px solid #ccc;
 }
+#comments .avatar {
+    float: left;
+    margin-right: 10px;
+}
 #comments p {
+    margin-top: 8px;
     margin-bottom: 0;
 }
 #comments .date {

File foodcapsule/templates/post.html

 <ul id="comments">
 {% for comment in post.comments.all %}
     <li>
+        <img src="{{ comment.user.profile.avatar_url }}" class="avatar" alt="{{ comment.user.username }}">
         <a href="{{ comment.user.get_absolute_url }}" class="user">{{ comment.user.profile.fullname }}</a>
         <span class="date">{{ comment.created_at|timesince }} 전</span>
         <p>{{ comment.body }}</p>