diff options
| author | 2022-05-28 07:19:24 -0400 | |
|---|---|---|
| committer | 2022-05-28 13:19:24 +0200 | |
| commit | 323dbca4f713530a5760bb49c07a9274f2ca28cf (patch) | |
| tree | 02d0076862bf8dfafbd564cac043f2941388bfd0 /web/assets | |
| parent | [frontend] Add padding to the bottom of main (#616) (diff) | |
| download | gotosocial-323dbca4f713530a5760bb49c07a9274f2ca28cf.tar.xz | |
[frontend] Reduce width of profile img with screen width (#615)
The commit makes the profile image on the profile page reduce in width
if the screen width is less then it's normal width while maintaining
it's 1:1 aspect ration.
Signed-off-by: Sashanoraa <sasha@noraa.gay>
Diffstat (limited to 'web/assets')
| -rw-r--r-- | web/assets/profile.css | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/web/assets/profile.css b/web/assets/profile.css index 7631b08ab..978468f72 100644 --- a/web/assets/profile.css +++ b/web/assets/profile.css @@ -34,13 +34,33 @@ main { text-decoration: none; } -.profile .basic .avatar img { - height: 25em; - width: 25em; - object-fit: cover; - border-radius: 10px; +.profile .basic .avatar-container { + position: relative; + width: 100%; + max-width: 25em; + } + +.profile .basic .avatar-container .avatar { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; } +.profile .basic .avatar-container .avatar img { + object-fit: cover; + border-radius: 10px; + width: 100%; + height: 100%; + } + +.profile .basic .avatar-container:before { + content: ""; + float: left; + padding-top: 100%; + } + .profile .basic .displayname { font-weight: bold; font-size: 1.6rem; |
