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; diff --git a/web/gotosocial-styling/templates/profile.css b/web/gotosocial-styling/templates/profile.css index 167ed7b9e..472c6b730 100644 --- a/web/gotosocial-styling/templates/profile.css +++ b/web/gotosocial-styling/templates/profile.css @@ -34,15 +34,34 @@ main { text-decoration: none; } - .avatar { - img { - height: 25em; - width: 25em; - object-fit: cover; - border-radius: 10px; + .avatar-container { + position: relative; + width: 100%; + max-width: 25em; + + .avatar { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + + img { + object-fit: cover; + border-radius: 10px; + width: 100%; + height: 100%; + } } } + .avatar-container:before { + content: ""; + float: left; + padding-top: 100%; + } + + .displayname { font-weight: bold; font-size: 1.6rem; diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index cfabeee6f..71914b7e7 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -5,7 +5,9 @@