Skip to content

Commit

Permalink
Done displaying user avatar in conversation page
Browse files Browse the repository at this point in the history
  • Loading branch information
kamal0620040 committed Aug 1, 2021
1 parent 7415060 commit 0e8e372
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
13 changes: 13 additions & 0 deletions backend/custom_azure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from storages.backends.azure_storage import AzureStorage

class AzureMediaStorage(AzureStorage):
account_name = 'eventhubkustorage' # Must be replaced by your <storage_account_name>
account_key = 'Zf8bQc9jHikf73ELHsjlepTBMdwa16AN1ULvkRy5HwjTa0XPu5kgSjalnfsXmemazs0nQjqwY6ILSSf3Nl4bvQ==' # Must be replaced by your <storage_account_key>
azure_container = 'media'
expiration_secs = None

class AzureStaticStorage(AzureStorage):
account_name = 'eventhubkustorage' # Must be replaced by your storage_account_name
account_key = 'fbdeyqP6hu10lribv4QjybXXf3PJPkjLKIBy4cmSNurf3pwP5mMbUh+BwhbHVR+/3x6BvL8Smbtk5r58OuQSIQ==' # Must be replaced by your <storage_account_key>
azure_container = 'static'
expiration_secs = None
29 changes: 27 additions & 2 deletions templates/conversations/conversation_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,20 @@
.send-icon-button:hover .send-icon-img{
opacity: 1;
}

.profile-image{
border-radius: 50%;
height: 6.5rem;
width: 6.5rem;
object-fit: cover;
}

.A-image{
display: inline-block;
border-radius: 50%;
/* margin-bottom: 10px; */
}

</style>


Expand All @@ -277,8 +291,19 @@ <h2>Conversation Between:</h3>
<div class="container-fluid logo">

{% for user in conversation.participants.all %}
<div class="A-circle-size A-circle-size-bottom logo1">
<div class="A-circle">A</div>
<!-- <div class="A-circle-size A-circle-size-bottom logo1">
<div class="A-circle">A</div> -->

{% if user.avatar %}
<div class="A-image">
<img class="profile-image" src="{{user.avatar.url}}" alt="profile-img">

{% else %}
<div class="A-circle-size A-circle-size-bottom logo1">
<div class="A-circle">{{user.first_name|first}}</div>

{% endif %}

<p class="name">{{user.first_name}}</p>
</div>
{% if forloop.first %}
Expand Down
6 changes: 3 additions & 3 deletions templates/users/update-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@
align-items: center;
}

.input-group label{
/* display: none; */
}
/* .input-group label{
display: none;
} */

@media only screen and (max-width: 650px) {
.box-1{
Expand Down

0 comments on commit 0e8e372

Please sign in to comment.