profile.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {% extends "socialnetwork/base.html" %}
  2. {% block title %}
  3. {{user.username}}
  4. {% endblock %}
  5. {% block header1 %}
  6. <div class="right">
  7. <a href="{% url 'logout' %}" class="btn waves-effect waves-teal lighten-3">LOGOUT
  8. </a>
  9. </div>
  10. {% endblock %}
  11. {% block header2 %}
  12. <div class="right">
  13. <a href="{% url 'home' %}" class="btn waves-effect waves-light red lighten-2">GLOBAL STREAM
  14. </a>
  15. </div>
  16. <div class="left">
  17. <a href="{% url 'followerstream' %}" class="btn waves-effect waves-light red lighten-2">FOLLOWER STREAM
  18. </a>
  19. </div>
  20. {% endblock %}
  21. {% block content %}
  22. <form>
  23. <br>
  24. <br>
  25. {% if messages1%}
  26. <p class="center-align">You are following {{user.username}}</p>
  27. {% endif %}
  28. {% if messages2%}
  29. <p class="center-align">You have now unfollowed {{user.username}}</p>
  30. {% endif %}
  31. <div class="row">
  32. <div class="container">
  33. <div class="col s5">
  34. <div class="section" class="center-align">
  35. <div class="text">USERNAME: </div> {{user.username}}
  36. <div class="text">FIRST NAME: </div>{{user.first_name}}
  37. <div class="text">LAST NAME: </div>{{user.last_name}}
  38. <div class="text">AGE: </div>{{profile.age}}
  39. <div class="text">BIO: </div>{{profile.bio}}
  40. </div>
  41. </div>
  42. {% if current_user.id != user.id %}
  43. <a href={% url 'follow' user.id %} class="btn waves-effect waves-teal lighten-3">FOLLOW</a>
  44. <a href={% url 'unfollow' user.id %} class="btn waves-effect waves-lteal lighten-3">UNFOLLOW</a>
  45. {% endif %}
  46. {% if profile.picture_url %}
  47. <div class="col s7">
  48. <img src={{profile.picture_url}} width="200px" height="auto">
  49. <!-- <img src="{% url 'photo' profile.id %}" alt="{{profile.text}}" width="200px" height="auto"> -->
  50. </div>
  51. {% else %}
  52. <div class="col s7">
  53. {% load staticfiles %}
  54. <img src={% static "socialnetwork/default_avatar.jpg" %} width="200px" height="auto">
  55. }
  56. </div>
  57. {% endif %}
  58. <br>
  59. <br>
  60. <div class="container ">
  61. <div class="row ">
  62. {% for post in posts %}
  63. <div class="card-panel col l12 offset-l9 m12 offset-m0 s8 z-depth-2" id="global-stream">
  64. <div>{{post.date_time}}</div>
  65. <div>{{post.post_content}}</div>
  66. </div>
  67. {% endfor %}
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </form>
  73. {% endblock %}