Skip to content

Commit fe3b4eb

Browse files
committed
Fix avatar ration
1 parent ad31022 commit fe3b4eb

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

frontend/src/components/common/TweetPreview.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class="image is-64x64 is-square"
88
:to="{ name: 'user-page', params: { id: tweet.author.id } }"
99
>
10-
<img class="is-rounded" :src="tweet.author.avatar" alt="Author avatar">
10+
<img class="is-rounded fit" :src="tweet.author.avatar" alt="Author avatar">
1111
</router-link>
1212

1313
<router-link v-else :to="{ name: 'user-page', params: { id: tweet.author.id } }">

frontend/src/components/view/profile/EditProfileForm.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,4 @@ export default {
154154
}
155155
}
156156
}
157-
158-
.fit {
159-
width: 100%;
160-
height: 100%;
161-
object-fit: cover;
162-
object-position: 50% 50%;
163-
}
164157
</style>

frontend/src/components/view/tweet/Comment.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class="image is-48x48 is-square"
77
:to="{ name: 'user-page', params: { id: comment.author.id } }"
88
>
9-
<img class="is-rounded" :src="comment.author.avatar">
9+
<img class="is-rounded fit" :src="comment.author.avatar">
1010
</router-link>
1111

1212
<router-link v-else :to="{ name: 'user-page', params: { id: comment.author.id } }">

frontend/src/components/view/tweet/NewCommentForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<article class="media">
33
<figure class="media-left">
44
<p class="image is-48x48 is-square" v-if="user.avatar">
5-
<img class="is-rounded" :src="user.avatar">
5+
<img class="is-rounded fit" :src="user.avatar">
66
</p>
77
<DefaultAvatar v-else class="image is-48x48" :user="user" />
88
</figure>

frontend/src/components/view/tweet/TweetContainer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:to="{ name: 'user-page', params: { id: tweet.author.id } }"
99
>
1010
<img
11-
class="is-rounded"
11+
class="is-rounded fit"
1212
:src="tweet.author.avatar"
1313
alt="Author avatar"
1414
>

frontend/src/styles/common.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,10 @@ html, body {
4949
.auto-cursor {
5050
cursor: auto;
5151
}
52+
53+
.image img.fit {
54+
width: 100%;
55+
height: 100%;
56+
object-fit: cover;
57+
object-position: 50% 50%;
58+
}

0 commit comments

Comments
 (0)